diff --git a/client/src/components/ActivityBar/ActivityBar.vue b/client/src/components/ActivityBar/ActivityBar.vue index aee942c40ee9..e5bdd51663f5 100644 --- a/client/src/components/ActivityBar/ActivityBar.vue +++ b/client/src/components/ActivityBar/ActivityBar.vue @@ -98,6 +98,10 @@ const dragItem: Ref = ref(null); // drag state const isDragging = ref(false); +// computed values +const canDrag = computed(() => isActiveSideBar("settings")); +const isSideBarOpen = computed(() => activityStore.toggledSideBar !== ""); + /** * Checks if the route of an activity is currently being visited and panels are collapsed */ @@ -112,8 +116,6 @@ function isActiveSideBar(menuKey: string) { return activityStore.toggledSideBar === menuKey; } -const isSideBarOpen = computed(() => activityStore.toggledSideBar !== ""); - /** * Checks if an activity that has a panel should have the `is-active` prop */ @@ -189,10 +191,6 @@ function setActiveSideBar(key: string) { activityStore.toggledSideBar = key; } -const canDrag = computed(() => { - return isActiveSideBar("settings"); -}); - defineExpose({ isActiveSideBar, setActiveSideBar, @@ -224,7 +222,7 @@ defineExpose({
+ :class="{ 'activity-can-drag': canDrag }">