mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
refactor: Move close button to store header
This commit is contained in:
@@ -3,6 +3,12 @@ import Store from '@/svelte-interface/pages/store.svelte'
|
||||
|
||||
import { unmount } from 'svelte'
|
||||
|
||||
let remove: () => void
|
||||
|
||||
export function OpenStorePage() {
|
||||
remove = renderStore()
|
||||
}
|
||||
|
||||
export function renderStore() {
|
||||
const container = document.querySelector('#container');
|
||||
if (!container) {
|
||||
@@ -18,3 +24,12 @@ export function renderStore() {
|
||||
|
||||
return () => unmount(app)
|
||||
}
|
||||
|
||||
export function closeStore() {
|
||||
document.getElementById('store')!.classList.add('hide')
|
||||
|
||||
setTimeout(() => {
|
||||
remove()
|
||||
document.getElementById('store')!.remove()
|
||||
}, 500)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user