diff --git a/frontend/src/AppContent.vue b/frontend/src/AppContent.vue index 3ffa147..d4b060e 100644 --- a/frontend/src/AppContent.vue +++ b/frontend/src/AppContent.vue @@ -16,6 +16,7 @@ import ToolbarControlWidget from '@/components/common/ToolbarControlWidget.vue' import { EventsOn, WindowIsFullscreen, WindowIsMaximised, WindowToggleMaximise } from 'wailsjs/runtime/runtime.js' import { isMacOS } from '@/utils/platform.js' import iconUrl from '@/assets/images/icon.png' +import ResizeableWrapper from '@/components/common/ResizeableWrapper.vue' const themeVars = useThemeVars() @@ -25,8 +26,6 @@ const props = defineProps({ const data = reactive({ navMenuWidth: 60, - hoverResize: false, - resizing: false, toolbarHeight: 45, }) @@ -38,33 +37,10 @@ const logPaneRef = ref(null) // provide('preferences', preferences) const saveSidebarWidth = debounce(prefStore.savePreferences, 1000, { trailing: true }) -const handleResize = (evt) => { - if (data.resizing) { - prefStore.setAsideWidth(Math.max(evt.clientX - data.navMenuWidth, 300)) - saveSidebarWidth() - } +const handleResize = () => { + saveSidebarWidth() } -const stopResize = () => { - data.resizing = false - document.removeEventListener('mousemove', handleResize) - document.removeEventListener('mouseup', stopResize) -} - -const startResize = () => { - data.resizing = true - document.addEventListener('mousemove', handleResize) - document.addEventListener('mouseup', stopResize) -} - -const asideWidthVal = computed(() => { - return prefStore.behavior.asideWidth + 'px' -}) - -const dragging = computed(() => { - return data.hoverResize || data.resizing -}) - watch( () => tabStore.nav, (nav) => { @@ -166,15 +142,6 @@ onMounted(async () => { -