From 00652c384f88486f974a4f049ca90b80290f4d13 Mon Sep 17 00:00:00 2001 From: aarizona Date: Sat, 31 Aug 2024 09:28:21 +0300 Subject: [PATCH] sidebar --- front/src/assets/sidebar.scss | 2 +- front/src/components/sidebar.vue | 24 +++++++----------------- front/src/stores/promo_sidebar.ts | 8 +++++++- 3 files changed, 15 insertions(+), 19 deletions(-) diff --git a/front/src/assets/sidebar.scss b/front/src/assets/sidebar.scss index 5353525..7027f6f 100644 --- a/front/src/assets/sidebar.scss +++ b/front/src/assets/sidebar.scss @@ -103,7 +103,7 @@ $boxShadow: 0px 0px 8px rgba(0, 0, 0, .25); } &-content { - max-height: 20vh; + max-height: 32vh; overflow: auto; margin-top: 1.125rem; padding-left: 2rem; diff --git a/front/src/components/sidebar.vue b/front/src/components/sidebar.vue index 95b9732..040d137 100644 --- a/front/src/components/sidebar.vue +++ b/front/src/components/sidebar.vue @@ -8,23 +8,14 @@ const sidebar = usePromoSidebar() const sidebar_scene = usePromoScene() const route = useRoute() -const sidebar_obj = ref() -const opened_desc = ref() +const clickable_obj = ref() -const openedChange = () => { - sidebar.open(opened_desc.value) -} - -watch(() => sidebar, () => { - if (sidebar.is_open == false) { - opened_desc.value = null; - } else { - opened_desc.value = sidebar.id_clickable - } -}, { deep: true }) +watch(clickable_obj, () => { + sidebar.open(clickable_obj.value); +})