mirror of
https://github.com/Elvanos/fantasia-archive.git
synced 2024-05-04 04:13:34 +12:00
small fix to flickering window buttons on routing
This commit is contained in:
parent
cc85318d02
commit
d8a3585854
|
@ -42,7 +42,9 @@
|
|||
</q-tooltip>
|
||||
<q-icon
|
||||
size="16px"
|
||||
:name="(isMaximized)? 'mdi-window-restore' : 'mdi-window-maximize'"
|
||||
:name="(isMaximized)
|
||||
? 'mdi-window-restore'
|
||||
: 'mdi-window-maximize'"
|
||||
/>
|
||||
</q-btn>
|
||||
|
||||
|
@ -120,7 +122,7 @@ const checkIfWindowMaximized = () => {
|
|||
/**
|
||||
* Determines if the window is currently maximized or not
|
||||
*/
|
||||
const isMaximized: Ref<boolean> = ref(false)
|
||||
const isMaximized: Ref<boolean> = ref(true)
|
||||
|
||||
/**
|
||||
* Window interval checker variable
|
||||
|
@ -129,13 +131,17 @@ let checkerInterval: number
|
|||
|
||||
/**
|
||||
* Hook up a interval timer on mount for continuous checking
|
||||
* This done due to the fact that dragging via the top header bar doesn't properly fire "drag" event
|
||||
* This is done due to the fact that dragging via the top header bar doesn't properly fire "drag" event
|
||||
* Async due to UI render blocking
|
||||
*/
|
||||
onMounted(async () => {
|
||||
window.clearInterval(checkerInterval)
|
||||
|
||||
checkIfWindowMaximized()
|
||||
|
||||
checkerInterval = window.setInterval(() => {
|
||||
checkIfWindowMaximized()
|
||||
}, 300)
|
||||
}, 100)
|
||||
})
|
||||
|
||||
/**
|
||||
|
|
|
@ -13,6 +13,7 @@ const routes: RouteRecordRaw[] = [
|
|||
|
||||
/**
|
||||
* Component testing pathing
|
||||
* ONLY for singular component testing purposes
|
||||
*/
|
||||
{
|
||||
path: '/componentTesting/:componentName',
|
||||
|
@ -23,6 +24,7 @@ const routes: RouteRecordRaw[] = [
|
|||
},
|
||||
|
||||
/**
|
||||
* Error page - 404
|
||||
* Always leave this as last one, but you can also remove it
|
||||
*/
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue