From c4e6d7286af1e5bf816935fb1daef41c240d0dd9 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sat, 11 May 2024 13:15:53 -0500 Subject: [PATCH] Implemented unsorted items/page --- src/components/pages/Snoozed.vue | 16 +++++++++++-- src/components/pages/Unsorted.vue | 40 +++++++++++++++++++++++++++++++ src/main.ts | 2 ++ src/state.ts | 15 +++++++++++- 4 files changed, 70 insertions(+), 3 deletions(-) create mode 100644 src/components/pages/Unsorted.vue diff --git a/src/components/pages/Snoozed.vue b/src/components/pages/Snoozed.vue index d61affd..65cad97 100644 --- a/src/components/pages/Snoozed.vue +++ b/src/components/pages/Snoozed.vue @@ -4,8 +4,20 @@ diff --git a/src/components/pages/Unsorted.vue b/src/components/pages/Unsorted.vue new file mode 100644 index 0000000..ade28c1 --- /dev/null +++ b/src/components/pages/Unsorted.vue @@ -0,0 +1,40 @@ + + + diff --git a/src/main.ts b/src/main.ts index 0359ca7..234473b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -7,6 +7,7 @@ import Todo from "./components/pages/Todo.vue"; import Snoozed from "./components/pages/Snoozed.vue"; import LowPriority from "./components/pages/LowPriority.vue"; import Source from "./components/pages/Source.vue"; +import Unsorted from "./components/pages/Unsorted.vue"; const routes: RouteRecordRaw[] = [ { path: '/', component: Todo, name: 'home' }, @@ -14,6 +15,7 @@ const routes: RouteRecordRaw[] = [ { path: '/snoozed/:source(\\d+)?/:sourceItem(\\d+)?/:thread(\\d+)?', component: Snoozed, name: 'snoozed' }, { path: '/low/:source(\\d+)?/:sourceItem(\\d+)?/:thread(\\d+)?', component: LowPriority, name: 'low' }, { path: '/source/:source(\\d+)/:sourceItem(\\d+)?/:thread(\\d+)?', component: Source, name: 'source' }, + { path: '/unsorted/:source(\\d+)?/:sourceItem(\\d+)?/:thread(\\d+)?', component: Unsorted, name: 'unsorted' }, ]; const router = createRouter({ diff --git a/src/state.ts b/src/state.ts index ad6a9a1..1e57dc8 100644 --- a/src/state.ts +++ b/src/state.ts @@ -79,7 +79,7 @@ export interface IsDmRule { export type Rule = LogicalRule | IsDmRule; -export type Priority = "urgent" | "notify" | "todo" | "garden"; +export type Priority = "urgent" | "notify" | "todo" | "garden" | "bottom"; export interface Category { id: number; @@ -197,6 +197,19 @@ export const items = ref([ } } }, + { + source: 0, + sourceItem: 2, + updatedAt: Date.now(), + threads: { + 0: { + count: 1, + preview: "Confusingly complex message", + contact: 0, + updatedAt: Date.now() + } + } + }, { source: 0, sourceItem: 1,