1414 </section >
1515 <form class =" flex flex-col w-full gap-4" @submit =" checkForm" >
1616 <section class =" flex w-full gap-4" >
17- <div class =" flex flex-col flex-wrap w-1/2 gap-4" >
17+ <div class =" flex flex-col w-1/2 gap-4" >
1818 <label for =" lhsLabel" class =" relative" >
1919 <input
2020 id =" lhsLabel"
2121 name =" lhsLabel"
2222 type =" text"
23- class =" flex-1 flex-grow-0 w-full bg-transparent rounded-md material-input "
23+ class =" flex-1 flex-grow-0 w-full bg-transparent rounded-md"
2424 placeholder =" Add label to this text block"
2525 />
2626 </label >
3131 class =" flex-1 w-full bg-transparent rounded-md resize-none form-textarea"
3232 ></textarea >
3333 </div >
34- <div class =" flex flex-col flex-wrap w-1/2 gap-4" >
34+ <div class =" flex flex-col w-1/2 gap-4" >
3535 <input
3636 id =" rhsLabel"
3737 name =" rhsLabel"
3838 type =" text"
39- class =" flex-1 flex-grow-0 w-full bg-transparent rounded-md material-input "
39+ class =" flex-1 flex-grow-0 w-full bg-transparent rounded-md"
4040 placeholder =" Add label to this text block"
4141 />
4242 <textarea
5656 </div >
5757 </form >
5858 </main >
59- <Footer />
6059 </div >
6160</template >
6261
@@ -68,11 +67,44 @@ import { doUrlSafeBase64 } from '../helpers/utils'
6867const dmp = new DiffMatchPatch ()
6968export default Vue .extend ({
7069 layout: ' main' ,
70+ data() {
71+ return {
72+ isSkipTutorial: this .$isSkipTutorial ,
73+ }
74+ },
75+ async mounted() {
76+ const { default : Driver } = await import (' driver.js' )
77+ const driver = new Driver ({
78+ closeBtnText: ' Skip' ,
79+ onReset : () => {
80+ document .cookie = ' isSkipTutorial=true; max-age=31536000; path=/;'
81+ },
82+ })
83+ // Define the steps for introduction
84+ if (! this .isSkipTutorial ) {
85+ driver .defineSteps ([
86+ {
87+ element: ' #lhsLabel' ,
88+ popover: {
89+ title: ' Labels' ,
90+ description: ' Now you can add labels to text blocks' ,
91+ },
92+ },
93+ {
94+ element: ' #rhsLabel' ,
95+ popover: {
96+ title: ' Labels' ,
97+ description: ' Now you can add labels to text blocks' ,
98+ },
99+ },
100+ ])
101+ driver .start ()
102+ }
103+ },
71104 methods: {
72105 checkForm(e : Event ) {
73106 e .preventDefault ()
74107 const formData = new FormData (e .currentTarget as HTMLFormElement )
75- // const formDataJson = Object.fromEntries(formData.entries())
76108 const lhs = formData .get (' lhs' )
77109 const rhs = formData .get (' rhs' )
78110 const lhsLabel = formData .get (' lhsLabel' )
0 commit comments