49
49
module FileManModule
50
50
module HelpModule
51
51
variable Mobile
52
+ variable Resources
52
53
variable CDN
53
54
variable LastSavedState
54
55
variable Content
112
113
clear IsHome
113
114
go to Start
114
115
end
115
-
116
+
116
117
if Domain is `iwannashowyou.com` set IsHome else clear IsHome
117
- if IsHome put Protocol cat Domain into CDN
118
+
119
+ ! Not static, so test if the 'dist' folder exists. If so, use it as the CDN
120
+ rest get Item from Protocol cat Domain cat `/rest.php/dist` or go to Start
121
+ put Protocol cat Domain into CDN
118
122
119
- ! If the debug flag is set use admin storage but continue with local CDN
123
+ ! If the debug flag is set use admin storage but local CDN
120
124
get Item from storage as `debug`
121
- if Item is `true` clear IsHome
125
+ if Item is `true` set Static
122
126
123
127
Start:
124
128
iwsy init CDN
@@ -440,6 +444,7 @@ Start:
440
444
if FileManModule is not running
441
445
begin
442
446
print `Load FileMan module`
447
+ print CDN
443
448
rest get Script from CDN cat `/resources/ecs/fileman.txt?v=` cat now
444
449
run Script with FileManPanel as FileManModule
445
450
end
@@ -464,7 +469,6 @@ Start:
464
469
put 0 into N
465
470
gosub to SelectSection
466
471
clear Running
467
- print `Load IWSY`
468
472
iwsy load Player Presentation
469
473
470
474
create UserPanel in Controls
@@ -509,7 +513,7 @@ Start:
509
513
put property `home` of UserRecord into UserHome
510
514
put UserHome cat `/` cat property `id` of UserRecord into UserHome
511
515
put UserHome into storage as `user.home`
512
- iwsy path `/resources /users/` cat UserHome cat `/scripts/`
516
+ ! iwsy path Resources cat ` /users/` cat UserHome cat `/scripts/`
513
517
put property `email` of UserRecord into UserEmail
514
518
get UserPassword from storage as `user.password`
515
519
set attribute `src` of User to CDN cat `/resources/icon/user-loggedin.png`
@@ -532,7 +536,7 @@ Start:
532
536
put property `arg` of Args into Arg
533
537
if Arg includes `.json`
534
538
begin
535
- rest get Presentation from Protocol cat Domain cat `/reaources /users/` cat Arg cat `?v=` cat now
539
+ rest get Presentation from Protocol cat Domain cat `/` cat Resources cat ` /users/` cat Arg cat `?v=` cat now
536
540
gosub to NotifyModules
537
541
iwsy script Presentation
538
542
set style `display` of Player to `block`
@@ -808,9 +812,8 @@ DoOpen:
808
812
! Fill the browser with content from the server
809
813
if Static go to OpenFromStorage
810
814
if UserRecord go to OpenFromUser
811
- ! if IsHome go to OpenFromStorage
815
+ if IsHome go to OpenFromStorage
812
816
813
- OpenFromAdmin:
814
817
gosub to CheckAdminPassword
815
818
if AdminPassword is empty stop
816
819
rest get Files from `list/` cat AdminPassword cat `/scripts?v=` cat now
@@ -905,9 +908,8 @@ SelectFile:
905
908
906
909
if Static go to SelectFromStorage
907
910
if UserRecord go to SelectFromUser
908
- ! if IsHome go to SelectFromStorage
909
-
910
- SelectFromAdmin:
911
+ if IsHome go to SelectFromStorage
912
+
911
913
rest get Presentation from Protocol cat Domain cat `/resources/scripts/` cat File cat `?v=` cat now
912
914
go to UseFile
913
915
@@ -1002,7 +1004,6 @@ DoRunStop:
1002
1004
set Message to object
1003
1005
set property `action` of Message to `running`
1004
1006
send Message to StepsModule
1005
- iwsy init CDN
1006
1007
iwsy run then
1007
1008
begin
1008
1009
gosub to ClearStepsButtons
@@ -1046,4 +1047,4 @@ ClearStepsButtons:
1046
1047
set Message to object
1047
1048
set property `action` of Message to `clear`
1048
1049
send Message to StepsModule
1049
- return
1050
+ return
0 commit comments