| Age | Commit message (Collapse) | Author |
|
|
|
Sometimes we got an issue where pressing enter may cause the editor
being saved without pressing Control key.
|
|
The gap make us confuse between space and padding.
|
|
|
|
|
|
The execCommand has been deprecated according to Mozilla Developer
Network.
This changes require the tsc target set to es2019 to be able to
use the string trimEnd method.
[1]: https://developer.mozilla.org/en-US/docs/Web/API/document/execCommand
|
|
In case the directory is too long, the name can span multiline, break
automatically by browser and overlap with previous crumbs.
|
|
|
|
Using CTRL+s sometimes cause pressing s only trigger the save.
|
|
Pressing tab key should iterate through crumb in the path and in the
item in the list.
|
|
The filter function filter and display the list of node by its name.
|
|
|
|
This is to make the content that we save and the content on editor
is always same.
|
|
On each paste event, re-render the line number in case the clipboard
contains new lines.
|
|
|
|
Using multiple lines of content editable is hard, especially when
involving selection, deletion, and managing undo-redo history.
|
|
Previously, mouse selection only works on single line.
This changes, make mouse selection works on multiple lines, also when
user press CTRL+C we reformat the copied data to add line-feed so we
can split later during paste.
|
|
If user select text and press delete key, the selected text should be
deleted.
|
|
|
|
Instead of binding key up and down on each line for handling, bind it to
document.
|
|
In this changes we introduce eslint as our linter for TypeScript and
update our tsconfig to be more strict.
The ".eslintrc.yaml" and "tsconfig.json" is taken from golang/website
repository [1].
[1]: https://cs.opensource.google/go/x/website
|
|
I cannot remember how I reformat those files previously, probably without
any tools.
This changes reformat the TypeScript files using prettier and HTML files
using js-beautify.
|
|
|
|
This remove the insecure option since in the browser, the WebSocket
client does not have an option to ignore invalid certificate (the user
must accept the invalid certificate by them self).
|
|
See https://kilabit.info/journal/2022/gpl/ for more information.
|
|
The VFS path component now have class "wui_vfs_path" and the list
component have class "wui_vfs_list".
|
|
When delete key pressed on line, it will delete single character or
join the current line with the next line.
|
|
The ClearSelection method clear the selection indicator on user
interface.
|
|
A response is defined as broadcast from server when the ID is 0.
|
|
The WebSocket client have only one method "Send" that send request
to the server based on predefined format WuiWebSocketRequest in
synchronous way, which means it will wait for the response and pass it
back to the caller based on the request ID.
|
|
It is up to the user on how to set the background color of any elements,
not the library.
|
|
If the "is_hint_toggled" is true, the hint text will be displayed
by default on first render, instead of hidden.
While at it, add 2px to the top margin of the hint element to make it
separatable from the input element.
|
|
Instead of printing the new value using console.log, display it as text
below the example.
|
|
While at it, set the input number "step" option to "any".
|
|
The input number, select, and string now have method Set to set the
current value.
|
|
This fix the notification displayed below other element, while it
should be on top.
|
|
The input options for string, number, and select now have two additional
options: "class_label" and "class_input".
The "class_label" option will add custom CSS class to the input label.
The "class_input" option will add custom CSS class to the input group.
|
|
A label on input can be a string or another HTMLElement.
|
|
|
|
|
|
|
|
The WuiInputCheckboxes class can create an HTML input for selecting one
or more item using checkbox.
The class require the following options: label, name, and options; and
optionally id, hint, is_disabled, and onChangeHandler.
The onChangeHandler receive all checked values.
|
|
The WuiInputSelect create an HTML input for selecting one more item.
|
|
The WuiInputString create an HTML input for string with predefined
options.
The required options are "label" and "value".
|
|
The WuiInputNumber create an HTML input that allow number only, with
optional max and min options.
The required options is "label" and "value".
Format of generated HTML output,
<div [id=${id}] class="${WUI_INPUT_NUMBER_CLASS}">
<div>
<label class="${WUI_INPUT_NUMBER_CLASS_LABEL}">${label}</label>
<input
class="${WUI_INPUT_NUMBER_CLASS_INPUT}"
[max=${max}]
[min=${min}]
[disabled=${is_disabled}]
value=${value}
>
<span class="${WUI_INPUT_NUMBER_CLASS_HINT_TOGGLER}">i </span>
</div>
<div class="${WUI_INPUT_NUMBER_CLASS_HINT}">${hint}</div>
</div>
User can set onChangeHandler to receive new value when the value
changes and valid; otherwise, if the value is invalid, the input
background will changes accordingly.
|
|
In order to minimize dependencies with require.js, we set the "lib",
"target" and "module" to es2015 and "esModuleInterop" to true to
allow module importable on browser.
|
|
|
|
Since WuiVfsNode does not have any methods then and the constructor
only initialize the value to zero, we remove the type and use the
interface instead.
|
|
|
|
|