From c2f8a84645dbb0d3159ad5b3831d0597854690ce Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Mon, 23 May 2022 22:23:53 +1000
Subject: Add help modal button that opens tutorial

Needed to add code for skipping tutorial pane's welcome message.
Also fixed small unwanted click-propagation bug in SettingsModal.
---
 src/components/TutorialPane.vue | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

(limited to 'src/components/TutorialPane.vue')

diff --git a/src/components/TutorialPane.vue b/src/components/TutorialPane.vue
index 37c5832..82ef628 100644
--- a/src/components/TutorialPane.vue
+++ b/src/components/TutorialPane.vue
@@ -5,13 +5,14 @@ import {EnabledFeatures} from '../lib';
 
 export default defineComponent({
 	props: {
+		skipWelcome: {type: Boolean, default: false},
 		pos: {type: Array as unknown as PropType<[number,number]>, required: true},
 		dims: {type: Array as unknown as PropType<[number,number]>, required: true},
 		uiOpts: {type: Object, required: true},
 	},
 	data(){
 		return {
-			stage: 0,
+			stage: this.skipWelcome ? 1 : 0,
 			maxStage: 10,
 		};
 	},
@@ -79,6 +80,11 @@ export default defineComponent({
 			this.$emit('set-enabled-features', x);
 		},
 	},
+	created(){
+		if (this.skipWelcome){
+			this.sendEnabledFeatures();
+		}
+	},
 	components: {CloseIcon, },
 	emits: ['tutorial-close', 'set-enabled-features', ],
 });
@@ -101,7 +107,7 @@ export default defineComponent({
 				Start Tutorial
 			</button>
 			<button :style="buttonStyles" class="hover:brightness-125" @click="onClose">
-				Continue
+				Close
 			</button>
 		</div>
 	</template>
-- 
cgit v1.2.3

