feat(web-service): allow custom access token with persisted port and localized start errors
- Persist user-supplied access token and last-used port in app_metadata, falling back to defaults when unset - Atomically guard concurrent starts via compare_exchange with RAII rollback of the running flag - Wrap token and port persistence in a single SeaORM transaction to prevent partial writes - Classify bind errors (port in use, permission denied, address unavailable, invalid address) into stable i18n keys - Localize start-failure messages across all 10 supported languages
This commit is contained in:
@@ -1857,7 +1857,17 @@
|
||||
"copy": "复制",
|
||||
"addressLabel": "访问地址",
|
||||
"tokenLabel": "访问 Token",
|
||||
"tokenHint": "Web 客户端首次访问时需输入此 Token"
|
||||
"tokenHint": "Web 客户端首次访问时需输入此 Token",
|
||||
"tokenPlaceholder": "留空则自动生成",
|
||||
"regenerate": "重新生成",
|
||||
"errors": {
|
||||
"alreadyRunning": "Web 服务已在运行",
|
||||
"invalidAddress": "主机或端口格式无效",
|
||||
"portInUse": "端口 {port} 已被占用,请关闭占用该端口的程序或更换其他端口",
|
||||
"permissionDenied": "权限不足,请使用 1024 以上的端口,或以更高权限运行",
|
||||
"addressUnavailable": "该地址在本机不可用",
|
||||
"bindFailed": "绑定地址失败"
|
||||
}
|
||||
},
|
||||
"DirectoryBrowser": {
|
||||
"title": "浏览目录",
|
||||
|
||||
Reference in New Issue
Block a user