From 0eff0a79ec7ddc5cf1f2b68206ca2701275f4863 Mon Sep 17 00:00:00 2001 From: Jeroen Nijhuis Date: Thu, 28 Dec 2023 23:26:15 +0100 Subject: [PATCH] feat: basic settings screen, navigation refactor --- src/assets/icons/settings.svg | 1 + src/components/Navigation.vue | 116 ++++++++++++--------- src/components/NavigationItem.vue | 18 ++-- src/components/settings/Navigation.vue | 9 ++ src/components/settings/NavigationItem.vue | 26 +++++ src/components/ui/DataTable.vue | 6 +- src/components/ui/separator/Separator.vue | 15 +++ src/components/ui/separator/index.ts | 1 + src/components/ui/table/TableHead.vue | 22 +++- src/components/ui/table/TableHeader.vue | 4 +- src/router.ts | 22 ++++ src/views/Settings.vue | 21 ++++ src/views/settings/Contexts.vue | 1 + src/views/settings/General.vue | 3 + tailwind.config.js | 2 + 15 files changed, 197 insertions(+), 70 deletions(-) create mode 100644 src/assets/icons/settings.svg create mode 100644 src/components/settings/Navigation.vue create mode 100644 src/components/settings/NavigationItem.vue create mode 100644 src/components/ui/separator/Separator.vue create mode 100644 src/components/ui/separator/index.ts create mode 100644 src/views/Settings.vue create mode 100644 src/views/settings/Contexts.vue create mode 100644 src/views/settings/General.vue diff --git a/src/assets/icons/settings.svg b/src/assets/icons/settings.svg new file mode 100644 index 0000000..29a0c94 --- /dev/null +++ b/src/assets/icons/settings.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/Navigation.vue b/src/components/Navigation.vue index 083935a..2d6f403 100644 --- a/src/components/Navigation.vue +++ b/src/components/Navigation.vue @@ -2,63 +2,75 @@ import ContextSwitcher from "./ContextSwitcher.vue"; import NavigationGroup from "./NavigationGroup.vue"; import NavigationItem from "./NavigationItem.vue"; +import { ScrollArea } from "@/components/ui/scroll-area"; diff --git a/src/components/NavigationItem.vue b/src/components/NavigationItem.vue index af2fc78..916d6a2 100644 --- a/src/components/NavigationItem.vue +++ b/src/components/NavigationItem.vue @@ -5,9 +5,6 @@ import { injectStrict } from "@/lib/utils"; import { RegisterCommandStateKey } from "@/providers/CommandPaletteProvider"; const router = useRouter(); -const active = computed(() => { - return router.currentRoute.value.name === props.to.name; -}); const props = defineProps<{ icon: string; @@ -28,15 +25,12 @@ onMounted(() => { }); diff --git a/src/components/settings/Navigation.vue b/src/components/settings/Navigation.vue new file mode 100644 index 0000000..454341b --- /dev/null +++ b/src/components/settings/Navigation.vue @@ -0,0 +1,9 @@ + + diff --git a/src/components/settings/NavigationItem.vue b/src/components/settings/NavigationItem.vue new file mode 100644 index 0000000..f5500ba --- /dev/null +++ b/src/components/settings/NavigationItem.vue @@ -0,0 +1,26 @@ + + diff --git a/src/components/ui/DataTable.vue b/src/components/ui/DataTable.vue index 206a8db..ca45b19 100644 --- a/src/components/ui/DataTable.vue +++ b/src/components/ui/DataTable.vue @@ -34,7 +34,11 @@ const table = useVueTable({ v-for="headerGroup in table.getHeaderGroups()" :key="headerGroup.id" > - + +import { Separator, type SeparatorProps } from 'radix-vue' +import { cn } from '@/lib/utils' + +const props = defineProps() + + + diff --git a/src/components/ui/separator/index.ts b/src/components/ui/separator/index.ts new file mode 100644 index 0000000..2287bcb --- /dev/null +++ b/src/components/ui/separator/index.ts @@ -0,0 +1 @@ +export { default as Separator } from './Separator.vue' diff --git a/src/components/ui/table/TableHead.vue b/src/components/ui/table/TableHead.vue index c552806..794a544 100644 --- a/src/components/ui/table/TableHead.vue +++ b/src/components/ui/table/TableHead.vue @@ -1,11 +1,27 @@ diff --git a/src/components/ui/table/TableHeader.vue b/src/components/ui/table/TableHeader.vue index 3af2117..4e5cdc4 100644 --- a/src/components/ui/table/TableHeader.vue +++ b/src/components/ui/table/TableHeader.vue @@ -1,7 +1,7 @@