File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed
Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 11<!-- src/App.vue -->
22<script setup lang="ts">
3- import { onMounted } from ' vue' ;
3+ import { onMounted , onUnmounted , ref } from ' vue' ;
44import CookieBanner from ' @/components/CookieBanner.vue' ;
55import CircuitBackground from ' @/components/CircuitBackground.vue' ;
66import PromptExecutionLogo from ' @/components/PromptExecutionLogo.vue' ;
77import Win95TabContainer from ' @/components/Win95TabContainer.vue' ;
88import { useMainStore } from ' @/store/mainStore' ;
99
1010const 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
1419onMounted (() => {
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});
1925import 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 >
Original file line number Diff line number Diff 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+
3338onMounted (() => {
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
You can’t perform that action at this time.
0 commit comments