Added low priority page
This commit is contained in:
parent
2eadf6f25b
commit
8249bcc18c
4 changed files with 17 additions and 2 deletions
11
src/components/pages/LowPriority.vue
Normal file
11
src/components/pages/LowPriority.vue
Normal file
|
@ -0,0 +1,11 @@
|
|||
<template>
|
||||
<ItemsView base-url="/low" :categories="lowCategories" title="Low priority" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import { categories } from '../../state';
|
||||
import ItemsView from './ItemsView.vue';
|
||||
|
||||
const lowCategories = computed(() => categories.value.filter(c => c.priority === "garden" && Object.keys(c.activeItems).length > 0));
|
||||
</script>
|
|
@ -3,6 +3,9 @@
|
|||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { snoozedCategories } from '../../state';
|
||||
import { computed } from 'vue';
|
||||
import { categories } from '../../state';
|
||||
import ItemsView from './ItemsView.vue';
|
||||
|
||||
const snoozedCategories = computed(() => categories.value.filter(c => Object.keys(c.snoozedItems).length > 0));
|
||||
</script>
|
||||
|
|
|
@ -5,11 +5,13 @@ import "./style.css";
|
|||
import App from "./App.vue";
|
||||
import Todo from "./components/pages/Todo.vue";
|
||||
import Snoozed from "./components/pages/Snoozed.vue";
|
||||
import LowPriority from "./components/pages/LowPriority.vue";
|
||||
|
||||
const routes: RouteRecordRaw[] = [
|
||||
{ path: '/', component: Todo, name: 'home' },
|
||||
{ path: '/todo/:source(\\d+)?/:sourceItem(\\d+)?/:thread(\\d+)?', component: Todo, name: 'todo' },
|
||||
{ path: '/snoozed/:source(\\d+)?/:sourceItem(\\d+)?/:thread(\\d+)?', component: Snoozed, name: 'snoozed' },
|
||||
{ path: '/low/:source(\\d+)?/:sourceItem(\\d+)?/:thread(\\d+)?', component: LowPriority, name: 'low' },
|
||||
];
|
||||
|
||||
const router = createRouter({
|
||||
|
|
|
@ -265,7 +265,6 @@ export const todoItems = computed(() =>
|
|||
.reduce((acc, curr) => mergeSortedLists(acc, curr.activeItems), [] as Item[])
|
||||
);
|
||||
export const todoCategories = computed(() => categories.value.filter(c => ["urgent", "notify", "todo"].includes(c.priority) && Object.keys(c.activeItems).length > 0));
|
||||
export const snoozedCategories = computed(() => categories.value.filter(c => Object.keys(c.snoozedItems).length > 0));
|
||||
|
||||
watch(
|
||||
items,
|
||||
|
|
Loading…
Add table
Reference in a new issue