@@ -101,10 +101,10 @@ L2:
101
101
set the style of Right to `flex:1;height:100%;display:flex;flex-direction: column`
102
102
103
103
create Controls in Left
104
- set the style of Controls to `flex:1;background:lightgray`
104
+ set the style of Controls to `flex:1;background:lightgray;padding:0 0.5em `
105
105
106
106
create Buttons in Controls
107
- set the style of Buttons to `width:100%;padding:0.5em`
107
+ set the style of Buttons to `width:100%;padding:0.5em 0 `
108
108
109
109
create ContentDiv in Left
110
110
set the style of ContentDiv to `width:100%;height:100%;position:relative`
@@ -140,11 +140,11 @@ L2:
140
140
set attribute `title` of Cycle to `Cycle screens`
141
141
142
142
create Status in Buttons
143
- if Mobile set the style of Status to `height:1em;color:green `
144
- else set the style of Status to `float:right;margin:0.5em 2em 0 0;color:green`
143
+ if Mobile set the style of Status to `height:1em`
144
+ else set the style of Status to `float:right;margin:0.5em 0 0 0;color:green`
145
145
146
146
create ScriptName in Controls
147
- set the style of ScriptName to `display:flex;margin:0.5em 0;padding:0.5em `
147
+ set the style of ScriptName to `display:flex`
148
148
if Mobile set style `display` of ScriptName to `none`
149
149
create Span in ScriptName
150
150
set the style of Span to `flex:15`
153
153
set the style of NameEditor to `flex:85;display:inline-block`
154
154
155
155
create Tabs in Controls
156
- set the style of Tabs to `width:100%;padding-bottom :0.5em;text-align:center`
156
+ set the style of Tabs to `width:100%;padding:0.5em 0 ;text-align:center`
157
157
put the width of Tabs into N
158
158
divide N by 4
159
159
set the elements of SectionButton to 4
229
229
put the content of NameEditor into Name
230
230
if Name is empty
231
231
begin
232
+ gosub to SetStatusRed
232
233
set the content of Status to `No script name has been given`
233
234
go to ResetStatus
234
235
end
252
253
put the content of NameEditor into Name
253
254
if Name is empty
254
255
begin
256
+ gosub to SetStatusRed
255
257
set the content of Status to `No script name has been given`
256
258
go to ResetStatus
257
259
end
@@ -264,12 +266,14 @@ L2:
264
266
if PasswordValid rest post Presentation to `_save/json/` cat Name
265
267
else put Presentation into storage as Name
266
268
put Presentation into Current
269
+ gosub to SetStatusGreen
267
270
set the content of Status to `Presentation '` cat Name cat `' saved`
268
271
put Name into CurrentScriptName
269
272
fork to ResetStatus
270
273
end
271
274
else
272
275
begin
276
+ gosub to SetStatusGreen
273
277
set the content of Status to `Nothing has changed`
274
278
fork to ResetStatus
275
279
end
@@ -281,13 +285,15 @@ L2:
281
285
put the content of NameEditor into Name
282
286
if Name is empty
283
287
begin
284
- alert `Nothing to delete.`
285
- stop
288
+ gosub to SetStatusGreen
289
+ set the content of Status to `Nothing to delete`
290
+ go to ResetStatus
286
291
end
287
292
if confirm `Are you sure you want to delete "` cat Name cat `"?`
288
293
begin
289
294
if PasswordValid rest post to `_delete/json/` cat Name
290
295
else remove Name from storage
296
+ gosub to SetStatusGreen
291
297
set the content of Status to `Script "` cat Name cat `" deleted`
292
298
set the content of NameEditor to empty
293
299
put empty into CurrentScriptName
@@ -487,6 +493,14 @@ CloseBrowser:
487
493
set style `display` of Media to `none`
488
494
stop
489
495
496
+ SetStatusRed:
497
+ set style `color` of Status to `red`
498
+ return
499
+
500
+ SetStatusGreen:
501
+ set style `color` of Status to `green`
502
+ return
503
+
490
504
ResetStatus:
491
505
wait 2
492
506
set the content of Status to ``
0 commit comments