Commit graph

161 commits

Author SHA1 Message Date
Ashish
a82ffa542f Fix: Spelling of a comment in server/check_output_directory.js 2021-04-14 19:30:59 +05:30
lovasoa
295306fe1a
Add some translations 2021-04-02 09:28:06 +02:00
Nneka
89f2ef8e8c fix translations 2021-04-01 18:46:24 -07:00
Nneka
4439457520 add list of recent boards to home page 2021-04-01 09:09:38 -07:00
ophir
ff66e8998a Sort translations in alphabetical order 2021-03-27 14:27:42 +01:00
luandro
879aab3fbc Fix Portuguese translations 2021-03-27 10:19:46 -03:00
luandro
5c6f468037 Add Portuguese translations 2021-03-27 09:59:34 -03:00
Russ Tedrake
d5111afdc8 Adds support for query parameter "hideMenu"
This adds the ability to load a board with the menu hidden; it provides a form of "read-only" mode, but the key bindings are still active.
Use with, e.g.:
http://localhost:5001/boards/qYAZyGdym6HqjnfaGI4yNtpdx0IMHd9qp6kaJPwbJqE-?hideMenu=true

The alternative, proposed in #116, was to remove the menu completely, but this would require more substantial changes to board.js (which hangs on "Loading..." if the menu is removed).
Related to #150
Related to #116

Adds support for query parameter "hideMenu"

This adds the ability to load a board with the menu hidden; it provides a form of "read-only" mode, but the key bindings are still active.
Use with, e.g.:
http://localhost:5001/boards/qYAZyGdym6HqjnfaGI4yNtpdx0IMHd9qp6kaJPwbJqE-?hideMenu=true

The alternative, proposed in #116, was to remove the menu completely, but this would require more substantial changes to board.js (which hangs on "Loading..." if the menu is removed).
Related to #150
Related to #116
2021-02-17 08:35:22 -05:00
Ophir LOJKINE
5bc3f02dae Revert "Adds support for query parameter "hideMenu" (#170)"
This reverts commit 71d8be5df1.
2021-02-17 12:09:41 +01:00
Russ Tedrake
71d8be5df1
Adds support for query parameter "hideMenu" (#170)
This adds the ability to load a board with the menu hidden; it provides a form of "read-only" mode, but the key bindings are still active.
Use with, e.g.:
http://localhost:5001/boards/qYAZyGdym6HqjnfaGI4yNtpdx0IMHd9qp6kaJPwbJqE-?hideMenu

The alternative, proposed in #116, was to remove the menu completely, but this would require more substantial changes to board.js (which hangs on "Loading..." if the menu is removed).
Related to #150
Related to #116
2021-02-17 12:05:38 +01:00
lovasoa
da102f8190
Fix "TypeError: Cannot read property 'x' of undefined" 2021-02-08 15:48:11 +01:00
Ilya Shabalin
edf31cd6c2
Auto white-out with a finger when using apple stylus (#167)
When using an iPad with an apple stylus, finger touches now trigger the whiteout tool.
This behavior can be disabled by setting the environment variable AUTO_FINGER_WHITEOUT=disabled

* Auto white-out with a finger when using stylus

* Add AUTO_FINGER_WHITEOUT config variable

* Use local variable to remember if stylus was used and make behavior configurable

* Delete "stylus" property

* Make AUTO_FINGER_WHITEOUT on by default

Co-authored-by: Ophir LOJKINE <pere.jobs@gmail.com>

* Delete parseBool, add note about iPad/Pencil

Co-authored-by: ishabalin <ishabalin@apple.com>
Co-authored-by: Ophir LOJKINE <pere.jobs@gmail.com>
2021-02-08 11:28:24 +01:00
lovasoa
70ceaac242
Prevent multiple board save operation to happen simultaneously 2021-02-07 19:54:14 +01:00
lovasoa
de9f9725e9
Use the modern class syntax on the server 2021-02-07 19:22:12 +01:00
lovasoa
53c61ec16e
Reformat all the server code with prettier 2021-02-07 19:02:56 +01:00
lovasoa
a76bbeced3
Add some documentation and type information 2021-02-07 17:52:15 +01:00
lovasoa
da5d9be4e5
Print error stack in logs when on preview errors 2021-02-06 20:45:08 +01:00
ophir
9285204284 set MIN_NODE_VERSION to 10.0
WBO does not work with node 8
2021-01-31 19:44:49 +01:00
ophir
fbc66148d3 Fix compatibility with node 10 2021-01-31 19:41:31 +01:00
ophir
8b161e9db5 Check the permissions on the history dir on start
Fixes https://github.com/lovasoa/whitebophir/issues/164
2021-01-31 18:24:09 +01:00
Ingo Blechschmidt
2e0a901998
Allow for listening only on 127.0.0.1 (or some other address) (#161) 2021-01-13 10:02:03 +01:00
lovasoa
dc72feec10
Fix empty page display on /boards
See #153
2020-11-28 21:30:29 +01:00
lovasoa
586d3e4625
Updated dependencies 2020-11-17 11:20:14 +01:00
hophat
19c98038ec
update json vietnam language (#145)
* update json vietnam language 

update vietnam language

* Update server/translations.json

Co-authored-by: Ophir LOJKINE <pere.jobs@gmail.com>

Co-authored-by: Ophir LOJKINE <pere.jobs@gmail.com>
2020-11-17 10:56:31 +01:00
Ophir LOJKINE
e858a3b178 Prevent proxies from caching polyfills` 2020-11-10 16:08:11 +01:00
ophir
9f36edb93f fix mistake in french translation 2020-10-30 22:36:50 +01:00
Vasyl Ostrovskyi
dc18066670
Ukrainian translation (Українська) 2020-09-13 09:58:10 +03:00
Ophir LOJKINE
8c001ca0e8 Fix board preview
A bug was introduced in 50da719bda
most elements do not have a deltax and deltay property

See #97
2020-09-01 14:33:20 +02:00
Ophir LOJKINE
b1c00145f8 Allow 50% more points per second 2020-08-11 18:16:24 +02:00
ovari
d808412eb9
Update the hungarian translation (#105) 2020-07-07 12:04:11 +02:00
Ophir LOJKINE
f81e72d9d9 Update the software license in translations
WBO switched from GPL to AGPL two years ago already.
2020-07-07 09:50:24 +02:00
Ophir LOJKINE
60a16a1719 fix french translation 2020-07-07 09:48:07 +02:00
ovari
04c9206776
Default en then alphabetically, hu locale, tidy-ups (#103)
* Update translations.json

Sort locale alphabetically

* Update translations.json

Default language `en` first, then alphabetically.

* Update translations.json

hu (Hungarian - magyar) locale

* Update translations.json

`en` does not have a space before the exclamation mark (!) and a few other tidy-ups.

* Update translations.json
2020-07-07 09:41:31 +02:00
Ophir LOJKINE
b8a95f46b8 Add polyfills for es2017, es2018, es2019
Fixes #100
2020-07-03 10:37:13 +02:00
Ophir LOJKINE
50da719bda
Move (#97)
* Add mover skeleton

Atm it is just the eraser with new icons and renamed variables

* The mover not detect the object to move

* We can move ellipses and rectangles

* The mover now moves all types of objects

* Add the move everything functionality

* Aesthetic changes

* Replace the use of const and let with classic var

* Undo few commits

* Start the transform-translate implementation

* Mover now moves with transform translate

* Put the function to get the translation matrix in the Tools

* Shapes (ellipse, line, pencil, rect, and text) now properly load translate coords

* Add the transform-translate to the createSVG functions

* Done movement using transform-translate

* Fix parenthesization bug in the SVG create

* Fix comment about mover states

* Undo translation loading from Ellipse, Mover, Pencil, and Text tools

* Makes the board send update message to the mover as needed

* Remove the old code from the line tool too

* Simplify the mover tool

See #86

* update the mover icon

* Merge the mover and the hand tools

* Improve preview for pre-rendered elements

* v1.6.0

Co-authored-by: Paolo Bolzoni <paolo.bolzoni1@studenti.unipr.it>
2020-06-21 23:48:32 +02:00
ophir
3b9a2e7259 Fix translations for "white-out" in es and it 2020-06-21 13:08:39 +02:00
ophir
c516fa448c add translations for grid 2020-06-21 13:06:38 +02:00
ophir
038e6d5259 Added "free online whiteboard" to the main title 2020-06-21 12:56:31 +02:00
ophir
d83461898c add an italian translation
Improve the spanish translation and
2020-06-21 12:46:40 +02:00
ophir
9b4649e58d Add a spanish translation
Thanks to @beccobunsen

See #94
2020-06-20 16:48:49 +02:00
Paolo Bolzoni
da5f40a75e
Pass over the string only once while escaping html special chars (#82)
Co-authored-by: Paolo Bolzoni <paolo@cagla.jp>
2020-05-27 10:11:30 +02:00
Ophir LOJKINE
3af91ce7ab Allow parentheses in board names 2020-05-15 14:09:39 +02:00
ophir
b77d26a9e8 Add a square as a secondary tool for the rectangle 2020-05-14 00:02:14 +02:00
finnboeger
740246528f
Add a whiteout tool as the secondary function of the pencil tool (#47)
* added whiteout icon made by Freeplk on flaticon.com

* added whiteout fluid icon (public domain).

* Added whiteout tool as secondary function of pencil tool.

Co-authored-by: Robert Beach <rdbeach@gmail.com>

* shrink icon width using stroke

* shrink whiteout icon properly

* shrink whiteout fluid icon

* reduce number of allowed messages

* simplify

* remove layer code

* renmove show/hide marker code

* change white to #ffffff

* make toggle function compatible with current implementation

* Revert changes unrelated to the whiteout tool

* Refactor secondary tool logic between ellipse and pencil

* Add translations for the whiteout pen

* Fix tests

Co-authored-by: Robert Beach <rdbeach@gmail.com>
Co-authored-by: ophir <pere.jobs@gmail.com>

(@rdbeach)
2020-05-13 22:15:11 +02:00
ophir
7cc186be80 Officially support node 8 2020-05-09 13:13:36 +02:00
finnboeger
3a85e45439
Add a svg export with proper rounding (#58)
* make live version render single-point paths the same as preview does

* implemented smoothing in server side rendering

* separate preview from export

* ensure correct handling of paths with only one child

* break out rendering of 3rd point and up into separate function

* changed test for 2 points to math current implementation and added a test for a bezier curve with 3 lines

* deduplicate code to extrapolate points for bezier curves

* fix merge

* Factor more code between the client and the server

Completely remove the straight line approximation foor paths

Vastly improve preview performance

* Add support for opacity in preview

* Stream board previews to the browser

Previously, svg board previews were generated in memory
and then pushed to the client.

They are now streamed to the client without blocking the main thread.

# Performance

## Before

$ ab -n 30 -c 15 http://localhost:8080/preview/ic3
This is ApacheBench, Version 2.3 <$Revision: 1843412 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient).....done

Server Software:
Server Hostname:        localhost
Server Port:            8080

Document Path:          /preview/ic3
Document Length:        14352691 bytes

Concurrency Level:      15
Time taken for tests:   19.499 seconds
Complete requests:      30
Failed requests:        0
Total transferred:      430588920 bytes
HTML transferred:       430580730 bytes
Requests per second:    1.54 [#/sec] (mean)
Time per request:       9749.374 [ms] (mean)
Time per request:       649.958 [ms] (mean, across all concurrent requests)
Transfer rate:          21565.33 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.1      0       0
Processing:   727 8885 1561.6   9220    9817
Waiting:      718 5380 2668.8   5569    9549
Total:        727 8885 1561.6   9220    9817

Percentage of the requests served within a certain time (ms)
  50%   9220
  66%   9239
  75%   9245
  80%   9248
  90%   9560
  95%   9811
  98%   9817
  99%   9817
 100%   9817 (longest request)

## After

$ ab -n 30 -c 15 http://localhost:8080/preview/ic3
This is ApacheBench, Version 2.3 <$Revision: 1843412 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient).....done

Server Software:
Server Hostname:        localhost
Server Port:            8080

Document Path:          /preview/ic3
Document Length:        14352687 bytes

Concurrency Level:      15
Time taken for tests:   17.647 seconds
Complete requests:      30
Failed requests:        0
Total transferred:      430588020 bytes
HTML transferred:       430580610 bytes
Requests per second:    1.70 [#/sec] (mean)
Time per request:       8823.254 [ms] (mean)
Time per request:       588.217 [ms] (mean, across all concurrent requests)
Transfer rate:          23828.86 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.1      0       0
Processing:   719 8212 1440.6   8657    8810
Waiting:      701 4666 2324.8   4788    8769
Total:        719 8212 1440.6   8657    8811

Percentage of the requests served within a certain time (ms)
  50%   8657
  66%   8670
  75%   8691
  80%   8790
  90%   8802
  95%   8808
  98%   8811
  99%   8811
 100%   8811 (longest request)

* Write the element id and opacity only when needed

* Fix a bug in wbo_pencil_point

* Rework the integration tests for the pencil tool

* Test server-side rendering in integration tests

* Remove unused function

* Remove unused id fallback

* set return types

* fix rectangle

* set fill for rect in stylesheet instead

Co-authored-by: Ophir LOJKINE <pere.jobs@gmail.com>
2020-05-08 21:15:39 +02:00
finnboeger
edace1c293
add option to block tools (#66)
* add option to block tools

* use tool name instead of computing an id

Co-authored-by: Ophir LOJKINE <ophir.lojkine@auto-grid.com>

* require comma separated list as input of blocked tools environment variable

Co-authored-by: Ophir LOJKINE <ophir.lojkine@auto-grid.com>

* Log attempts to use blocked tools

Co-authored-by: Ophir LOJKINE <ophir.lojkine@auto-grid.com>

* fix syntax

* require tool names to not have a comma in them

* Update server/configuration.js

Co-authored-by: Ophir LOJKINE <pere.jobs@gmail.com>
2020-05-08 12:19:52 +02:00
Ophir LOJKINE
e6811518dc Add missing allowed board name characters 2020-05-07 22:43:17 +02:00
Ophir LOJKINE
6f9ebf141c Rework the code for preview handling
- use promises instead of callbacks
  - avoid polluting stderr, and instead log rendering time in the standard log format
 - cache rendered boards for only 30 seconds
2020-05-07 22:29:48 +02:00
Ophir LOJKINE
fb93f09954 Merge branch 'master' of github.com:lovasoa/whitebophir 2020-05-07 22:10:52 +02:00