11<script lang="ts" setup>
2- import { useNotification , NButton } from ' naive-ui' ;
3- import { onMounted } from ' vue' ;
2+ import { useNotification , NButton , NModal } from ' naive-ui' ;
3+ import { onMounted , ref } from ' vue' ;
44import { type Router , useRouter } from ' vue-router' ;
55import { type WorkerMessage } from ' ../../shared/WorkerMessage' ;
66import {
@@ -18,9 +18,11 @@ import { useTwitch } from './stores/twitch';
1818import ContextMenu from ' /@/components/ContextMenu.vue' ;
1919import { ObsWebSocketSubject } from ' ~shared/ObsWebSocketSettings' ;
2020import { TwitchSubject } from ' ~shared/TwitchSettings' ;
21+ import { FIRST_TIME_APP_SUBJECT } from ' ~shared/global' ;
2122
2223const APP_VERSION = import .meta .env .VITE_APP_VERSION ;
2324let router: Router ;
25+ const showFirstTimeModal = ref (false );
2426
2527onMounted (() => {
2628 const notification = useNotification ();
@@ -40,6 +42,11 @@ onMounted(() => {
4042 rewards: JSON .parse (e .data .message ! ),
4143 });
4244
45+ break ;
46+ }
47+ case FIRST_TIME_APP_SUBJECT : {
48+ showFirstTimeModal .value = true ;
49+
4350 break ;
4451 }
4552 }
@@ -106,6 +113,28 @@ onMounted(() => {
106113<template >
107114 <context-menu />
108115
116+ <n-modal
117+ :show =" showFirstTimeModal"
118+ :show-icon =" false"
119+ preset =" dialog"
120+ title =" First time?"
121+ transform-origin =" center" >
122+ <div class =" mb-6" ></div >
123+
124+ <div class =" !text-base" >
125+ <p class =" mb-4" >Welcome to <strong class =" text-primary" >Streamflow</strong >, the open-source toolkit for streamers!</p >
126+ <p class =" mb-2" >Just a few things before getting started; you can change these behaviours in the app <strong >Settings</strong >.</p >
127+ <ol class =" list-disc pl-8" >
128+ <li >When you <strong >close the app</strong >, it will run in the background. You can force-close it in the tray icons</li >
129+ <li >By default the app will <strong >open with your computer start up</strong > in the tray icon, so you don't open it manually!</li >
130+ </ol >
131+ </div >
132+
133+ <template #action >
134+ <n-button type =" primary" @click =" showFirstTimeModal = false" >Got it</n-button >
135+ </template >
136+ </n-modal >
137+
109138 <main id =" router-content" >
110139 <router-view ></router-view >
111140 </main >
0 commit comments