File tree Expand file tree Collapse file tree 4 files changed +14
-10787
lines changed Expand file tree Collapse file tree 4 files changed +14
-10787
lines changed Original file line number Diff line number Diff line change
1
+ import { defaultAssetsUrl } from "../../../Features/default_assets_url" ;
2
+
1
3
console . info ( "Onboarding script initialized!" ) ;
2
4
document . addEventListener ( "DOMContentLoaded" , ( ) => {
3
- console . info ( "Start onboarding application!" ) ;
5
+ const tutoUrl = `${
6
+ defaultAssetsUrl !== "" ? defaultAssetsUrl : "http://extra.workadventure.localhost"
7
+ } /tutorialv1.html`;
8
+ console . info ( "Start onboarding application!" , tutoUrl ) ;
9
+
4
10
if ( WA . player . state . tutorialDone ) return ;
11
+
5
12
//TODO delete @ts -ignore when new scripting release is up
6
13
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
7
14
// @ts -ignore
8
15
WA . ui . modal . openModal ( {
9
- src : process . env . WORKADVENTURE_URL + "/tutorialv1.html" ,
16
+ src : tutoUrl ,
10
17
allow : "fullscreen; clipboard-read; clipboard-write" ,
11
18
allowApi : true ,
12
19
} ) ;
Original file line number Diff line number Diff line change 5
5
<script src =" <%= workadventure_url %>/iframe_api.js" ></script >
6
6
</head >
7
7
<body class =" tw-bg-dark-purple/95" >
8
+ Tutu v1 script launcher
8
9
</body >
9
10
</html >
Original file line number Diff line number Diff line change 4
4
import Steps from " ./Steps.svelte" ;
5
5
6
6
function close(){
7
- WA .ui .modal .closeModal ();
8
7
WA .player .state .tutorialDone = true ;
8
+ // TODO delete @ts-ignore when new scripting release is up
9
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
10
+ // @ts-ignore
11
+ WA .ui .modal .closeModal ();
9
12
}
10
13
</script >
11
14
You can’t perform that action at this time.
0 commit comments