From d03f90df2d4806a4c64e86d1a678f1840889d904 Mon Sep 17 00:00:00 2001 From: Robert Kossessa Date: Thu, 25 Jan 2024 01:56:06 +0100 Subject: [PATCH] UPD: Optionally foldable sections --- src/App.vue | 10 +++++++--- src/components/config/ConfigSection.vue | 13 ++++++++----- src/components/device/DevicePreview.vue | 3 --- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/App.vue b/src/App.vue index e9edb43..6e493c9 100644 --- a/src/App.vue +++ b/src/App.vue @@ -5,6 +5,8 @@ import ConfigPane from '@/components/config/ConfigPane.vue' import Navbar from '@/components/Navbar.vue' import ConfigSelect from '@/components/config/ConfigSelect.vue' import { ref } from 'vue' +import ConfigSection from '@/components/config/ConfigSection.vue' +import { Bolt } from 'lucide-vue-next' const currentConfigPage = ref('profile_settings') @@ -13,14 +15,16 @@ const currentConfigPage = ref('profile_settings')
- +
- + + +
+ class="border-solid border-0 border-r bg-zinc-900 bg-opacity-30" />
\ No newline at end of file diff --git a/src/components/config/ConfigSection.vue b/src/components/config/ConfigSection.vue index 7872bda..b311339 100644 --- a/src/components/config/ConfigSection.vue +++ b/src/components/config/ConfigSection.vue @@ -5,14 +5,13 @@ class="flex-1 flex items-center px-4" :class="{'cursor-pointer hover:bg-zinc-800': showToggle}" @click="toggle = !toggle"> - -

{{ title }}

+ +

{{ title }}

- - + @@ -41,12 +40,16 @@ defineProps({ }, iconComponent: { type: [String, Object], - default: 'div', + default: undefined, }, showToggle: { type: Boolean, default: false, }, + foldable: { + type: Boolean, + default: true, + }, }) diff --git a/src/components/device/DevicePreview.vue b/src/components/device/DevicePreview.vue index cf6eb2e..953e4e8 100644 --- a/src/components/device/DevicePreview.vue +++ b/src/components/device/DevicePreview.vue @@ -31,9 +31,6 @@ -
-

{{ $t('config_options.title') }}

-