From ddb38fc873d6bbce5a69d059237374e6ab23422f Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Wed, 25 Jan 2023 19:39:09 +1100
Subject: Add intro modal

---
 src/App.vue | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

(limited to 'src/App.vue')

diff --git a/src/App.vue b/src/App.vue
index f807836..c258b0d 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -59,6 +59,9 @@
 	<transition name="fade">
 		<help-modal v-if="helpOpen" :vert="vert" @close="helpOpen = false"/>
 	</transition>
+	<transition name="fade">
+		<intro-modal v-if="showIntro" :vert="vert" @close="onCloseIntro"/>
+	</transition>
 	<transition name="fade">
 		<loading-modal v-if="loadingMsg != null" :msg="loadingMsg"/>
 	</transition>
@@ -74,6 +77,7 @@ import InfoModal from './components/InfoModal.vue';
 import SearchModal from './components/SearchModal.vue';
 import SettingsModal from './components/SettingsModal.vue';
 import HelpModal from './components/HelpModal.vue';
+import IntroModal from './components/IntroModal.vue';
 import LoadingModal from './components/LoadingModal.vue';
 import IconButton from './components/IconButton.vue';
 
@@ -421,6 +425,17 @@ function onSettingChg(option: string){
 
 const helpOpen = ref(false);
 
+// ========== For intro modal ==========
+
+const showIntro = ref(!store.introSkip);
+function onCloseIntro(){
+	showIntro.value = false;
+	if (store.introSkip == false){
+		store.introSkip = true;
+		store.save('introSkip');
+	}
+}
+
 // ========== For loading modal ==========
 
 const SERVER_WAIT_MSG = 'Loading data';
-- 
cgit v1.2.3

