From 8010d4805f8e3ee90a16d7668198d1634f49965b Mon Sep 17 00:00:00 2001 From: Sebastian Krupinski Date: Tue, 7 Jul 2026 20:58:24 -0400 Subject: [PATCH] feat: unify collection creation Signed-off-by: Sebastian Krupinski --- src/components/CollectionList.vue | 23 ++++++++++++++++++++--- src/pages/ChronoPage.vue | 26 ++------------------------ 2 files changed, 22 insertions(+), 27 deletions(-) diff --git a/src/components/CollectionList.vue b/src/components/CollectionList.vue index 0ba5ef7..a31152e 100644 --- a/src/components/CollectionList.vue +++ b/src/components/CollectionList.vue @@ -11,6 +11,7 @@ const props = defineProps<{ // Emits const emit = defineEmits<{ + 'create': [] 'select': [collection: CollectionObject] 'edit': [collection: CollectionObject] 'toggle-visibility': [collection: CollectionObject] @@ -42,6 +43,12 @@ const displayIcon = computed(() => { return 'mdi-folder' }) +const createLabel = computed(() => { + if (props.type === 'calendar') return 'New Calendar' + if (props.type === 'tasklist') return 'New Task List' + return 'New Collection' +}) + // Functions const onCollectionSelect = (collection: CollectionObject) => { console.log('[Chrono] - Collection selected', collection) @@ -60,9 +67,19 @@ const onToggleVisibility = (collection: CollectionObject) => {