Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persist popup open/close state to avoid closing it every page refresh #419

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/runtime/src/App.ce.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ if (props?.overlayConfig?.initialIsOpen === 'error') {
})
}

const userCollapsed = ref<boolean | undefined>(undefined)
const userCollapsed = ref<boolean>(sessionStorage.vite_checker_overlay_collapsed === "true")

const toggle = () => {
userCollapsed.value = !(userCollapsed.value ?? initialCollapsed.value)
sessionStorage.vite_checker_overlay_collapsed = userCollapsed.value
}

const collapsed = computed<boolean>(() => userCollapsed.value ?? initialCollapsed.value)
Expand Down
Loading