aboutsummaryrefslogtreecommitdiff
path: root/vfs
AgeCommit message (Collapse)Author
2024-09-15all: commit all generate JavaScript filesShulhan
This is to simplify development on third party where they can clone and include the file directly without installing or running anything to build the files.
2023-11-15vfs: set the crumb style without wrapShulhan
In case the directory is too long, the name can span multiline, break automatically by browser and overlap with previous crumbs.
2023-11-15vfs: make the path and list tab-ableShulhan
Pressing tab key should iterate through crumb in the path and in the item in the list.
2023-11-11vfs: add function "filter"Shulhan
The filter function filter and display the list of node by its name.
2023-10-24all: fix all linter warnings from tsc and eslintShulhan
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
2023-10-24all: reformat all filesShulhan
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.
2022-03-15all: re-licensing wui under GPL 3.0 or laterShulhan
See https://kilabit.info/journal/2022/gpl/ for more information.
2021-10-20vfs: add class attribute to path and list componentsShulhan
The VFS path component now have class "wui_vfs_path" and the list component have class "wui_vfs_list".
2021-09-05vfs: refactor example to use TypeScript loaded with type="module"Shulhan
2021-08-30vfs: remove WuiVfsNode in favor of WuiVfsNodeInterfaceShulhan
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.
2021-08-29all: remove and ignore generate JavaScript filesShulhan
2021-08-29vfs: export the WuiVfsNode classShulhan
While at it, fix the return type of Open and OpenNode on WuiVfsOptions to be Promise.
2021-08-29vfs: add handler OpenNode to WuiVfsOptionsShulhan
The OpenNode define an handler that will be called when a node is clicked from the WuiVfsList.
2021-08-29vfs: add content_type to WuiVfsNodeInterface and use single mod_timeShulhan
2021-08-29editor: always decode the node content from base64Shulhan
2021-08-29vfs: simplify the handlers on WuiVfsOptionsShulhan
Previously, the WuiVfsOptions contains two handlers: ListNodes to retrieve list of files and OnClickNode for triggering changes when user click a path or item in the list. This changes simplify it into single handler: Open, which accept path and boolean is_dir.
2021-08-28all: use the WuiResponseInterface for non-void return typeShulhan
This commit changes the WuiVfsOptions.istNodes and WuiEditorOptions.OpenFile to WuiResponseInterface. WuiResponseInterface define an interface that will be returned by function or method with non-void type. If the function/method success, the code should be set to 200 (equal to HTTP OK), and the data will contains the expected data for that function. If the function/method call failed, the code should be set to other value beside 200 with a message describe why its failed.
2021-08-28all: refactoring to follow the coding style in READMEShulhan
* Use snake_case for field, variable, HTML ID, and CSS class names. * Use camelCase for class, interface, type, function, or method names. * An exported type or class. interface, type, method, or function name MUST start with an upper-case letter. * An exported class, type, interface, or function MUST be prefixed with "Wui".
2021-08-28vfs: rename all fields and variables to use snake caseShulhan
2021-08-27vfs: rename onClickPath to OpenPathShulhan
2021-08-27vfs: add parameter is_dir to OnClickNode handlerShulhan
The is_dir parameter indicated that the node is a directory.
2021-08-23vfs: fix the path when clicking crumb's pathShulhan
While at it, change the border to silver and use console.error for logging an error message.
2021-08-23vfs: use different background color for directoryShulhan
If the node is directory the background color is cornsilk, otherwise the background color is white.
2021-08-15vfs: make the is_dir field on IVfsNode to be optionalShulhan
2021-08-12vfs: add event OnClickNodeShulhan
The OnClickNode event will be send when user click non-directory files.
2021-07-31all: add license file and headersShulhan
2021-07-26vfs: implement virtual file system explorerShulhan
The vfs.js implement the web user interface for virtual file system explorer.