mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-01 00:42:49 +08:00
Channel-scoped file browser reachable via right-click on a channel: navigate directories, create folders, rename/delete, and upload/download files. Backed by tsclientlib's built-in download_file/upload_file (which already handles the ftinitdownload/ftinitupload -> TCP data-port dance), plus raw ftgetfilelist/ftcreatedir/ftdeletefile/ftrenamefile commands for everything else. Downloads/uploads are buffered whole in memory and base64-relayed over the existing stdin/WebSocket text protocol - fine for a channel filebase's typical file sizes, not meant for huge transfers. Verified against the real server: upload/list/download round-trip reaches the server correctly (list succeeds, upload correctly surfaces the guest account's missing permission via the new FiletransferFailed handling instead of hanging or crashing). Demo mode gets a small in-memory per-channel filesystem so the file browser is fully interactive in the GitHub Pages demo too.
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some Oxlint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Oxc
- @vitejs/plugin-react-swc uses SWC
React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
Expanding the Oxlint configuration
If you are developing a production application, we recommend enabling type-aware lint rules by installing oxlint-tsgolint and editing .oxlintrc.json:
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["react", "typescript", "oxc"],
"options": {
"typeAware": true
},
"rules": {
"react/rules-of-hooks": "error",
"react/only-export-components": ["warn", { "allowConstantExport": true }]
}
}
See the Oxlint rules documentation for the full list of rules and categories.