From 59dc138a9b5bf89d38ff064a7bcf877e2182fb53 Mon Sep 17 00:00:00 2001 From: Angel Daniel Munoz Gonzalez Date: Thu, 19 Jul 2018 23:13:08 -0500 Subject: [PATCH] update stuff --- src/pages/about.html | 8 ++++---- src/pages/list-detail.ts | 6 ++++++ src/routes.ts | 14 +++++++------- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/pages/about.html b/src/pages/about.html index 7c5a206..ee52baf 100644 --- a/src/pages/about.html +++ b/src/pages/about.html @@ -24,10 +24,10 @@

Proposito del sitio

o en mis redes sociales: @@ -58,10 +58,10 @@

Site's Purpose

scythes.lol@gmail.com diff --git a/src/pages/list-detail.ts b/src/pages/list-detail.ts index cb776b1..1765a0f 100644 --- a/src/pages/list-detail.ts +++ b/src/pages/list-detail.ts @@ -13,6 +13,9 @@ export class ListDetail { const item = await this.list.get(detail._id); const $index = this.items.findIndex(i => i._id === detail._id); this.items.splice($index, 1, item); + if (detail.done) { + await this.saveHidePrefs(this.hideDone); + } } catch (error) { console.warn(JSON.stringify(error)); return M.toast({ @@ -28,6 +31,9 @@ export class ListDetail { await this.list.put(detail); const item = await this.list.get(detail.name); this.items.push(item); + if (detail.done) { + await this.saveHidePrefs(this.hideDone); + } } catch (error) { console.warn(JSON.stringify(error)); return M.toast({ diff --git a/src/routes.ts b/src/routes.ts index 04f7d62..80f0eef 100644 --- a/src/routes.ts +++ b/src/routes.ts @@ -2,6 +2,13 @@ import { PLATFORM } from "aurelia-framework"; import { RouteConfig } from "aurelia-router"; export const ROUTES: RouteConfig[] = [ + { + route: "my-lists", + title: "Mis Listas", + name: "lists", + nav: true, + moduleId: PLATFORM.moduleName("./pages/my-lists"), + }, { route: ["", "home"], title: "Inicio", @@ -16,13 +23,6 @@ export const ROUTES: RouteConfig[] = [ nav: true, moduleId: PLATFORM.moduleName("./pages/about"), }, - { - route: "my-lists", - title: "Mis Listas", - name: "lists", - nav: true, - moduleId: PLATFORM.moduleName("./pages/my-lists"), - }, { route: "my-lists/:id", title: "Mi Lista Detallada",