Skip to content

Commit a15299b

Browse files
author
b
committed
feat: close button hides full UI shell
1 parent a08bf91 commit a15299b

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

src/App.vue

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,39 @@
11
<!-- src/App.vue -->
22
<script setup lang="ts">
3-
import { onMounted } from 'vue';
3+
import { onMounted, onUnmounted, ref } from 'vue';
44
import CookieBanner from '@/components/CookieBanner.vue';
55
import CircuitBackground from '@/components/CircuitBackground.vue';
66
import PromptExecutionLogo from '@/components/PromptExecutionLogo.vue';
77
import Win95TabContainer from '@/components/Win95TabContainer.vue';
88
import { useMainStore } from '@/store/mainStore';
99
1010
const mainStore = useMainStore();
11+
const showUiShell = ref(true);
12+
13+
const handleHideUiShell = () => {
14+
showUiShell.value = false;
15+
};
1116
1217
// Example of how you might control the visibility of the banner
1318
// This is just a placeholder logic, adjust according to your needs
1419
onMounted(() => {
1520
// Logic to determine if the banner should be shown
1621
// For example, check if the user has already accepted cookies
1722
// showBanner.value = ...;
23+
window.addEventListener('pe-hide-ui-shell', handleHideUiShell);
1824
});
1925
import TheFooter from './components/TheFooter.vue';
2026
27+
onUnmounted(() => {
28+
window.removeEventListener('pe-hide-ui-shell', handleHideUiShell);
29+
});
30+
2131
</script>
2232

2333
<template>
2434
<div class="app-shell">
2535
<CircuitBackground />
26-
<div class="app-content">
36+
<div v-if="showUiShell" class="app-content">
2737
<div>
2838
<PromptExecutionLogo />
2939
</div>

src/components/Win95TabContainer.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ const disableComicEngine = () => {
3030
localStorage.setItem(COMIC_FLAG_KEY, 'false');
3131
};
3232
33+
const closeMenu = () => {
34+
disableComicEngine();
35+
window.dispatchEvent(new CustomEvent('pe-hide-ui-shell'));
36+
};
37+
3338
onMounted(() => {
3439
showComicEngine.value = localStorage.getItem(COMIC_FLAG_KEY) === 'true';
3540
activeTab.value = showComicEngine.value ? 'comic' : 'archive';
@@ -61,7 +66,7 @@ onUnmounted(() => {
6166
<div class="title-bar-controls">
6267
<button aria-label="Minimize"></button>
6368
<button aria-label="Maximize"></button>
64-
<button aria-label="Close" @click="disableComicEngine"></button>
69+
<button aria-label="Close" @click="closeMenu"></button>
6570
</div>
6671
</div>
6772

0 commit comments

Comments
 (0)