Skip to content

Commit

Permalink
fix: KWindow does not take into accound an initial state (close #962)
Browse files Browse the repository at this point in the history
  • Loading branch information
cnouguier committed Sep 30, 2024
1 parent cac3e20 commit e11fa9c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/client/components/layout/KWindow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ const headerControls = computed(() => {
size: 'sm',
tooltip: 'KWindow.RESTORE_ACTION',
visible: currentWindow.controls.restore && currentWindow.state === 'maximized',
handler: () => Layout.setWindowState(props.placement, LocalStorage.get(getStorageKey('restore-state')))
handler: () => Layout.setWindowState(props.placement, LocalStorage.get(getStorageKey('restore-state')) || 'pinned')
}, {
id: `close-${props.placement}-window`,
icon: 'las la-times',
Expand Down Expand Up @@ -408,8 +408,9 @@ function onFooterResized (size) {
}
// restore the state
const currentState = currentWindow.state
const fallbackState = readState() || 'pinned'
Layout.setWindowState(props.placement, fallbackState)
refresh(currentState || fallbackState)
</script>

<style lang="scss" scoped>
Expand Down

0 comments on commit e11fa9c

Please sign in to comment.