diff options
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/HelpModal.vue | 9 | ||||
| -rw-r--r-- | src/components/SettingsModal.vue | 2 | ||||
| -rw-r--r-- | src/components/TutorialPane.vue | 10 |
3 files changed, 17 insertions, 4 deletions
diff --git a/src/components/HelpModal.vue b/src/components/HelpModal.vue index 539d3dc..8b29a90 100644 --- a/src/components/HelpModal.vue +++ b/src/components/HelpModal.vue @@ -13,9 +13,13 @@ export default defineComponent({ this.$emit('help-modal-close'); } }, + onStartTutorial(){ + this.$emit('start-tutorial'); + this.$emit('help-modal-close'); + }, }, components: {CloseIcon, }, - emits: ['help-modal-close', ], + emits: ['help-modal-close', 'start-tutorial', ], }); </script> @@ -46,6 +50,9 @@ export default defineComponent({ in culpa qui officia deserunt mollit anim id est laborum. </div> + <button class="block bg-stone-700 text-white px-4 py-2 rounded" @click.stop="onStartTutorial"> + Start Tutorial + </button> </div> </div> </template> diff --git a/src/components/SettingsModal.vue b/src/components/SettingsModal.vue index 5f3b3c4..4af08c5 100644 --- a/src/components/SettingsModal.vue +++ b/src/components/SettingsModal.vue @@ -47,7 +47,7 @@ export default defineComponent({ <div class="fixed left-0 top-0 w-full h-full bg-black/40" @click="onCloseClick"> <div class="absolute left-1/2 -translate-x-1/2 w-4/5 top-1/2 -translate-y-1/2 max-h-[80%] p-3 bg-stone-50 visible rounded-md shadow shadow-black"> - <close-icon @click="onCloseClick" ref="closeIcon" + <close-icon @click.stop="onCloseClick" ref="closeIcon" class="block absolute top-2 right-2 w-6 h-6 hover:cursor-pointer" /> <h1 class="text-xl font-bold mb-2">Settings</h1> <hr class="border-stone-400"/> 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> |
