Skip to content

Commit c3ec054

Browse files
authored
Merge pull request #73 from easycoder/dev
Cosmetic changes
2 parents bc634e1 + 7445e5c commit c3ec054

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

mostrami/resources/ecs/mostrami.txt

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ L2:
101101
set the style of Right to `flex:1;height:100%;display:flex;flex-direction: column`
102102

103103
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`
105105

106106
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`
108108

109109
create ContentDiv in Left
110110
set the style of ContentDiv to `width:100%;height:100%;position:relative`
@@ -140,11 +140,11 @@ L2:
140140
set attribute `title` of Cycle to `Cycle screens`
141141

142142
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`
145145

146146
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`
148148
if Mobile set style `display` of ScriptName to `none`
149149
create Span in ScriptName
150150
set the style of Span to `flex:15`
@@ -153,7 +153,7 @@ L2:
153153
set the style of NameEditor to `flex:85;display:inline-block`
154154

155155
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`
157157
put the width of Tabs into N
158158
divide N by 4
159159
set the elements of SectionButton to 4
@@ -229,6 +229,7 @@ L2:
229229
put the content of NameEditor into Name
230230
if Name is empty
231231
begin
232+
gosub to SetStatusRed
232233
set the content of Status to `No script name has been given`
233234
go to ResetStatus
234235
end
@@ -252,6 +253,7 @@ L2:
252253
put the content of NameEditor into Name
253254
if Name is empty
254255
begin
256+
gosub to SetStatusRed
255257
set the content of Status to `No script name has been given`
256258
go to ResetStatus
257259
end
@@ -264,12 +266,14 @@ L2:
264266
if PasswordValid rest post Presentation to `_save/json/` cat Name
265267
else put Presentation into storage as Name
266268
put Presentation into Current
269+
gosub to SetStatusGreen
267270
set the content of Status to `Presentation '` cat Name cat `' saved`
268271
put Name into CurrentScriptName
269272
fork to ResetStatus
270273
end
271274
else
272275
begin
276+
gosub to SetStatusGreen
273277
set the content of Status to `Nothing has changed`
274278
fork to ResetStatus
275279
end
@@ -281,13 +285,15 @@ L2:
281285
put the content of NameEditor into Name
282286
if Name is empty
283287
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
286291
end
287292
if confirm `Are you sure you want to delete "` cat Name cat `"?`
288293
begin
289294
if PasswordValid rest post to `_delete/json/` cat Name
290295
else remove Name from storage
296+
gosub to SetStatusGreen
291297
set the content of Status to `Script "` cat Name cat `" deleted`
292298
set the content of NameEditor to empty
293299
put empty into CurrentScriptName
@@ -487,6 +493,14 @@ CloseBrowser:
487493
set style `display` of Media to `none`
488494
stop
489495

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+
490504
ResetStatus:
491505
wait 2
492506
set the content of Status to ``

0 commit comments

Comments
 (0)