Skip to content

Commit 23037f4

Browse files
authored
Merge pull request #125 from easycoder/dev
Doc updates & bug fixes
2 parents 9ef5adb + e25d350 commit 23037f4

File tree

13 files changed

+109
-43
lines changed

13 files changed

+109
-43
lines changed

iwsy/resources/ecs/fileman.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ Show:
126126
put property `email` of UserRecord into Email
127127
get Password from storage as `password`
128128
put property `home` of UserRecord into Home
129-
put Home cat `/` cat property `id` of UserRecord into Home
129+
put Home cat `/` cat property `id` of UserRecord cat `images` into Home
130130
put `users/` cat Home cat `/images` into Home
131131
get CurrentPath from storage as `.filepath`
132132
if CurrentPath is empty put Home into CurrentPath

iwsy/resources/ecs/iwsy.txt

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -376,22 +376,7 @@ L2:
376376
send to FileManModule
377377
end
378378

379-
on click Help
380-
begin
381-
if Running stop
382-
if HelpModule is not running
383-
begin
384-
require js
385-
`https://cdn.jsdelivr.net/gh/easycoder/easycoder.github.io/dist/plugins/showdown.js?v=` cat now
386-
rest get Script from `/resources/ecs/help.txt?v=` cat now
387-
run Script with HelpPanel as HelpModule
388-
end
389-
set style `display` of Player to `none`
390-
set style `display` of FileManPanel to `none`
391-
set style `display` of HelpPanel to `block`
392-
send to HelpModule
393-
end
394-
379+
on click Help go to ShowHelp
395380
on click RunStop go to DoRunStop
396381
on click FullScreen go to RunFullScreen
397382

@@ -468,8 +453,26 @@ L2:
468453
fork to ResetStatus
469454
end
470455
end
456+
457+
get Item from storage as `alreadyrun`
458+
if Item is empty go to ShowHelp
471459
stop
472460

461+
ShowHelp:
462+
if Running stop
463+
if HelpModule is not running
464+
begin
465+
require js
466+
`https://cdn.jsdelivr.net/gh/easycoder/easycoder.github.io/dist/plugins/showdown.js?v=` cat now
467+
rest get Script from `/resources/ecs/help.txt?v=` cat now
468+
run Script with HelpPanel as HelpModule
469+
end
470+
set style `display` of Player to `none`
471+
set style `display` of FileManPanel to `none`
472+
set style `display` of HelpPanel to `block`
473+
send to HelpModule
474+
stop
475+
473476
SavePresentation:
474477
rest post Content to `usave/` cat UserEmail cat `/` cat UserPassword cat `/`
475478
cat `users/` cat UserHome cat `/scripts/` cat Name

iwsy/resources/ecs/user.txt

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@
145145

146146
! Start the user manager
147147
Start:
148-
get Email from storage as `email`
149-
get Password from storage as `password`
148+
get Email from storage as `user.email`
149+
get Password from storage as `user.password`
150150
if Email is empty stop
151151
if Password is empty stop
152152
go to SetupLogin
@@ -171,6 +171,7 @@ ProcessLogin:
171171
if Record is empty go to NoRecord
172172
if property `email` of Record is not EmailInput go to NoRecord
173173
put property `password` of Record into Password
174+
replace `/` with `~` in Password
174175
rest get Validated from `validate/` cat Password cat `/` cat PasswordInput
175176
if Validated is `yes`
176177
begin
@@ -197,13 +198,13 @@ DoLoggedIn:
197198
return
198199

199200
ClearStorage:
200-
put empty into storage as `email`
201-
put empty into storage as `password`
201+
put empty into storage as `user.email`
202+
put empty into storage as `user.password`
202203
return
203204

204205
SetStorage:
205-
put EmailInput into storage as `email`
206-
put PasswordInput into storage as `password`
206+
put EmailInput into storage as `user.email`
207+
put PasswordInput into storage as `user.password`
207208
return
208209

209210
! Register as new user
@@ -249,7 +250,7 @@ ProcessRegistration:
249250
cat `<h1>` cat ConfirmationCode cat `</h1>`
250251
cat `If you did not request this email, please ignore it and no action will be taken.`
251252
cat `</body></html>`
252-
rest post Record to `email`
253+
rest post Record to `user`
253254
set style `display` of ConfirmationDiv to `flex`
254255
set the text of RegisterButton to `Confirm registration`
255256
wait 10 ticks
@@ -328,7 +329,7 @@ ResetPassword2:
328329
cat `<h1>` cat ConfirmationCode cat `</h1>`
329330
cat `If you did not request this email, please ignore it and no action will be taken.`
330331
cat `</body></html>`
331-
rest post Record to `email`
332+
rest post Record to `user`
332333
set style `display` of ResetDiv to `flex`
333334
set style `display` of PasswordDiv to `flex`
334335
set the content of PasswordInput to ``

iwsy/resources/help/about.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
~page:contents:Contents~
2+
3+
## About us
4+
5+
~iwsy~ is a client-size all-JavaScript web application, currently under development by a small independent software development team.
6+
7+
## Contact us
8+
9+
10+
11+
## Technical stuff
12+
13+
The ~iwsy~ user interface is coded entirely in [EasyCoder](https://easycoder.github.io) scripts, which download, compile and run as they are needed. Everything is done in the browser; there is no build process for the web app. A small server-side REST module handles user registration and login and manages files created by users and stored on the server.
14+
15+
There are a little over 3000 lines of code in total. The largest code module (that runs the **Steps** panel opposite) is just over 1000 lines long and typically takes under 50ms to compile. Modules are loaded when they are first needed, so the load time of the web app is around 1.5 seconds (Pingdom Tools). The web app uses about 15MB of heap space while running.
16+
17+
We are keen to collaborate with anyone who may have ideas for improving the website and the range of features it provides. Enquiries should be made in the first instance to the email address given above.

iwsy/resources/help/action-pause.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
~page:contents:Contents~
2+
3+
# The `pause` action
4+
5+
This action pauses the presentation for a given nmber of seconds.
6+
7+
~img:resources/users/2020/160/1/images/quickstart/pause.png:100%~
8+
9+
The **Action**, **Name** and **Label** properties are present for all actions.
10+
11+
The **Duration** property is the time in seconds the pause should take.

iwsy/resources/help/action-transition.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,5 @@ All of these effects apply to text blocks; the first two also apply to blocks th
2828
When the color of text is to be changed, the size values in both **Block** and **Target** must be expressed in the form **#RRGGBB**, where **RRGGBB** carries the hex values of the red, green and blue components of the color.
2929

3030
Fades and other animated effects run at 25 frames/sec, as a compromise between visual smoothness and processing requirements.
31+
32+
Next: ~page:action-pause:Pause~

iwsy/resources/help/addBlock.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

iwsy/resources/help/addContent.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

iwsy/resources/help/addStep.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

iwsy/resources/help/buttons.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
~page:contents:Contents~
2+
3+
# The Buttons panel
4+
5+
Above this Help page, under the banner, is a panel of buttons. The job of each button is as follows:
6+
7+
~img:resources/icon/new.png:{float:left;height:2em;margin-right:1em}~ Start a new presentation. This clears the workspace. If you have unsaved work it will prompt you to save it.
8+
9+
~img:resources/icon/open.png:{float:left;height:2em;margin-right:1em}~ Open a saved presentation. This displays a list of all presentations and lets you select one. Note that if you are not a registered user, presentations will be saved into your browser's private space. For registered users they are saved to the ~iwsy~ website, into a space allocated to that user.
10+
11+
If you have unsaved work you will be prompted to save it before opening the list.
12+
13+
~img:resources/icon/save.png:{float:left;height:2em;margin-right:1em}~ Save your current work. It will be saved using whatever name is shown in the **Script name** box below the buttons. If this box is empty you will be prompted for a name. Files all have ~m:.json~ extensions; if this is omitted it will be added.
14+
15+
~img:resources/icon/trash.png:{float:left;height:2em;margin-right:1em}~ Delete the current presentation. You will be prompted to confirm before the delete goes ahead.
16+
17+
~img:resources/icon/fileman.png:{float:left;height:2em;margin-right:1em}~ Open the image manager. This shows you all the images you have uploaded to our server. If you are not registered, this button is non-operational.
18+
19+
~img:resources/icon/run.png:{float:left;height:2em;margin-right:1em}~ Run your presentation. A player is created in the spacce currently occupied by this Help page and the presentation runs without manual intervention. The button changes to ~img:resources/icon/runstop.png:icon~. If you click this the presentation will stop.
20+
21+
~img:resources/icon/fullscreen.png:{float:left;height:2em;margin-right:1em}~ Run your presentation in full-screen mode. This is the mode you will use when connected to an overhead projector, for example.
22+
23+
In fullscreen mode the presentation waits for a mouse click or a button press. A mouse click or either of the space or right-arrow keys will cause the presentation to start in manual mode, where it stops after each visual change and waits for you to click or press again. If you press the Enter key the presentation will run according to the timing given by its individual steps. You can interrupt this my clicking or by pressing space or right-arrow.
24+
25+
In some cases the browser will report the screen size incorrectly and some backgrounds will not show properly; if this happens it's best to select full-screen mode in your browser before clicking this button.
26+
27+
~img:resources/icon/help.png:{float:left;height:2em;margin-right:1em}~ Display this help at the page you were last viewing.
28+
29+
~img:resources/icon/trash.png:{float:left;height:2em;margin-right:1em}~ Login or Register. This displays the ~page:users:Login panel~.

iwsy/resources/help/contents.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
1-
~page:iwsy:Home~
1+
~page:iwsy:Home and Introduction~
22

33
# ~iwsy~ Help - Contents
44

55
~page:quickstart:Quick-start tutorial~ **Beginners start here!**
66

77
~page:users:User registration and login~
88

9-
~page:project:The Project panel~
10-
11-
~page:start:Starting a project~
12-
13-
~page:addStep:Adding a step~
9+
~page:buttons:The Buttons panel~
1410

15-
~page:addBlock:Adding a block~
11+
~page:project:The Project panel~
1612

17-
~page:addContent:Adding content~
13+
~page:about:About us, contacts etc.~
1814

1915
## Actions
2016

@@ -29,3 +25,5 @@
2925
~page:action-crossfade:The **crossfade** action~
3026

3127
~page:action-transition:The **transition** action~
28+
29+
~page:action-pause:The **pause** action~

iwsy/resources/help/iwsy.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,18 @@ The basic features of ~iwsy~ are:
2222
- Built-in help - what you're reading
2323
- A ~page:quickstart:quick-start tutorial~
2424

25+
## Background
26+
27+
~iwsy~ started with a need to embed a slide show in a web page, but rather than just a sequence of pictures I wanted something between that and a video. Videos are time-consuming to make and almost impossible to alter when changes happen to the things being described. Presentation packages such as PowerPoint, on the other hand, lack extensive animation features and are hard to embed in a web page. It seemed to me there was room between the two for a new type of product, and once the idea took hold it was hard to put down. It coincided with the Coronoavirus pandemic, which enforced solitude at home and provided the time for development to take place.
28+
29+
Much of my previous work in recent years has been in building websites, often of a specialized nature with unusual interactive needs. Not having an exceptional intellect I have difficulty with complexity and this has become something of an obsession over the years. Rather than face the issue directly I devised a programming language suited to those who, like myself, regard excessive complexity as something to be avoided at all costs. The language, called EasyCoder, is itself written in JavaScript and has been applied to a number of web projects. I have yet to find a user interface that it cannot handle.
30+
31+
EasyCoder takes plain text scripts and compiles them in the browser. This is very quick, typically taking less than 50ms for a 1000-line script. EasyCoder scripts tend to be much shorter than their JavaScript equivalents, though by how much depends on the work being done. More importantly, they are readable by any intelligent person who understands the target domain. The basics of the language can be picked up in a day, which compares with the 3 or 4 months needed to learn React or Angular on top of JavaScript itself. So the long term maintenance prospects of an EasyCoder website such as ~iwsy~ are good as there will always be someone around who can learn it quickly.
32+
33+
The other main advantage of EasyCoder is that it doesn't have a build process. Scripts are loaded directly into the browser and compiled there. The only build tool needed is a text editor.
34+
35+
So that's the environment for ~iwsy~. All of the website UI is coded in EasyCoder. The presentation engine itself is just under 1000 lines of vanilla JavaScript and can be used independently of the ~iwsy~ website. This ensures performance is as good as it can get without moving to WebAssembly, though the latter is always an option.
36+
37+
The project is hosted on GitHub as part of EasyCoder and enquiries are welcome from other programmers who are interested in contributing. The range of transition effects is currently limited so there is considerable scope for extension. An outline plug-in mechanism is also present so it should be possible to enhance the system without major disruption each time.
38+
2539
~page:contents:Contents~

iwsy/resources/help/quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Click the **Blocks** button over in the right-hand panel, then click the ~img:/r
1414

1515
~img:resources/users/2020/160/1/images/quickstart/newblock.png:100%~
1616

17-
Most of these default values are fine as they are; they describe a block that occupies the whole window area. Let's just change the ~m:name~ property to ~m:background~ and the ~m:background~ property to ~m:url('resources/users/2020/160/1/images/SemoigoDawn.jpg')~. The effect will be to display a full-size image. This is what the panel should look like now:
17+
Most of these default values are fine as they are; they describe a block that occupies the whole window area. Let's just change the ~m:name~ property to ~m:background~ and the ~m:background~ property to ~m:url('resources/users/2020/160/1/images/SemoigoDawn.jpg')~. When the presentation runs, the effect will be to display a full-size image. This is what the panel should look like now:
1818

1919
~img:resources/users/2020/160/1/images/quickstart/first-block.png:100%~
2020

0 commit comments

Comments
 (0)