mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-25 14:08:45 +00:00
Merge pull request #156 from shumaiOne/feat/i18n-webui
feat(webui): add i18n support using paraglide-js
This commit is contained in:
+2
-1
@@ -1 +1,2 @@
|
||||
src/generated/** linguist-generated
|
||||
packages/db/src/generated/** linguist-generated
|
||||
packages/webui/paraglide/** linguist-generated
|
||||
|
||||
+4
-1
@@ -3,4 +3,7 @@ dist
|
||||
.bun
|
||||
src/generated
|
||||
packages/db/src/generated
|
||||
src/ui/components/ui
|
||||
src/ui/components/ui
|
||||
packages/webui/paraglide
|
||||
*.md
|
||||
**/*.md
|
||||
@@ -408,3 +408,51 @@ We use **pino** for logging. Always use **structured logging** to ensure logs ar
|
||||
logger.info({ userId: user.id, projectId }, 'Project deleted successfully')
|
||||
```
|
||||
- **Levels**: Use appropriate levels: `debug`, `info`, `warn`, `error`.
|
||||
|
||||
## Internationalization (i18n)
|
||||
|
||||
All user-facing text in the WebUI (`packages/webui`) MUST be internationalized using **Paraglide JS**. Hardcoded text in UI components is strictly forbidden.
|
||||
|
||||
### Message Definition
|
||||
|
||||
1. Define your English message strings in [packages/webui/messages/en.json](packages/webui/messages/en.json).
|
||||
2. Define the corresponding Chinese translation strings in [packages/webui/messages/zh.json](packages/webui/messages/zh.json).
|
||||
3. Keys should use `snake_case`.
|
||||
|
||||
Example (`en.json`):
|
||||
|
||||
```json
|
||||
{
|
||||
"my_key": "My English Text"
|
||||
}
|
||||
```
|
||||
|
||||
### Compilation
|
||||
|
||||
When you add or update translation keys, you must compile them to regenerate the type-safe functions:
|
||||
|
||||
```bash
|
||||
# Compile once (generates type-safe TS/JS functions on disk)
|
||||
bun run i18n:compile
|
||||
|
||||
# Watch and recompile on change during development
|
||||
bun run i18n:watch
|
||||
```
|
||||
|
||||
### Usage in Components
|
||||
|
||||
Import the compiled message namespace `m` and call it as a function:
|
||||
|
||||
```typescript
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
|
||||
export function MyComponent() {
|
||||
return (
|
||||
<div>
|
||||
<h1>{m.my_key()}</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
Always use the absolute workspace alias path `@/ui/paraglide/messages.js` (or `runtime.js` for runtime features) when importing Paraglide outputs.
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "10.0.1",
|
||||
"@inlang/paraglide-js": "2.20.0",
|
||||
"@testcontainers/postgresql": "12.0.1",
|
||||
"@types/bun": "1.3.14",
|
||||
"@types/node": "25.9.1",
|
||||
@@ -32,7 +33,7 @@
|
||||
},
|
||||
"apps/agent": {
|
||||
"name": "@shumai/agent-app",
|
||||
"version": "0.0.10",
|
||||
"version": "0.1.2",
|
||||
"bin": {
|
||||
"shumai-agent": "./src/index.ts",
|
||||
},
|
||||
@@ -44,7 +45,7 @@
|
||||
},
|
||||
"apps/cli": {
|
||||
"name": "@shumai/cli",
|
||||
"version": "0.0.10",
|
||||
"version": "0.1.2",
|
||||
"bin": {
|
||||
"shumai-cli": "./src/index.ts",
|
||||
},
|
||||
@@ -59,7 +60,7 @@
|
||||
},
|
||||
"apps/transcode": {
|
||||
"name": "@shumai/transcode-app",
|
||||
"version": "0.0.10",
|
||||
"version": "0.1.2",
|
||||
"bin": {
|
||||
"shumai-transcode": "./src/index.ts",
|
||||
},
|
||||
@@ -71,7 +72,7 @@
|
||||
},
|
||||
"apps/web": {
|
||||
"name": "@shumai/web-app",
|
||||
"version": "0.0.10",
|
||||
"version": "0.1.2",
|
||||
"dependencies": {
|
||||
"@shumai/agent": "workspace:*",
|
||||
"@shumai/api": "workspace:*",
|
||||
@@ -86,7 +87,7 @@
|
||||
},
|
||||
"packages/agent": {
|
||||
"name": "@shumai/agent",
|
||||
"version": "0.0.10",
|
||||
"version": "0.1.2",
|
||||
"dependencies": {
|
||||
"@anthropic-ai/sandbox-runtime": "0.0.52",
|
||||
"@earendil-works/pi-agent-core": "0.78.0",
|
||||
@@ -110,7 +111,7 @@
|
||||
},
|
||||
"packages/api": {
|
||||
"name": "@shumai/api",
|
||||
"version": "0.0.10",
|
||||
"version": "0.1.2",
|
||||
"dependencies": {
|
||||
"@hono/zod-validator": "0.7.6",
|
||||
"@shumai/core": "workspace:*",
|
||||
@@ -124,7 +125,7 @@
|
||||
},
|
||||
"packages/core": {
|
||||
"name": "@shumai/core",
|
||||
"version": "0.0.10",
|
||||
"version": "0.1.2",
|
||||
"dependencies": {
|
||||
"@shumai/db": "workspace:*",
|
||||
"@shumai/dtos": "workspace:*",
|
||||
@@ -151,7 +152,7 @@
|
||||
},
|
||||
"packages/db": {
|
||||
"name": "@shumai/db",
|
||||
"version": "0.0.10",
|
||||
"version": "0.1.2",
|
||||
"dependencies": {
|
||||
"@earendil-works/pi-agent-core": "0.78.0",
|
||||
"@prisma/adapter-pg": "7.8.0",
|
||||
@@ -167,18 +168,18 @@
|
||||
},
|
||||
"packages/dtos": {
|
||||
"name": "@shumai/dtos",
|
||||
"version": "0.0.10",
|
||||
"version": "0.1.2",
|
||||
"dependencies": {
|
||||
"zod": "4.4.3",
|
||||
},
|
||||
},
|
||||
"packages/tableprinter": {
|
||||
"name": "@shumai/tableprinter",
|
||||
"version": "0.0.10",
|
||||
"version": "0.1.2",
|
||||
},
|
||||
"packages/transcode": {
|
||||
"name": "@shumai/transcode",
|
||||
"version": "0.0.10",
|
||||
"version": "0.1.2",
|
||||
"dependencies": {
|
||||
"@shumai/core": "workspace:*",
|
||||
"@shumai/db": "workspace:*",
|
||||
@@ -192,7 +193,7 @@
|
||||
},
|
||||
"packages/webui": {
|
||||
"name": "@shumai/webui",
|
||||
"version": "0.0.10",
|
||||
"version": "0.1.2",
|
||||
"dependencies": {
|
||||
"@base-ui/react": "1.5.0",
|
||||
"@dnd-kit/abstract": "0.4.0",
|
||||
@@ -286,13 +287,14 @@
|
||||
"postcss": "8.5.15",
|
||||
"tailwindcss": "4.3.0",
|
||||
"tw-animate-css": "1.3.3",
|
||||
"typescript": "6.0.3",
|
||||
"vite": "7.3.5",
|
||||
"vite-tsconfig-paths": "6.1.1",
|
||||
},
|
||||
},
|
||||
"packages/workflow-core": {
|
||||
"name": "@shumai/workflow-core",
|
||||
"version": "0.0.10",
|
||||
"version": "0.1.2",
|
||||
"dependencies": {
|
||||
"@shumai/core": "workspace:*",
|
||||
"@shumai/db": "workspace:*",
|
||||
@@ -605,6 +607,12 @@
|
||||
|
||||
"@img/sharp-win32-x64": ["@img/sharp-win32-x64@0.34.5", "", { "os": "win32", "cpu": "x64" }, "sha512-+29YMsqY2/9eFEiW93eqWnuLcWcufowXewwSNIT6UwZdUUCrM3oFjMWH/Z6/TMmb4hlFenmfAVbpWeup2jryCw=="],
|
||||
|
||||
"@inlang/paraglide-js": ["@inlang/paraglide-js@2.20.0", "", { "dependencies": { "@inlang/recommend-sherlock": "^0.2.1", "@inlang/sdk": "^2.10.0", "commander": "11.1.0", "consola": "3.4.0", "json5": "2.2.3", "unplugin": "^2.1.2", "urlpattern-polyfill": "^10.0.0" }, "peerDependencies": { "typescript": ">=5.6" }, "optionalPeers": ["typescript"], "bin": { "paraglide-js": "bin/run.js" } }, "sha512-vI8PdPVZSnpYnpagjvm+nWSa3nMDRJKVM/2eLAtUHFrNcZZadxVdmP79r4W95+dkMLDFGEyzSSY9sFxvjdkkyQ=="],
|
||||
|
||||
"@inlang/recommend-sherlock": ["@inlang/recommend-sherlock@0.2.1", "", { "dependencies": { "comment-json": "^4.2.3" } }, "sha512-ckv8HvHy/iTqaVAEKrr+gnl+p3XFNwe5D2+6w6wJk2ORV2XkcRkKOJ/XsTUJbPSiyi4PI+p+T3bqbmNx/rDUlg=="],
|
||||
|
||||
"@inlang/sdk": ["@inlang/sdk@2.10.2", "", { "dependencies": { "@lix-js/sdk": "0.4.10", "@sinclair/typebox": "^0.31.17", "kysely": "^0.28.12", "sqlite-wasm-kysely": "0.3.0", "uuid": "^14.0.0" } }, "sha512-O1ki72SNK6LPagaGrvlioBb1mWKvump7cO7P85hfGZjdFTmDdn3icI0A6MvaBsB3P9KQHAjzyubnN1OslGufTw=="],
|
||||
|
||||
"@isaacs/cliui": ["@isaacs/cliui@8.0.2", "", { "dependencies": { "string-width": "^5.1.2", "string-width-cjs": "npm:string-width@^4.2.0", "strip-ansi": "^7.0.1", "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", "wrap-ansi": "^8.1.0", "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" } }, "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA=="],
|
||||
|
||||
"@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.13", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA=="],
|
||||
@@ -701,6 +709,10 @@
|
||||
|
||||
"@lexical/yjs": ["@lexical/yjs@0.42.0", "", { "dependencies": { "@lexical/offset": "0.42.0", "@lexical/selection": "0.42.0", "lexical": "0.42.0" }, "peerDependencies": { "yjs": ">=13.5.22" } }, "sha512-DplzWnYhfFceGPR+UyDFpZdB287wF/vNOHFuDsBF/nGDdTezvr0Gf60opzyBEF3oXym6p3xTmGygxvO97LZ+vw=="],
|
||||
|
||||
"@lix-js/sdk": ["@lix-js/sdk@0.4.10", "", { "dependencies": { "@lix-js/server-protocol-schema": "0.1.1", "dedent": "1.5.1", "human-id": "^4.1.1", "js-sha256": "^0.11.0", "kysely": "^0.28.12", "sqlite-wasm-kysely": "0.3.0", "uuid": "^14.0.0" } }, "sha512-0dMInAJK/67guTG5rRZaCEhvzC5cCXENOjaePA5AqMXrCE97kaY7SRor9e2vnoGsFIiGqXKlT0MCIoZj36G0gg=="],
|
||||
|
||||
"@lix-js/server-protocol-schema": ["@lix-js/server-protocol-schema@0.1.1", "", {}, "sha512-jBeALB6prAbtr5q4vTuxnRZZv1M2rKe8iNqRQhFJ4Tv7150unEa0vKyz0hs8Gl3fUGsWaNJBh3J8++fpbrpRBQ=="],
|
||||
|
||||
"@mistralai/mistralai": ["@mistralai/mistralai@2.2.1", "", { "dependencies": { "ws": "^8.18.0", "zod": "^3.25.0 || ^4.0.0", "zod-to-json-schema": "^3.25.0" } }, "sha512-uKU8CZmL2RzYKmplsU01hii4p3pe4HqJefpWNRWXm1Tcm0Sm4xXfwSLIy4k7ZCPlbETCGcp69E7hZs+WOJ5itQ=="],
|
||||
|
||||
"@noble/ciphers": ["@noble/ciphers@2.2.0", "", {}, "sha512-Z6pjIZ/8IJcCGzb2S/0Px5J81yij85xASuk1teLNeg75bfT07MV3a/O2Mtn1I2se43k3lkVEcFaR10N4cgQcZA=="],
|
||||
@@ -1027,6 +1039,8 @@
|
||||
|
||||
"@smithy/util-utf8": ["@smithy/util-utf8@2.3.0", "", { "dependencies": { "@smithy/util-buffer-from": "^2.2.0", "tslib": "^2.6.2" } }, "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A=="],
|
||||
|
||||
"@sqlite.org/sqlite-wasm": ["@sqlite.org/sqlite-wasm@3.48.0-build4", "", { "bin": { "sqlite-wasm": "bin/index.js" } }, "sha512-hI6twvUkzOmyGZhQMza1gpfqErZxXRw6JEsiVjUbo7tFanVD+8Oil0Ih3l2nGzHdxPI41zFmfUQG7GHqhciKZQ=="],
|
||||
|
||||
"@standard-schema/spec": ["@standard-schema/spec@1.1.0", "", {}, "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w=="],
|
||||
|
||||
"@standard-schema/utils": ["@standard-schema/utils@0.3.0", "", {}, "sha512-e7Mew686owMaPJVNNLs55PUvgz371nKgwsc4vxE49zsODpJEnxgxRo2y/OKrqueavXgZNMDVj3DdHFlaSAeU8g=="],
|
||||
@@ -1345,6 +1359,8 @@
|
||||
|
||||
"array-includes": ["array-includes@3.1.9", "", { "dependencies": { "call-bind": "^1.0.8", "call-bound": "^1.0.4", "define-properties": "^1.2.1", "es-abstract": "^1.24.0", "es-object-atoms": "^1.1.1", "get-intrinsic": "^1.3.0", "is-string": "^1.1.1", "math-intrinsics": "^1.1.0" } }, "sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ=="],
|
||||
|
||||
"array-timsort": ["array-timsort@1.0.3", "", {}, "sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ=="],
|
||||
|
||||
"array.prototype.findlast": ["array.prototype.findlast@1.2.5", "", { "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", "es-abstract": "^1.23.2", "es-errors": "^1.3.0", "es-object-atoms": "^1.0.0", "es-shim-unscopables": "^1.0.2" } }, "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ=="],
|
||||
|
||||
"array.prototype.flat": ["array.prototype.flat@1.3.3", "", { "dependencies": { "call-bind": "^1.0.8", "define-properties": "^1.2.1", "es-abstract": "^1.23.5", "es-shim-unscopables": "^1.0.2" } }, "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg=="],
|
||||
@@ -1481,7 +1497,9 @@
|
||||
|
||||
"comma-separated-tokens": ["comma-separated-tokens@2.0.3", "", {}, "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg=="],
|
||||
|
||||
"commander": ["commander@12.1.0", "", {}, "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA=="],
|
||||
"commander": ["commander@11.1.0", "", {}, "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ=="],
|
||||
|
||||
"comment-json": ["comment-json@4.6.2", "", { "dependencies": { "array-timsort": "^1.0.3", "esprima": "^4.0.1" } }, "sha512-R2rze/hDX30uul4NZoIZ76ImSJLFxn/1/ZxtKC1L77y2X1k+yYu1joKbAtMA2Fg3hZrTOiw0I5mwVMo0cf250w=="],
|
||||
|
||||
"compress-commons": ["compress-commons@6.0.2", "", { "dependencies": { "crc-32": "^1.2.0", "crc32-stream": "^6.0.0", "is-stream": "^2.0.1", "normalize-path": "^3.0.0", "readable-stream": "^4.0.0" } }, "sha512-6FqVXeETqWPoGcfzrXb37E50NP0LXT8kAMu5ooZayhWWdgEY4lBEEcbQNXtkuKQsGduxiIcI4gOTsxTmuq/bSg=="],
|
||||
|
||||
@@ -1489,6 +1507,8 @@
|
||||
|
||||
"confbox": ["confbox@0.2.4", "", {}, "sha512-ysOGlgTFbN2/Y6Cg3Iye8YKulHw+R2fNXHrgSmXISQdMnomY6eNDprVdW9R5xBguEqI954+S6709UyiO7B+6OQ=="],
|
||||
|
||||
"consola": ["consola@3.4.0", "", {}, "sha512-EiPU8G6dQG0GFHNR8ljnZFki/8a+cQwEQ+7wpxdChl02Q8HXlwEZWD5lqAF8vC2sEC3Tehr8hy7vErz88LHyUA=="],
|
||||
|
||||
"convert-source-map": ["convert-source-map@2.0.0", "", {}, "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg=="],
|
||||
|
||||
"cookie-es": ["cookie-es@3.1.1", "", {}, "sha512-UaXxwISYJPTr9hwQxMFYZ7kNhSXboMXP+Z3TRX6f1/NyaGPfuNUZOWP1pUEb75B2HjfklIYLVRfWiFZJyC6Npg=="],
|
||||
@@ -1545,6 +1565,8 @@
|
||||
|
||||
"decode-named-character-reference": ["decode-named-character-reference@1.3.0", "", { "dependencies": { "character-entities": "^2.0.0" } }, "sha512-GtpQYB283KrPp6nRw50q3U9/VfOutZOe103qlN7BPP6Ad27xYnOIWv4lPzo8HCAL+mMZofJ9KEy30fq6MfaK6Q=="],
|
||||
|
||||
"dedent": ["dedent@1.5.1", "", { "peerDependencies": { "babel-plugin-macros": "^3.1.0" }, "optionalPeers": ["babel-plugin-macros"] }, "sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg=="],
|
||||
|
||||
"deep-is": ["deep-is@0.1.4", "", {}, "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ=="],
|
||||
|
||||
"deepmerge-ts": ["deepmerge-ts@7.1.5", "", {}, "sha512-HOJkrhaYsweh+W+e74Yn7YStZOilkoPb6fycpwNLKzSPtruFs48nYis0zy5yJz1+ktUhHxoRDJ27RQAWLIJVJw=="],
|
||||
@@ -1649,6 +1671,8 @@
|
||||
|
||||
"espree": ["espree@11.2.0", "", { "dependencies": { "acorn": "^8.16.0", "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^5.0.1" } }, "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw=="],
|
||||
|
||||
"esprima": ["esprima@4.0.1", "", { "bin": { "esparse": "./bin/esparse.js", "esvalidate": "./bin/esvalidate.js" } }, "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="],
|
||||
|
||||
"esquery": ["esquery@1.7.0", "", { "dependencies": { "estraverse": "^5.1.0" } }, "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g=="],
|
||||
|
||||
"esrecurse": ["esrecurse@4.3.0", "", { "dependencies": { "estraverse": "^5.2.0" } }, "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag=="],
|
||||
@@ -1823,6 +1847,8 @@
|
||||
|
||||
"https-proxy-agent": ["https-proxy-agent@7.0.6", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "4" } }, "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw=="],
|
||||
|
||||
"human-id": ["human-id@4.2.0", "", { "bin": { "human-id": "dist/cli.js" } }, "sha512-K3GbkIWqyvvlpfhBPlbEvD97TtqBpAYA4kt+cn2lD2x2HuohzZCibcA2nOlnJT6exqvJLggoB5nv2dNf192nEA=="],
|
||||
|
||||
"hyperdyperid": ["hyperdyperid@1.2.0", "", {}, "sha512-Y93lCzHYgGWdrJ66yIktxiaGULYc6oGiABxhcO5AufBeOyoIdZF7bIfLaOrbM0iGIOXQQgxxRrFEnb+Y6w1n4A=="],
|
||||
|
||||
"iconv-lite": ["iconv-lite@0.7.2", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw=="],
|
||||
@@ -1935,6 +1961,8 @@
|
||||
|
||||
"joycon": ["joycon@3.1.1", "", {}, "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw=="],
|
||||
|
||||
"js-sha256": ["js-sha256@0.11.1", "", {}, "sha512-o6WSo/LUvY2uC4j7mO50a2ms7E/EAdbP0swigLV+nzHKTTaYnaLIWJ02VdXrsJX0vGedDESQnLsOekr94ryfjg=="],
|
||||
|
||||
"js-tokens": ["js-tokens@4.0.0", "", {}, "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="],
|
||||
|
||||
"jsesc": ["jsesc@3.1.0", "", { "bin": { "jsesc": "bin/jsesc" } }, "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA=="],
|
||||
@@ -2423,6 +2451,8 @@
|
||||
|
||||
"split2": ["split2@4.2.0", "", {}, "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg=="],
|
||||
|
||||
"sqlite-wasm-kysely": ["sqlite-wasm-kysely@0.3.0", "", { "dependencies": { "@sqlite.org/sqlite-wasm": "^3.48.0-build2" }, "peerDependencies": { "kysely": "*" } }, "sha512-TzjBNv7KwRw6E3pdKdlRyZiTmUIE0UttT/Sl56MVwVARl/u5gp978KepazCJZewFUnlWHz9i3NQd4kOtP/Afdg=="],
|
||||
|
||||
"sqlstring": ["sqlstring@2.3.3", "", {}, "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg=="],
|
||||
|
||||
"ssh-remote-port-forward": ["ssh-remote-port-forward@1.0.4", "", { "dependencies": { "@types/ssh2": "^0.5.48", "ssh2": "^1.4.0" } }, "sha512-x0LV1eVDwjf1gmG7TTnfqIzf+3VPRz7vrNIjX6oYLbeCrf/PeVY6hkT68Mg+q02qXxQhrLjB0jfgvhevoCRmLQ=="],
|
||||
@@ -2573,12 +2603,14 @@
|
||||
|
||||
"unist-util-visit-parents": ["unist-util-visit-parents@6.0.2", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-is": "^6.0.0" } }, "sha512-goh1s1TBrqSqukSc8wrjwWhL0hiJxgA8m4kFxGlQ+8FYQ3C/m11FcTs4YYem7V664AhHVvgoQLk890Ssdsr2IQ=="],
|
||||
|
||||
"unplugin": ["unplugin@3.0.0", "", { "dependencies": { "@jridgewell/remapping": "^2.3.5", "picomatch": "^4.0.3", "webpack-virtual-modules": "^0.6.2" } }, "sha512-0Mqk3AT2TZCXWKdcoaufeXNukv2mTrEZExeXlHIOZXdqYoHHr4n51pymnwV8x2BOVxwXbK2HLlI7usrqMpycdg=="],
|
||||
"unplugin": ["unplugin@2.3.11", "", { "dependencies": { "@jridgewell/remapping": "^2.3.5", "acorn": "^8.15.0", "picomatch": "^4.0.3", "webpack-virtual-modules": "^0.6.2" } }, "sha512-5uKD0nqiYVzlmCRs01Fhs2BdkEgBS3SAVP6ndrBsuK42iC2+JHyxM05Rm9G8+5mkmRtzMZGY8Ct5+mliZxU/Ww=="],
|
||||
|
||||
"update-browserslist-db": ["update-browserslist-db@1.2.3", "", { "dependencies": { "escalade": "^3.2.0", "picocolors": "^1.1.1" }, "peerDependencies": { "browserslist": ">= 4.21.0" }, "bin": { "update-browserslist-db": "cli.js" } }, "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w=="],
|
||||
|
||||
"uri-js": ["uri-js@4.4.1", "", { "dependencies": { "punycode": "^2.1.0" } }, "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg=="],
|
||||
|
||||
"urlpattern-polyfill": ["urlpattern-polyfill@10.1.0", "", {}, "sha512-IGjKp/o0NL3Bso1PymYURCJxMPNAf/ILOpendP9f5B6e1rTJgdgiOvgfoT8VxCAdY+Wisb9uhGaJJf3yZ2V9nw=="],
|
||||
|
||||
"use-callback-ref": ["use-callback-ref@1.3.3", "", { "dependencies": { "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg=="],
|
||||
|
||||
"use-image": ["use-image@1.1.4", "", { "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-P+swhszzHHgEb2X2yQ+vQNPCq/8Ks3hyfdXAVN133pvnvK7UK++bUaZUa5E+A3S02Mw8xOCBr9O6CLhk2fjrWA=="],
|
||||
@@ -2679,6 +2711,8 @@
|
||||
|
||||
"zwitch": ["zwitch@2.0.4", "", {}, "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A=="],
|
||||
|
||||
"@anthropic-ai/sandbox-runtime/commander": ["commander@12.1.0", "", {}, "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA=="],
|
||||
|
||||
"@anthropic-ai/sandbox-runtime/zod": ["zod@3.25.76", "", {}, "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ=="],
|
||||
|
||||
"@aws-sdk/client-bedrock-runtime/@smithy/node-http-handler": ["@smithy/node-http-handler@4.7.6", "", { "dependencies": { "@smithy/core": "^3.24.6", "@smithy/types": "^4.14.3", "tslib": "^2.6.2" } }, "sha512-3fya8i7GrJilQouk4cZJKdy5k8MWQBpjfXrRNaXDedH8r779tr0jcxyH3+yoTmsluc2+vF4S343yFbnvu8ExDQ=="],
|
||||
@@ -2697,6 +2731,10 @@
|
||||
|
||||
"@grpc/grpc-js/@grpc/proto-loader": ["@grpc/proto-loader@0.8.1", "", { "dependencies": { "lodash.camelcase": "^4.3.0", "long": "^5.0.0", "protobufjs": "^7.5.5", "yargs": "^17.7.2" }, "bin": { "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" } }, "sha512-wtF6h+DY6M3YaDBPAmvuuA6jV8Sif9MjtOI5euKFWRgCDl5PeDpPsHR9u2l6St5ceY8AZgoNDww5+HvEsXFsGg=="],
|
||||
|
||||
"@inlang/sdk/@sinclair/typebox": ["@sinclair/typebox@0.31.28", "", {}, "sha512-/s55Jujywdw/Jpan+vsy6JZs1z2ZTGxTmbZTPiuSL2wz9mfzA2gN1zzaqmvfi4pq+uOt7Du85fkiwv5ymW84aQ=="],
|
||||
|
||||
"@inlang/sdk/uuid": ["uuid@14.0.0", "", { "bin": { "uuid": "dist-node/bin/uuid" } }, "sha512-Qo+uWgilfSmAhXCMav1uYFynlQO7fMFiMVZsQqZRMIXp0O7rR7qjkj+cPvBHLgBqi960QCoo/PH2/6ZtVqKvrg=="],
|
||||
|
||||
"@isaacs/cliui/string-width": ["string-width@5.1.2", "", { "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", "strip-ansi": "^7.0.1" } }, "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA=="],
|
||||
|
||||
"@isaacs/cliui/strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="],
|
||||
@@ -2711,6 +2749,8 @@
|
||||
|
||||
"@jsonjoy.com/util/@jsonjoy.com/buffers": ["@jsonjoy.com/buffers@1.2.1", "", { "peerDependencies": { "tslib": "2" } }, "sha512-12cdlDwX4RUM3QxmUbVJWqZ/mrK6dFQH4Zxq6+r1YXKXYBNgZXndx2qbCJwh3+WWkCSn67IjnlG3XYTvmvYtgA=="],
|
||||
|
||||
"@lix-js/sdk/uuid": ["uuid@14.0.0", "", { "bin": { "uuid": "dist-node/bin/uuid" } }, "sha512-Qo+uWgilfSmAhXCMav1uYFynlQO7fMFiMVZsQqZRMIXp0O7rR7qjkj+cPvBHLgBqi960QCoo/PH2/6ZtVqKvrg=="],
|
||||
|
||||
"@prisma/dev/std-env": ["std-env@3.10.0", "", {}, "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg=="],
|
||||
|
||||
"@prisma/engines/@prisma/get-platform": ["@prisma/get-platform@7.8.0", "", { "dependencies": { "@prisma/debug": "7.8.0" } }, "sha512-WlxgRGnolL8VH2EmkH1R/DkKNr/mVdS3G2h42IZFFZ3eUrH9OT6t73kIOSlkkrv50wG123Iq8d96ufv5LlZktw=="],
|
||||
@@ -2915,6 +2955,8 @@
|
||||
|
||||
"@tanstack/react-router/@tanstack/react-store": ["@tanstack/react-store@0.9.3", "", { "dependencies": { "@tanstack/store": "0.9.3", "use-sync-external-store": "^1.6.0" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-y2iHd/N9OkoQbFJLUX1T9vbc2O9tjH0pQRgTcx1/Nz4IlwLvkgpuglXUx+mXt0g5ZDFrEeDnONPqkbfxXJKwRg=="],
|
||||
|
||||
"@tanstack/router-plugin/unplugin": ["unplugin@3.0.0", "", { "dependencies": { "@jridgewell/remapping": "^2.3.5", "picomatch": "^4.0.3", "webpack-virtual-modules": "^0.6.2" } }, "sha512-0Mqk3AT2TZCXWKdcoaufeXNukv2mTrEZExeXlHIOZXdqYoHHr4n51pymnwV8x2BOVxwXbK2HLlI7usrqMpycdg=="],
|
||||
|
||||
"@temporalio/common/ms": ["ms@3.0.0-canary.1", "", {}, "sha512-kh8ARjh8rMN7Du2igDRO9QJnqCb2xYTJxyQYK7vJJS4TvLLmsbyhiKpSW+t+y26gyOyMd0riphX0GeWKU3ky5g=="],
|
||||
|
||||
"@temporalio/proto/protobufjs": ["protobufjs@7.5.5", "", { "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", "@protobufjs/codegen": "^2.0.4", "@protobufjs/eventemitter": "^1.1.0", "@protobufjs/fetch": "^1.1.0", "@protobufjs/float": "^1.0.2", "@protobufjs/inquire": "^1.1.0", "@protobufjs/path": "^1.1.2", "@protobufjs/pool": "^1.1.0", "@protobufjs/utf8": "^1.1.0", "@types/node": ">=13.7.0", "long": "^5.0.0" } }, "sha512-3wY1AxV+VBNW8Yypfd1yQY9pXnqTAN+KwQxL8iYm3/BjKYMNg4i0owhEe26PWDOMaIrzeeF98Lqd5NGz4omiIg=="],
|
||||
|
||||
@@ -75,6 +75,7 @@ export default tseslint.config(
|
||||
'**/packages/core/src/generated/**',
|
||||
'**/data/**',
|
||||
'**/packages/webui/components/ui/**',
|
||||
'**/packages/webui/paraglide/**',
|
||||
],
|
||||
},
|
||||
js.configs.recommended,
|
||||
|
||||
+6
-3
@@ -13,6 +13,8 @@
|
||||
],
|
||||
"scripts": {
|
||||
"dev": "bun run --hot apps/web/src/index.ts",
|
||||
"i18n:compile": "paraglide-js compile --project ./packages/webui/project.inlang --outdir ./packages/webui/paraglide --emit-ts-declarations --no-emit-git-ignore",
|
||||
"i18n:watch": "paraglide-js compile --project ./packages/webui/project.inlang --outdir ./packages/webui/paraglide --watch --emit-ts-declarations --no-emit-git-ignore",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
||||
"test": "bun --bun vitest run",
|
||||
@@ -35,24 +37,25 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "10.0.1",
|
||||
"@inlang/paraglide-js": "2.20.0",
|
||||
"@testcontainers/postgresql": "12.0.1",
|
||||
"@types/bun": "1.3.14",
|
||||
"@types/node": "25.9.1",
|
||||
"bun-plugin-pino": "1.5.0",
|
||||
"bun-plugin-tailwind": "0.1.2",
|
||||
"bun-types": "1.3.14",
|
||||
"pino-pretty": "13.1.3",
|
||||
"eslint": "10.4.1",
|
||||
"eslint-config-prettier": "10.1.8",
|
||||
"eslint-plugin-prettier": "5.5.6",
|
||||
"eslint-plugin-react": "7.37.5",
|
||||
"globals": "17.6.0",
|
||||
"pino-pretty": "13.1.3",
|
||||
"prisma": "7.8.0",
|
||||
"testcontainers": "12.0.1",
|
||||
"typescript": "6.0.3",
|
||||
"typescript-eslint": "8.60.1",
|
||||
"vitest": "4.1.8",
|
||||
"vite-tsconfig-paths": "6.1.1"
|
||||
"vite-tsconfig-paths": "6.1.1",
|
||||
"vitest": "4.1.8"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tanstack/react-virtual": "3.14.2",
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
pnpm-lock.yaml
|
||||
src/api/api.ts
|
||||
src/routeTree.gen.ts
|
||||
paraglide
|
||||
*.md
|
||||
**/*.md
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { ShumaiLogo } from '@/ui/components/ui/icons'
|
||||
import { CheckCircle2 } from 'lucide-react'
|
||||
import { ReactNode } from 'react'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
|
||||
export function AuthLayout({ children }: { children: ReactNode }) {
|
||||
return (
|
||||
@@ -27,41 +28,31 @@ export function AuthLayout({ children }: { children: ReactNode }) {
|
||||
{/* Marketing Copy / Feature Points */}
|
||||
<div className="relative my-8 md:my-0 space-y-6">
|
||||
<h2 className="text-3xl font-extrabold tracking-tight leading-tight text-zinc-900 dark:text-zinc-50">
|
||||
One workspace
|
||||
<br />
|
||||
for all your
|
||||
<br />
|
||||
<span className="bg-gradient-to-r from-rose-500 to-orange-500 bg-clip-text text-transparent">
|
||||
creative assets.
|
||||
</span>
|
||||
{m.auth_tagline()}
|
||||
</h2>
|
||||
<p className="text-zinc-600 dark:text-zinc-400 text-sm leading-relaxed max-w-sm">
|
||||
Upload and index your files, enrich them with custom metadata schemas, draw
|
||||
annotations directly on media, and gather instant feedback — all in one modern
|
||||
workspace built for creators.
|
||||
{m.auth_description()}
|
||||
</p>
|
||||
|
||||
<ul className="space-y-3.5 pt-4">
|
||||
{[
|
||||
'Instant asset uploads & high-fidelity media players',
|
||||
'Custom metadata schemas & drawing canvas reviews',
|
||||
'Frictionless team workspaces & secure sharing',
|
||||
].map((text, i) => (
|
||||
<li
|
||||
key={i}
|
||||
className="flex items-center gap-3 text-sm text-zinc-700 dark:text-zinc-300 font-medium"
|
||||
>
|
||||
<CheckCircle2 className="w-5 h-5 text-rose-500 flex-shrink-0" />
|
||||
<span>{text}</span>
|
||||
</li>
|
||||
))}
|
||||
{[m.auth_feature_uploads(), m.auth_feature_metadata(), m.auth_feature_teams()].map(
|
||||
(text, i) => (
|
||||
<li
|
||||
key={i}
|
||||
className="flex items-center gap-3 text-sm text-zinc-700 dark:text-zinc-300 font-medium"
|
||||
>
|
||||
<CheckCircle2 className="w-5 h-5 text-rose-500 flex-shrink-0" />
|
||||
<span>{text}</span>
|
||||
</li>
|
||||
),
|
||||
)}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{/* Footer Label */}
|
||||
<div className="relative pt-4 border-t border-zinc-200/30 dark:border-zinc-800/30">
|
||||
<p className="text-xs text-zinc-500 dark:text-zinc-400 font-medium">
|
||||
Join our community of developers and designers.
|
||||
{m.auth_community_cta()}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -18,6 +18,7 @@ import {
|
||||
} from '@/ui/components/ui/icons'
|
||||
import { usePermissions } from '@/ui/hooks/use-permissions'
|
||||
import { cn } from '@/ui/lib/utils'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
import type { AncestorFolder } from '@shumai/dtos'
|
||||
import { Link, useNavigate } from '@tanstack/react-router'
|
||||
import { Check, ChevronDown, FileIcon, History, LayoutGrid, List } from 'lucide-react'
|
||||
@@ -97,7 +98,7 @@ export function BreadcrumbNav({
|
||||
})),
|
||||
]
|
||||
: [
|
||||
{ name: 'All Projects', path: `/teams/${teamId}`, isMuted: true },
|
||||
{ name: m.all_projects(), path: `/teams/${teamId}`, isMuted: true },
|
||||
{ name: projectName, path: `/projects/${projectId}` },
|
||||
...ancestorFolders
|
||||
.slice()
|
||||
|
||||
@@ -18,6 +18,7 @@ import { Avatar, AvatarFallback, AvatarImage } from '../ui/avatar'
|
||||
import { DrawAnnotation } from '../ui/icons'
|
||||
import { Skeleton } from '../ui/skeleton'
|
||||
import { formatTimestamp } from '../viewers/utils'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
|
||||
interface MessageCardProps {
|
||||
teamId?: string
|
||||
@@ -445,7 +446,7 @@ export const MessageCard: React.FC<MessageCardProps> = ({
|
||||
renderedBlocks.push(
|
||||
<div key={`tool-${idx}`} className="text-xs space-y-2 py-1">
|
||||
<div className="font-semibold text-violet-600 dark:text-violet-400 flex items-center gap-1.5">
|
||||
Calling Tool:{' '}
|
||||
{m.calling_tool()}{' '}
|
||||
<span className="font-mono bg-violet-500/10 px-1 py-0.5 rounded text-[11px]">
|
||||
{toolName}
|
||||
</span>
|
||||
@@ -453,7 +454,7 @@ export const MessageCard: React.FC<MessageCardProps> = ({
|
||||
{!!toolArgs && (
|
||||
<div className="space-y-1 pt-3">
|
||||
<div className="text-[10px] text-muted-foreground/60 uppercase font-bold tracking-wider">
|
||||
Arguments
|
||||
{m.tool_arguments()}
|
||||
</div>
|
||||
{renderToolCallArguments(toolArgs)}
|
||||
</div>
|
||||
|
||||
@@ -11,6 +11,7 @@ import { DragDropProvider, KeyboardSensor, PointerSensor, type DragEndEvent } fr
|
||||
import { useSortable } from '@dnd-kit/react/sortable'
|
||||
import { useMutation, useQueryClient } from '@tanstack/react-query'
|
||||
import { InferRequestType, InferResponseType } from 'hono/client'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
|
||||
import { Button } from '@/ui/components/ui/button'
|
||||
import {
|
||||
@@ -165,7 +166,7 @@ export function FieldsManager({ projectId, onManageFields, onSave }: FieldsManag
|
||||
>({
|
||||
mutationFn: async (request) => {
|
||||
const res = await $patchOrder(request)
|
||||
if (!res.ok) throw new Error('Failed to update fields order')
|
||||
if (!res.ok) throw new Error(m.failed_update_fields_order())
|
||||
return null as unknown as InferResponseType<typeof $patchOrder>
|
||||
},
|
||||
})
|
||||
@@ -177,7 +178,7 @@ export function FieldsManager({ projectId, onManageFields, onSave }: FieldsManag
|
||||
>({
|
||||
mutationFn: async (request) => {
|
||||
const res = await $post(request)
|
||||
if (!res.ok) throw new Error('Failed to create field')
|
||||
if (!res.ok) throw new Error(m.failed_create_field())
|
||||
return (await res.json()) as MetadataFieldInfo
|
||||
},
|
||||
onSuccess: (data) => {
|
||||
@@ -268,10 +269,10 @@ export function FieldsManager({ projectId, onManageFields, onSave }: FieldsManag
|
||||
<div className="w-80 p-4">
|
||||
<div className="space-y-4">
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="field-name">Name</Label>
|
||||
<Label htmlFor="field-name">{m.field_name()}</Label>
|
||||
<Input
|
||||
id="field-name"
|
||||
placeholder="New Field"
|
||||
placeholder={m.new_field_placeholder()}
|
||||
value={newFieldName}
|
||||
onChange={(e) => setNewFieldName(e.target.value)}
|
||||
autoFocus
|
||||
@@ -279,14 +280,16 @@ export function FieldsManager({ projectId, onManageFields, onSave }: FieldsManag
|
||||
</div>
|
||||
|
||||
<div className="space-y-2">
|
||||
<Label>Type</Label>
|
||||
<Label>{m.field_type()}</Label>
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button variant="outline" className="w-full justify-between font-normal">
|
||||
{newFieldType ? (
|
||||
<span className="capitalize">{newFieldType.replace(/_/g, ' ')}</span>
|
||||
) : (
|
||||
<span className="text-muted-foreground border-dashed">Select field type</span>
|
||||
<span className="text-muted-foreground border-dashed">
|
||||
{m.select_field_type()}
|
||||
</span>
|
||||
)}
|
||||
<ChevronDown className="ml-2 h-4 w-4 opacity-50" />
|
||||
</Button>
|
||||
@@ -309,10 +312,10 @@ export function FieldsManager({ projectId, onManageFields, onSave }: FieldsManag
|
||||
</div>
|
||||
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="field-desc">Description</Label>
|
||||
<Label htmlFor="field-desc">{m.description()}</Label>
|
||||
<Input
|
||||
id="field-desc"
|
||||
placeholder="Description (Optional)"
|
||||
placeholder={m.description_optional_placeholder()}
|
||||
value={newDescription}
|
||||
onChange={(e) => setNewDescription(e.target.value)}
|
||||
/>
|
||||
@@ -320,13 +323,13 @@ export function FieldsManager({ projectId, onManageFields, onSave }: FieldsManag
|
||||
|
||||
<div className="flex items-center space-x-2">
|
||||
<Switch id="ai-autofill" checked={newAiAutofill} onCheckedChange={setNewAiAutofill} />
|
||||
<Label htmlFor="ai-autofill">AI Autofill</Label>
|
||||
<Label htmlFor="ai-autofill">{m.ai_autofill()}</Label>
|
||||
</div>
|
||||
|
||||
{(newFieldType === FieldType.select || newFieldType === FieldType.selectMulti) && (
|
||||
<div className="space-y-2">
|
||||
<div className="flex items-center justify-between">
|
||||
<Label className="text-sm font-medium">Options</Label>
|
||||
<Label className="text-sm font-medium">{m.options()}</Label>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
@@ -334,13 +337,13 @@ export function FieldsManager({ projectId, onManageFields, onSave }: FieldsManag
|
||||
onClick={() => {
|
||||
const newOption: SelectOption = {
|
||||
id: ulid(),
|
||||
displayName: 'New Option',
|
||||
displayName: m.new_option(),
|
||||
color: '#808080',
|
||||
}
|
||||
setNewOptions([...newOptions, newOption])
|
||||
}}
|
||||
>
|
||||
<Plus className="h-4 w-4 mr-1" /> Add Option
|
||||
<Plus className="h-4 w-4 mr-1" /> {m.add_option()}
|
||||
</Button>
|
||||
</div>
|
||||
<div className="space-y-2 max-h-40 overflow-y-auto pr-1">
|
||||
@@ -353,7 +356,7 @@ export function FieldsManager({ projectId, onManageFields, onSave }: FieldsManag
|
||||
updated[idx] = { ...opt, displayName: e.target.value }
|
||||
setNewOptions(updated)
|
||||
}}
|
||||
placeholder="Option name"
|
||||
placeholder={m.option_name_placeholder()}
|
||||
className="h-8 flex-1"
|
||||
/>
|
||||
<Popover>
|
||||
@@ -414,14 +417,14 @@ export function FieldsManager({ projectId, onManageFields, onSave }: FieldsManag
|
||||
setNewOptions([])
|
||||
}}
|
||||
>
|
||||
Cancel
|
||||
{m.cancel()}
|
||||
</Button>
|
||||
<Button
|
||||
className="flex-1"
|
||||
onClick={handleCreateField}
|
||||
disabled={!newFieldName || !newFieldType}
|
||||
>
|
||||
Save
|
||||
{m.save()}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -433,16 +436,16 @@ export function FieldsManager({ projectId, onManageFields, onSave }: FieldsManag
|
||||
<div className="w-80 p-4">
|
||||
<div className="flex items-center justify-between mb-4">
|
||||
<h3 className="font-semibold">
|
||||
Fields{' '}
|
||||
{m.fields()}{' '}
|
||||
<span className="text-muted-foreground text-sm font-normal">
|
||||
({visibleCount} visible)
|
||||
{m.visible_count({ count: visibleCount })}
|
||||
</span>
|
||||
</h3>
|
||||
</div>
|
||||
<div className="relative mb-4">
|
||||
<Search className="absolute left-2 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" />
|
||||
<Input
|
||||
placeholder="Search fields"
|
||||
placeholder={m.search_fields_placeholder()}
|
||||
value={searchQuery}
|
||||
onChange={(e) => setSearchQuery(e.target.value)}
|
||||
className="pl-8"
|
||||
@@ -474,11 +477,11 @@ export function FieldsManager({ projectId, onManageFields, onSave }: FieldsManag
|
||||
<div className="mt-4 space-y-2">
|
||||
<Button variant="secondary" className="w-full" onClick={onManageFields}>
|
||||
<Settings className="h-4 w-4 mr-2" />
|
||||
Manage Fields
|
||||
{m.manage_fields()}
|
||||
</Button>
|
||||
<Button className="w-full" onClick={() => setView('create')}>
|
||||
<Plus className="h-4 w-4 mr-2" />
|
||||
New Field
|
||||
{m.new_field()}
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { AssetInfo } from '@shumai/dtos'
|
||||
import type { ShareLinkInfo } from '@shumai/dtos'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
import {
|
||||
ContextMenuContent,
|
||||
ContextMenuItem,
|
||||
@@ -107,7 +108,7 @@ export function FileBrowserContextMenu({
|
||||
<ContextMenuContent>
|
||||
<ContextMenuItem onSelect={handleDownload}>
|
||||
<Download className="mr-2 h-4 w-4" />
|
||||
<span>Download</span>
|
||||
<span>{m.download()}</span>
|
||||
</ContextMenuItem>
|
||||
{canEdit && (
|
||||
<ContextMenuItem
|
||||
@@ -115,7 +116,7 @@ export function FileBrowserContextMenu({
|
||||
className="text-destructive"
|
||||
>
|
||||
<Trash2 className="mr-2 h-4 w-4" />
|
||||
<span>Remove from Share</span>
|
||||
<span>{m.remove_from_share()}</span>
|
||||
</ContextMenuItem>
|
||||
)}
|
||||
</ContextMenuContent>
|
||||
@@ -130,7 +131,7 @@ export function FileBrowserContextMenu({
|
||||
<ContextMenuContent>
|
||||
<ContextMenuItem onSelect={handleRestore}>
|
||||
<History className="mr-2 h-4 w-4" />
|
||||
<span>Restore</span>
|
||||
<span>{m.restore()}</span>
|
||||
</ContextMenuItem>
|
||||
</ContextMenuContent>
|
||||
)
|
||||
@@ -147,19 +148,19 @@ export function FileBrowserContextMenu({
|
||||
>
|
||||
<ContextMenuItem onSelect={onUploadFile}>
|
||||
<UploadCloud className="mr-2 h-4 w-4" />
|
||||
<span>Upload File</span>
|
||||
<span>{m.upload_file()}</span>
|
||||
</ContextMenuItem>
|
||||
<ContextMenuItem onSelect={onUploadFolder}>
|
||||
<UploadCloud className="mr-2 h-4 w-4" />
|
||||
<span>Upload Folder</span>
|
||||
<span>{m.upload_folder()}</span>
|
||||
</ContextMenuItem>
|
||||
<ContextMenuItem
|
||||
onSelect={() => {
|
||||
onNewFolder('New Folder')
|
||||
onNewFolder(m.new_folder())
|
||||
}}
|
||||
>
|
||||
<FolderPlus className="mr-2 h-4 w-4" />
|
||||
<span>New Folder</span>
|
||||
<span>{m.new_folder()}</span>
|
||||
</ContextMenuItem>
|
||||
</ContextMenuContent>
|
||||
)
|
||||
@@ -174,24 +175,24 @@ export function FileBrowserContextMenu({
|
||||
>
|
||||
<ContextMenuItem onSelect={handleDownload}>
|
||||
<Download className="mr-2 h-4 w-4" />
|
||||
<span>Download</span>
|
||||
<span>{m.download()}</span>
|
||||
</ContextMenuItem>
|
||||
{canEdit && (
|
||||
<ContextMenuItem onSelect={() => onMoveTo(itemsToModify)}>
|
||||
<ArrowRight className="mr-2 h-4 w-4" />
|
||||
<span>Move to</span>
|
||||
<span>{m.move_to()}</span>
|
||||
</ContextMenuItem>
|
||||
)}
|
||||
{canEdit && (
|
||||
<ContextMenuItem onSelect={() => onCopyTo(itemsToModify)}>
|
||||
<Copy className="mr-2 h-4 w-4" />
|
||||
<span>Copy to</span>
|
||||
<span>{m.copy_to()}</span>
|
||||
</ContextMenuItem>
|
||||
)}
|
||||
{canEdit && (
|
||||
<ContextMenuItem onSelect={handleDelete} className="text-destructive">
|
||||
<Trash2 className="mr-2 h-4 w-4" />
|
||||
<span>Delete</span>
|
||||
<span>{m.delete()}</span>
|
||||
</ContextMenuItem>
|
||||
)}
|
||||
|
||||
@@ -200,14 +201,14 @@ export function FileBrowserContextMenu({
|
||||
<ContextMenuSeparator />
|
||||
<ContextMenuItem onSelect={() => onCreateShareLink?.(itemsToModify)}>
|
||||
<Plus className="mr-2 h-4 w-4" />
|
||||
<span>Create Share Link</span>
|
||||
<span>{m.create_share_link()}</span>
|
||||
</ContextMenuItem>
|
||||
|
||||
{shareLinks.length > 0 && (
|
||||
<ContextMenuSub>
|
||||
<ContextMenuSubTrigger>
|
||||
<Link className="mr-2 h-4 w-4" />
|
||||
<span>Add to Share Links</span>
|
||||
<span>{m.add_to_share_links()}</span>
|
||||
</ContextMenuSubTrigger>
|
||||
<ContextMenuPortal>
|
||||
<ContextMenuSubContent className="w-48">
|
||||
@@ -239,31 +240,31 @@ export function FileBrowserContextMenu({
|
||||
}}
|
||||
>
|
||||
<Edit className="mr-2 h-4 w-4" />
|
||||
<span>Rename</span>
|
||||
<span>{m.rename()}</span>
|
||||
</ContextMenuItem>
|
||||
)}
|
||||
<ContextMenuItem onSelect={handleDownload}>
|
||||
<Download className="mr-2 h-4 w-4" />
|
||||
<span>Download</span>
|
||||
<span>{m.download()}</span>
|
||||
</ContextMenuItem>
|
||||
|
||||
{canEdit && (
|
||||
<ContextMenuItem onSelect={() => onMoveTo(itemsToModify)}>
|
||||
<ArrowRight className="mr-2 h-4 w-4" />
|
||||
<span>Move to</span>
|
||||
<span>{m.move_to()}</span>
|
||||
</ContextMenuItem>
|
||||
)}
|
||||
{canEdit && (
|
||||
<ContextMenuItem onSelect={() => onCopyTo(itemsToModify)}>
|
||||
<Copy className="mr-2 h-4 w-4" />
|
||||
<span>Copy to</span>
|
||||
<span>{m.copy_to()}</span>
|
||||
</ContextMenuItem>
|
||||
)}
|
||||
|
||||
{canEdit && (item.type === 'file' || item.type === 'version_stack') && (
|
||||
<ContextMenuItem onSelect={() => onNewVersion(item)}>
|
||||
<UploadCloud className="mr-2 h-4 w-4" />
|
||||
<span>Create new version</span>
|
||||
<span>{m.create_new_version()}</span>
|
||||
</ContextMenuItem>
|
||||
)}
|
||||
|
||||
@@ -279,20 +280,20 @@ export function FileBrowserContextMenu({
|
||||
<ContextMenuSeparator />
|
||||
<ContextMenuItem onSelect={handleDelete} className="text-destructive">
|
||||
<Trash2 className="mr-2 h-4 w-4" />
|
||||
<span>Delete</span>
|
||||
<span>{m.delete()}</span>
|
||||
</ContextMenuItem>
|
||||
|
||||
<ContextMenuSeparator />
|
||||
<ContextMenuItem onSelect={() => onCreateShareLink?.(itemsToModify)}>
|
||||
<Plus className="mr-2 h-4 w-4" />
|
||||
<span>Create Share Link</span>
|
||||
<span>{m.create_share_link()}</span>
|
||||
</ContextMenuItem>
|
||||
|
||||
{shareLinks.length > 0 && (
|
||||
<ContextMenuSub>
|
||||
<ContextMenuSubTrigger>
|
||||
<Link className="mr-2 h-4 w-4" />
|
||||
<span>Add to Share Links</span>
|
||||
<span>{m.add_to_share_links()}</span>
|
||||
</ContextMenuSubTrigger>
|
||||
<ContextMenuPortal>
|
||||
<ContextMenuSubContent className="w-48">
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
'use client'
|
||||
import { client } from '@/ui/api/client'
|
||||
import type { InferRequestType, InferResponseType } from 'hono/client'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
|
||||
import { usePermissions } from '@/ui/hooks/use-permissions'
|
||||
import { getAllFilesFromEntries } from '@/ui/lib/dnd-utils'
|
||||
@@ -565,9 +566,13 @@ export function FileBrowser({
|
||||
(c) => c.field === 'name' && c.operator === 'contains',
|
||||
)
|
||||
if (isNameFilter && count === 10001) {
|
||||
return `10000+ ${isFile ? 'Asset' : 'Folder'}s`
|
||||
return isFile ? m.count_overflow_assets() : m.count_overflow_folders()
|
||||
}
|
||||
if (isFile) {
|
||||
return count === 1 ? m.n_assets_singular({ count }) : m.n_assets_plural({ count })
|
||||
} else {
|
||||
return count === 1 ? m.n_folders_singular({ count }) : m.n_folders_plural({ count })
|
||||
}
|
||||
return `${count} ${isFile ? 'Asset' : 'Folder'}${count !== 1 ? 's' : ''}`
|
||||
}
|
||||
|
||||
const handleEmptyAreaClick = (e: React.MouseEvent) => {
|
||||
@@ -972,7 +977,7 @@ export function FileBrowser({
|
||||
<div className="flex items-center justify-between px-4 py-2.5 bg-muted/20 border-b border-border text-sm shrink-0 animate-in fade-in slide-in-from-top-2 duration-300">
|
||||
<div className="flex items-center gap-2 text-muted-foreground">
|
||||
<AlertTriangle className="h-4 w-4 text-amber-500 shrink-0" />
|
||||
<span>Items are automatically deleted after 30 days.</span>
|
||||
<span>{m.recently_deleted_notice()}</span>
|
||||
</div>
|
||||
{canAdmin && (
|
||||
<Button
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import type { AssetInfo } from '@shumai/dtos'
|
||||
import type { CollectionInfo } from '@shumai/dtos'
|
||||
import { type FieldInfo as MetadataFieldInfo } from '@shumai/dtos'
|
||||
import type { SearchCondition, SearchSort } from '@shumai/dtos'
|
||||
import { client } from '@/ui/api/client'
|
||||
import { usePermissions } from '@/ui/hooks/use-permissions'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
import type { AssetInfo, CollectionInfo, SearchCondition, SearchSort } from '@shumai/dtos'
|
||||
import { type FieldInfo as MetadataFieldInfo } from '@shumai/dtos'
|
||||
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
|
||||
import type { InferRequestType, InferResponseType } from 'hono/client'
|
||||
import { useState } from 'react'
|
||||
@@ -228,7 +227,7 @@ export function FileBrowserToolbar({
|
||||
<PopoverTrigger asChild>
|
||||
<div>
|
||||
<Button variant="ghost" size="sm">
|
||||
Fields
|
||||
{m.field()}
|
||||
</Button>
|
||||
</div>
|
||||
</PopoverTrigger>
|
||||
@@ -341,7 +340,7 @@ export function FileBrowserToolbar({
|
||||
size="sm"
|
||||
className="inline-flex items-center gap-2 px-4 py-2 hover:bg-primary/10 font-semibold rounded-xl cursor-pointer h-8"
|
||||
>
|
||||
<span>Search</span>
|
||||
<span>{m.search()}</span>
|
||||
{activeFiltersCount > 0 && (
|
||||
<span className="ml-1 px-1.5 py-0.5 rounded-full text-[10px] font-mono font-bold bg-primary/50 border border-primary-foreground/20">
|
||||
{activeFiltersCount}
|
||||
|
||||
@@ -6,6 +6,7 @@ import { client } from '@/ui/api/client'
|
||||
import { usePermissions } from '@/ui/hooks/use-permissions'
|
||||
import { useMutation } from '@tanstack/react-query'
|
||||
import { InferRequestType, InferResponseType } from 'hono/client'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
|
||||
import { useFieldStore } from '@/ui/stores/fields'
|
||||
import { useMemberStore } from '@/ui/stores/members'
|
||||
@@ -519,7 +520,7 @@ export default function FileSystemManager({
|
||||
/>
|
||||
) : (
|
||||
<div className="flex h-full items-center justify-center p-4 text-center text-sm text-muted-foreground">
|
||||
Select an asset to view details
|
||||
{m.select_asset_to_view_details()}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -61,6 +61,7 @@ import { useEffect, useMemo, useState } from 'react'
|
||||
import { useInView } from 'react-intersection-observer'
|
||||
import { toast } from 'sonner'
|
||||
import type { DragState } from './dnd-types'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
|
||||
interface FolderTreeProps {
|
||||
teamId: string
|
||||
@@ -111,7 +112,7 @@ export function FolderTree({
|
||||
param: { projectId },
|
||||
query: { first: '20', after: pageParam as string },
|
||||
})
|
||||
if (!res.ok) throw new Error('Failed to fetch share links')
|
||||
if (!res.ok) throw new Error(m.failed_fetch_share_links())
|
||||
return (await res.json()) as unknown as {
|
||||
data: ShareLinkInfo[]
|
||||
pageInfo: { cursor?: string; total?: number }
|
||||
@@ -134,7 +135,7 @@ export function FolderTree({
|
||||
param: { projectId },
|
||||
query: { first: '20', after: pageParam as string },
|
||||
})
|
||||
if (!res.ok) throw new Error('Failed to fetch collections')
|
||||
if (!res.ok) throw new Error(m.failed_fetch_collections())
|
||||
return (await res.json()) as unknown as {
|
||||
data: CollectionInfo[]
|
||||
pageInfo: { cursor?: string; total?: number }
|
||||
@@ -174,7 +175,7 @@ export function FolderTree({
|
||||
const res = await client.api.projects[':projectId'].collections.$post({
|
||||
param: { projectId },
|
||||
json: {
|
||||
name: 'Untitled Collection',
|
||||
name: m.untitled_collection(),
|
||||
filter: {
|
||||
sourceFolderId: rootFolderId,
|
||||
searchFilter: {
|
||||
@@ -184,12 +185,12 @@ export function FolderTree({
|
||||
},
|
||||
},
|
||||
})
|
||||
if (!res.ok) throw new Error('Failed to create collection')
|
||||
if (!res.ok) throw new Error(m.failed_create_collection())
|
||||
return await res.json()
|
||||
},
|
||||
onSuccess: (data) => {
|
||||
queryClient.invalidateQueries({ queryKey: ['collections', projectId] })
|
||||
toast.success('Collection created')
|
||||
toast.success(m.collection_created())
|
||||
navigate({
|
||||
to: '/projects/$projectId/collections/$collectionId',
|
||||
params: { projectId, collectionId: data.id },
|
||||
@@ -212,12 +213,12 @@ export function FolderTree({
|
||||
}),
|
||||
},
|
||||
})
|
||||
if (!res.ok) throw new Error('Failed to create share link')
|
||||
if (!res.ok) throw new Error(m.failed_create_share_link())
|
||||
return await res.json()
|
||||
},
|
||||
onSuccess: (data) => {
|
||||
queryClient.invalidateQueries({ queryKey: ['shares', projectId] })
|
||||
toast.success('Share link created')
|
||||
toast.success(m.share_link_created())
|
||||
navigate({
|
||||
to: '/projects/$projectId/shares/$shareId',
|
||||
params: { projectId, shareId: data.id },
|
||||
@@ -256,13 +257,13 @@ export function FolderTree({
|
||||
param: { folderId: id },
|
||||
json: { name },
|
||||
})
|
||||
if (!res.ok) throw new Error('Failed to rename folder')
|
||||
if (!res.ok) throw new Error(m.failed_rename_folder())
|
||||
return await res.json()
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['search', teamId] })
|
||||
queryClient.invalidateQueries({ queryKey: ['folders'] })
|
||||
toast.success('Folder renamed')
|
||||
toast.success(m.folder_renamed())
|
||||
setIsRenameOpen(false)
|
||||
},
|
||||
onError: (err) => {
|
||||
@@ -275,13 +276,13 @@ export function FolderTree({
|
||||
const res = await client.api.folders.$delete({
|
||||
json: { ids: [id] },
|
||||
})
|
||||
if (!res.ok) throw new Error('Failed to delete folder')
|
||||
if (!res.ok) throw new Error(m.failed_delete_folder())
|
||||
return id
|
||||
},
|
||||
onSuccess: (deletedId) => {
|
||||
queryClient.invalidateQueries({ queryKey: ['search', teamId] })
|
||||
queryClient.invalidateQueries({ queryKey: ['folders'] })
|
||||
toast.success('Folder deleted')
|
||||
toast.success(m.folder_deleted())
|
||||
setIsDeleteOpen(false)
|
||||
if (folderParams?.folderId === deletedId) {
|
||||
navigate({
|
||||
@@ -309,11 +310,11 @@ export function FolderTree({
|
||||
const res = await client.api.files['download-links'].$post({
|
||||
json: { ids: [folderId] },
|
||||
})
|
||||
if (!res.ok) throw new Error('Failed to prepare download links')
|
||||
if (!res.ok) throw new Error(m.failed_to_prepare_download_links())
|
||||
const data = await res.json()
|
||||
setResolvedFiles(data.files)
|
||||
} catch (error) {
|
||||
toast.error('Failed to prepare download links')
|
||||
toast.error(m.failed_to_prepare_download_links())
|
||||
setIsDownloadOpen(false)
|
||||
console.error(error)
|
||||
} finally {
|
||||
@@ -327,12 +328,9 @@ export function FolderTree({
|
||||
|
||||
if (files.length === 0) return
|
||||
|
||||
toast.info(
|
||||
`Starting download of ${files.length} files. Please allow multiple downloads if prompted by your browser.`,
|
||||
{
|
||||
duration: 5000,
|
||||
},
|
||||
)
|
||||
toast.info(m.starting_download_files({ count: files.length }), {
|
||||
duration: 5000,
|
||||
})
|
||||
|
||||
const delay = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms))
|
||||
|
||||
@@ -355,7 +353,7 @@ export function FolderTree({
|
||||
|
||||
runQueue().catch((err) => {
|
||||
console.error('Background downloads failed:', err)
|
||||
toast.error('Some downloads could not be started')
|
||||
toast.error(m.some_downloads_failed())
|
||||
})
|
||||
}
|
||||
|
||||
@@ -365,12 +363,12 @@ export function FolderTree({
|
||||
param: { collectionId: id },
|
||||
json: { name },
|
||||
})
|
||||
if (!res.ok) throw new Error('Failed to rename collection')
|
||||
if (!res.ok) throw new Error(m.failed_rename_collection())
|
||||
return await res.json()
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['collections', projectId] })
|
||||
toast.success('Collection renamed')
|
||||
toast.success(m.collection_renamed())
|
||||
setIsRenameOpen(false)
|
||||
},
|
||||
onError: (err) => {
|
||||
@@ -383,12 +381,12 @@ export function FolderTree({
|
||||
const res = await client.api.collections[':collectionId'].$delete({
|
||||
param: { collectionId: id },
|
||||
})
|
||||
if (!res.ok) throw new Error('Failed to delete collection')
|
||||
if (!res.ok) throw new Error(m.failed_delete_collection())
|
||||
return await res.json()
|
||||
},
|
||||
onSuccess: (_, deletedId) => {
|
||||
queryClient.invalidateQueries({ queryKey: ['collections', projectId] })
|
||||
toast.success('Collection deleted')
|
||||
toast.success(m.collection_deleted())
|
||||
setIsDeleteOpen(false)
|
||||
if (params?.collectionId === deletedId) {
|
||||
navigate({
|
||||
@@ -408,12 +406,12 @@ export function FolderTree({
|
||||
param: { shareId: id },
|
||||
json: { name },
|
||||
})
|
||||
if (!res.ok) throw new Error('Failed to rename share link')
|
||||
if (!res.ok) throw new Error(m.failed_rename_share_link())
|
||||
return await res.json()
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['shares', projectId] })
|
||||
toast.success('Share link renamed')
|
||||
toast.success(m.share_link_renamed())
|
||||
setIsRenameOpen(false)
|
||||
},
|
||||
onError: (err) => {
|
||||
@@ -426,12 +424,12 @@ export function FolderTree({
|
||||
const res = await client.api.shares[':shareId'].$delete({
|
||||
param: { shareId: id },
|
||||
})
|
||||
if (!res.ok) throw new Error('Failed to delete share link')
|
||||
if (!res.ok) throw new Error(m.failed_delete_share_link())
|
||||
return id
|
||||
},
|
||||
onSuccess: (deletedId) => {
|
||||
queryClient.invalidateQueries({ queryKey: ['shares', projectId] })
|
||||
toast.success('Share link deleted')
|
||||
toast.success(m.share_link_deleted())
|
||||
setIsDeleteOpen(false)
|
||||
if (shareParams?.shareId === deletedId) {
|
||||
navigate({
|
||||
@@ -458,7 +456,9 @@ export function FolderTree({
|
||||
className="flex-1 flex items-center gap-1.5 cursor-pointer select-none text-muted-foreground hover:text-foreground transition-colors"
|
||||
onClick={() => setIsAssetsExpanded(!isAssetsExpanded)}
|
||||
>
|
||||
<h3 className="text-xs font-semibold uppercase tracking-wider">Assets</h3>
|
||||
<h3 className="text-xs font-semibold uppercase tracking-wider">
|
||||
{m.folder_tree_assets()}
|
||||
</h3>
|
||||
{isAssetsExpanded ? (
|
||||
<ChevronsDownUp className="h-3.5 w-3.5 opacity-0 group-hover:opacity-100 transition-opacity duration-200" />
|
||||
) : (
|
||||
@@ -531,7 +531,9 @@ export function FolderTree({
|
||||
<div className="flex h-4 w-4 items-center justify-center">
|
||||
<Trash2 className="h-4 w-4 text-sidebar-primary" />
|
||||
</div>
|
||||
<span className="flex-1 truncate text-sidebar-foreground">Recently Deleted</span>
|
||||
<span className="flex-1 truncate text-sidebar-foreground">
|
||||
{m.recently_deleted()}
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
@@ -550,7 +552,7 @@ export function FolderTree({
|
||||
className="flex-1 flex items-center gap-1.5 cursor-pointer select-none text-muted-foreground hover:text-foreground transition-colors"
|
||||
onClick={() => setIsCollectionsExpanded(!isCollectionsExpanded)}
|
||||
>
|
||||
<h3 className="text-xs font-semibold uppercase tracking-wider">Collections</h3>
|
||||
<h3 className="text-xs font-semibold uppercase tracking-wider">{m.collections()}</h3>
|
||||
{isCollectionsExpanded ? (
|
||||
<ChevronsDownUp className="h-3.5 w-3.5 opacity-0 group-hover:opacity-100 transition-opacity duration-200" />
|
||||
) : (
|
||||
@@ -589,7 +591,9 @@ export function FolderTree({
|
||||
<LayoutGrid className="h-4 w-4 text-sidebar-primary" />
|
||||
</div>
|
||||
<span className="flex-1 truncate text-sidebar-foreground">
|
||||
All Collections ({collectionsData?.pages[0]?.pageInfo?.total || 0})
|
||||
{m.all_collections_count({
|
||||
count: collectionsData?.pages[0]?.pageInfo?.total || 0,
|
||||
})}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -642,7 +646,7 @@ export function FolderTree({
|
||||
setIsRenameOpen(true)
|
||||
}}
|
||||
>
|
||||
Rename
|
||||
{m.rename()}
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem
|
||||
className="text-destructive focus:text-destructive focus:bg-destructive/10"
|
||||
@@ -652,7 +656,7 @@ export function FolderTree({
|
||||
setIsDeleteOpen(true)
|
||||
}}
|
||||
>
|
||||
Delete
|
||||
{m.delete()}
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
@@ -684,7 +688,7 @@ export function FolderTree({
|
||||
className="flex-1 flex items-center gap-1.5 cursor-pointer select-none text-muted-foreground hover:text-foreground transition-colors"
|
||||
onClick={() => setIsSharesExpanded(!isSharesExpanded)}
|
||||
>
|
||||
<h3 className="text-xs font-semibold uppercase tracking-wider">Share Links</h3>
|
||||
<h3 className="text-xs font-semibold uppercase tracking-wider">{m.share_links()}</h3>
|
||||
{isSharesExpanded ? (
|
||||
<ChevronsDownUp className="h-3.5 w-3.5 opacity-0 group-hover:opacity-100 transition-opacity duration-200" />
|
||||
) : (
|
||||
@@ -725,7 +729,9 @@ export function FolderTree({
|
||||
<LayoutGrid className="h-4 w-4 text-sidebar-primary" />
|
||||
</div>
|
||||
<span className="flex-1 truncate text-sidebar-foreground">
|
||||
All Share Links ({shareLinksData?.pages[0]?.pageInfo?.total || 0})
|
||||
{m.all_share_links_count({
|
||||
count: shareLinksData?.pages[0]?.pageInfo?.total || 0,
|
||||
})}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -765,19 +771,18 @@ export function FolderTree({
|
||||
<DialogContent onClick={(e) => e.stopPropagation()}>
|
||||
<DialogHeader>
|
||||
<DialogTitle>
|
||||
Rename{' '}
|
||||
{renameType === 'collection'
|
||||
? 'Collection'
|
||||
? m.rename_collection()
|
||||
: renameType === 'share'
|
||||
? 'Share Link'
|
||||
: 'Folder'}
|
||||
? m.rename_share_link()
|
||||
: m.rename_folder()}
|
||||
</DialogTitle>
|
||||
</DialogHeader>
|
||||
<div className="py-4">
|
||||
<Input
|
||||
value={renameName}
|
||||
onChange={(e) => setRenameName(e.target.value)}
|
||||
placeholder="Enter new name"
|
||||
placeholder={m.enter_new_name()}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === 'Enter' && renameName.trim()) {
|
||||
if (renameType === 'collection') {
|
||||
@@ -793,7 +798,7 @@ export function FolderTree({
|
||||
</div>
|
||||
<DialogFooter>
|
||||
<Button variant="ghost" onClick={() => setIsRenameOpen(false)}>
|
||||
Cancel
|
||||
{m.cancel()}
|
||||
</Button>
|
||||
<Button
|
||||
disabled={!renameName.trim()}
|
||||
@@ -807,7 +812,7 @@ export function FolderTree({
|
||||
}
|
||||
}}
|
||||
>
|
||||
Rename
|
||||
{m.rename()}
|
||||
</Button>
|
||||
</DialogFooter>
|
||||
</DialogContent>
|
||||
@@ -818,26 +823,25 @@ export function FolderTree({
|
||||
<AlertDialogContent onClick={(e) => e.stopPropagation()}>
|
||||
<AlertDialogHeader>
|
||||
<AlertDialogTitle>
|
||||
Delete{' '}
|
||||
{deleteType === 'collection'
|
||||
? 'Collection'
|
||||
? m.delete_collection_confirm()
|
||||
: deleteType === 'share'
|
||||
? 'Share Link'
|
||||
: 'Folder'}
|
||||
?
|
||||
? m.delete_share_link_confirm()
|
||||
: m.delete_folder_confirm()}
|
||||
</AlertDialogTitle>
|
||||
<AlertDialogDescription>
|
||||
Are you sure you want to delete this{' '}
|
||||
{deleteType === 'collection'
|
||||
? 'collection'
|
||||
: deleteType === 'share'
|
||||
? 'share link'
|
||||
: 'folder'}
|
||||
? This action cannot be undone.
|
||||
{m.delete_confirm_description({
|
||||
type:
|
||||
deleteType === 'collection'
|
||||
? m.collection()
|
||||
: deleteType === 'share'
|
||||
? m.share_link()
|
||||
: m.folder().toLowerCase(),
|
||||
})}
|
||||
</AlertDialogDescription>
|
||||
</AlertDialogHeader>
|
||||
<AlertDialogFooter>
|
||||
<AlertDialogCancel>Cancel</AlertDialogCancel>
|
||||
<AlertDialogCancel>{m.cancel()}</AlertDialogCancel>
|
||||
<AlertDialogAction
|
||||
className="bg-destructive text-destructive-foreground hover:bg-destructive/90"
|
||||
onClick={() => {
|
||||
@@ -850,7 +854,7 @@ export function FolderTree({
|
||||
}
|
||||
}}
|
||||
>
|
||||
Delete
|
||||
{m.delete()}
|
||||
</AlertDialogAction>
|
||||
</AlertDialogFooter>
|
||||
</AlertDialogContent>
|
||||
@@ -860,11 +864,11 @@ export function FolderTree({
|
||||
<Dialog open={isDownloadOpen} onOpenChange={setIsDownloadOpen}>
|
||||
<DialogContent className="sm:max-w-md">
|
||||
<DialogHeader>
|
||||
<DialogTitle>{isLoadingLinks ? 'Preparing Download' : 'Confirm Download'}</DialogTitle>
|
||||
<DialogTitle>
|
||||
{isLoadingLinks ? m.preparing_download() : m.confirm_download()}
|
||||
</DialogTitle>
|
||||
<DialogDescription>
|
||||
{isLoadingLinks
|
||||
? 'Resolving all files and folders. Please wait...'
|
||||
: 'Selected folder files will be prepared for download.'}
|
||||
{isLoadingLinks ? m.resolving_files_wait() : m.folder_files_download_description()}
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
|
||||
@@ -872,23 +876,20 @@ export function FolderTree({
|
||||
<div className="space-y-4 py-6 flex flex-col items-center justify-center">
|
||||
<Loader2 className="h-8 w-8 animate-spin text-primary" />
|
||||
<span className="text-sm font-medium text-muted-foreground mt-2">
|
||||
Preparing download links...
|
||||
{m.preparing_download_links()}
|
||||
</span>
|
||||
</div>
|
||||
) : (
|
||||
<div className="space-y-4 py-2">
|
||||
<div className="text-sm text-muted-foreground">
|
||||
This download will include{' '}
|
||||
<span className="font-semibold text-foreground">{resolvedFiles.length}</span>{' '}
|
||||
file(s).
|
||||
{m.download_includes_files({ count: resolvedFiles.length })}
|
||||
</div>
|
||||
<div className="flex items-start gap-3 p-3 text-sm rounded-lg bg-amber-50 dark:bg-amber-950/30 text-amber-800 dark:text-amber-300 border border-amber-200 dark:border-amber-900/30">
|
||||
<AlertTriangle className="h-5 w-5 shrink-0 mt-0.5" />
|
||||
<div>
|
||||
<p className="font-semibold">No Folder Structure</p>
|
||||
<p className="font-semibold">{m.no_folder_structure()}</p>
|
||||
<p className="mt-0.5 text-xs text-amber-700/90 dark:text-amber-400/90">
|
||||
Folder hierarchy will be flattened. All nested files will be downloaded directly
|
||||
into your default download folder.
|
||||
{m.folder_structure_warning()}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -899,7 +900,7 @@ export function FolderTree({
|
||||
{!isLoadingLinks ? (
|
||||
<>
|
||||
<Button variant="outline" onClick={() => setIsDownloadOpen(false)}>
|
||||
Cancel
|
||||
{m.cancel()}
|
||||
</Button>
|
||||
<Button
|
||||
onClick={startDownload}
|
||||
@@ -907,12 +908,12 @@ export function FolderTree({
|
||||
disabled={resolvedFiles.length === 0}
|
||||
>
|
||||
<Download className="h-4 w-4" />
|
||||
Start Download
|
||||
{m.start_download()}
|
||||
</Button>
|
||||
</>
|
||||
) : (
|
||||
<Button disabled variant="outline">
|
||||
Cancel
|
||||
{m.cancel()}
|
||||
</Button>
|
||||
)}
|
||||
</DialogFooter>
|
||||
@@ -997,7 +998,7 @@ function ShareLinkItem({
|
||||
onRenameTrigger(link.id, link.name)
|
||||
}}
|
||||
>
|
||||
Rename
|
||||
{m.rename()}
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem
|
||||
className="text-destructive focus:text-destructive focus:bg-destructive/10"
|
||||
@@ -1005,7 +1006,7 @@ function ShareLinkItem({
|
||||
onDeleteTrigger(link.id)
|
||||
}}
|
||||
>
|
||||
Delete
|
||||
{m.delete()}
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
@@ -1093,7 +1094,7 @@ function FolderTreeItem({
|
||||
first: '20',
|
||||
},
|
||||
})
|
||||
if (!res.ok) throw new Error('failed to fetch folder children')
|
||||
if (!res.ok) throw new Error(m.failed_to_fetch_folder_children())
|
||||
return (await res.json()) as unknown as AssetInfoPaginatedList
|
||||
},
|
||||
initialPageParam: '',
|
||||
@@ -1228,7 +1229,7 @@ function FolderTreeItem({
|
||||
}}
|
||||
>
|
||||
<Edit className="mr-2 h-4 w-4" />
|
||||
Rename
|
||||
{m.rename()}
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem
|
||||
onClick={() => {
|
||||
@@ -1236,7 +1237,7 @@ function FolderTreeItem({
|
||||
}}
|
||||
>
|
||||
<Download className="mr-2 h-4 w-4" />
|
||||
Download
|
||||
{m.download()}
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuSeparator />
|
||||
<DropdownMenuItem
|
||||
@@ -1246,7 +1247,7 @@ function FolderTreeItem({
|
||||
}}
|
||||
>
|
||||
<Trash2 className="mr-2 h-4 w-4" />
|
||||
Delete
|
||||
{m.delete()}
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
|
||||
@@ -26,6 +26,7 @@ import {
|
||||
import { useMemo, useState, useEffect } from 'react'
|
||||
import { toast } from 'sonner'
|
||||
import { Popover, PopoverTrigger, PopoverContent } from '@/ui/components/ui/popover'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
import { FIELD_TYPE_ICONS, PREDEFINED_COLORS, COLOR_MAP } from './fields-manager'
|
||||
|
||||
import { Button } from '@/ui/components/ui/button'
|
||||
@@ -59,12 +60,6 @@ const SCOPE_GROUPS = {
|
||||
PROJECT: 'project',
|
||||
}
|
||||
|
||||
const GROUP_LABELS: Record<string, string> = {
|
||||
[SCOPE_GROUPS.SYSTEM]: 'Essentials',
|
||||
[SCOPE_GROUPS.TEAM]: 'Team Attributes', // Assuming this, user screenshot said "File Attributes" but maybe that's system?
|
||||
[SCOPE_GROUPS.PROJECT]: 'Custom Fields',
|
||||
}
|
||||
|
||||
// Icons for groups
|
||||
const GROUP_ICONS: Record<string, React.ElementType> = {
|
||||
[SCOPE_GROUPS.SYSTEM]: FileText, // Placeholder
|
||||
@@ -151,7 +146,7 @@ export function ManageFieldsDialog({ projectId, open, onOpenChange }: ManageFiel
|
||||
>({
|
||||
mutationFn: async (request) => {
|
||||
const res = await $patchOrder(request)
|
||||
if (!res.ok) throw new Error('Failed to update fields order')
|
||||
if (!res.ok) throw new Error(m.failed_update_fields_order())
|
||||
return null as unknown as InferResponseType<typeof $patchOrder>
|
||||
},
|
||||
})
|
||||
@@ -163,7 +158,7 @@ export function ManageFieldsDialog({ projectId, open, onOpenChange }: ManageFiel
|
||||
>({
|
||||
mutationFn: async (request) => {
|
||||
const res = await $post(request)
|
||||
if (!res.ok) throw new Error('Failed to create field')
|
||||
if (!res.ok) throw new Error(m.failed_create_field())
|
||||
return (await res.json()) as MetadataFieldInfo
|
||||
},
|
||||
onSuccess: (data) => {
|
||||
@@ -172,7 +167,7 @@ export function ManageFieldsDialog({ projectId, open, onOpenChange }: ManageFiel
|
||||
setIsCreating(false)
|
||||
setSelectedFieldId(data.id!)
|
||||
resetEditor(data)
|
||||
toast.success('Field created successfully')
|
||||
toast.success(m.field_created_successfully())
|
||||
},
|
||||
})
|
||||
const $put = client.api.fields[':fieldId'].$put
|
||||
@@ -183,7 +178,7 @@ export function ManageFieldsDialog({ projectId, open, onOpenChange }: ManageFiel
|
||||
>({
|
||||
mutationFn: async (request) => {
|
||||
const res = await $put(request)
|
||||
if (!res.ok) throw new Error('Failed to update field')
|
||||
if (!res.ok) throw new Error(m.failed_update_field())
|
||||
return (await res.json()) as MetadataFieldInfo
|
||||
},
|
||||
onSuccess: (data) => {
|
||||
@@ -191,7 +186,7 @@ export function ManageFieldsDialog({ projectId, open, onOpenChange }: ManageFiel
|
||||
f.id === data.id ? { ...f, ...(data as MetadataFieldInfo) } : f,
|
||||
)
|
||||
updateFields(newFields)
|
||||
toast.success('Field updated successfully')
|
||||
toast.success(m.field_updated_successfully())
|
||||
},
|
||||
})
|
||||
const $delete = client.api.fields[':fieldId'].$delete
|
||||
@@ -202,14 +197,14 @@ export function ManageFieldsDialog({ projectId, open, onOpenChange }: ManageFiel
|
||||
>({
|
||||
mutationFn: async (request) => {
|
||||
const res = await $delete(request)
|
||||
if (!res.ok) throw new Error('Failed to delete field')
|
||||
if (!res.ok) throw new Error(m.failed_delete_field())
|
||||
return null as unknown as InferResponseType<typeof $delete>
|
||||
},
|
||||
onSuccess: (_, variables) => {
|
||||
const newFields = fields.filter((f) => f.id !== variables.param.fieldId)
|
||||
updateFields(newFields)
|
||||
setSelectedFieldId(null)
|
||||
toast.success('Field deleted successfully')
|
||||
toast.success(m.field_deleted_successfully())
|
||||
},
|
||||
})
|
||||
|
||||
@@ -225,7 +220,14 @@ export function ManageFieldsDialog({ projectId, open, onOpenChange }: ManageFiel
|
||||
|
||||
return presentScopes.map((scope) => ({
|
||||
id: scope,
|
||||
label: GROUP_LABELS[scope] || scope.charAt(0).toUpperCase() + scope.slice(1),
|
||||
label:
|
||||
scope === SCOPE_GROUPS.SYSTEM
|
||||
? m.essentials()
|
||||
: scope === SCOPE_GROUPS.TEAM
|
||||
? m.team_attributes()
|
||||
: scope === SCOPE_GROUPS.PROJECT
|
||||
? m.custom_fields()
|
||||
: scope.charAt(0).toUpperCase() + scope.slice(1),
|
||||
icon: GROUP_ICONS[scope] || FileText,
|
||||
}))
|
||||
}, [fields])
|
||||
@@ -325,7 +327,7 @@ export function ManageFieldsDialog({ projectId, open, onOpenChange }: ManageFiel
|
||||
|
||||
const handleDelete = () => {
|
||||
if (!selectedField) return
|
||||
if (confirm('Are you sure you want to delete this field?')) {
|
||||
if (confirm(m.confirm_delete_field())) {
|
||||
deleteField({ param: { fieldId: selectedField.id! } })
|
||||
}
|
||||
}
|
||||
@@ -337,22 +339,22 @@ export function ManageFieldsDialog({ projectId, open, onOpenChange }: ManageFiel
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<div className="space-y-2">
|
||||
<Label>Field Name</Label>
|
||||
<Label>{m.field_name()}</Label>
|
||||
<Input
|
||||
value={newName}
|
||||
onChange={(e) => setNewName(e.target.value)}
|
||||
placeholder="e.g. Status"
|
||||
placeholder={m.field_name_placeholder()}
|
||||
/>
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<Label>Field Type</Label>
|
||||
<Label>{m.field_type()}</Label>
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button variant="outline" className="w-full justify-between">
|
||||
{newType ? (
|
||||
<span className="capitalize">{newType.replace(/_/g, ' ')}</span>
|
||||
) : (
|
||||
<span className="text-muted-foreground">Select type</span>
|
||||
<span className="text-muted-foreground">{m.select_type()}</span>
|
||||
)}
|
||||
<ChevronDown className="h-4 w-4 opacity-50" />
|
||||
</Button>
|
||||
@@ -371,23 +373,23 @@ export function ManageFieldsDialog({ projectId, open, onOpenChange }: ManageFiel
|
||||
</DropdownMenu>
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<Label>Description</Label>
|
||||
<Label>{m.description()}</Label>
|
||||
<Input
|
||||
value={newDescription}
|
||||
onChange={(e) => setNewDescription(e.target.value)}
|
||||
placeholder="Description (Optional)"
|
||||
placeholder={m.description_optional_placeholder()}
|
||||
/>
|
||||
</div>
|
||||
<div className="flex items-center space-x-2">
|
||||
<Switch checked={newAiAutofill} onCheckedChange={setNewAiAutofill} />
|
||||
<Label>AI Autofill</Label>
|
||||
<Label>{m.ai_autofill()}</Label>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
if (!selectedField) {
|
||||
return <div className="text-muted-foreground text-sm">Select a field to edit options</div>
|
||||
return <div className="text-muted-foreground text-sm">{m.select_field_to_edit()}</div>
|
||||
}
|
||||
|
||||
const isReadOnly = selectedField.readOnly
|
||||
@@ -411,15 +413,16 @@ export function ManageFieldsDialog({ projectId, open, onOpenChange }: ManageFiel
|
||||
|
||||
{/* Generic placeholder for options */}
|
||||
<div className="text-sm text-muted-foreground">
|
||||
Type: <span className="capitalize">{selectedField.config?.type?.replace(/_/g, ' ')}</span>
|
||||
{m.type_label()}{' '}
|
||||
<span className="capitalize">{selectedField.config?.type?.replace(/_/g, ' ')}</span>
|
||||
</div>
|
||||
|
||||
<div className="space-y-2">
|
||||
<Label>Description</Label>
|
||||
<Label>{m.description()}</Label>
|
||||
<Input
|
||||
value={editDescription}
|
||||
onChange={(e) => setEditDescription(e.target.value)}
|
||||
placeholder="Description (Optional)"
|
||||
placeholder={m.description_optional_placeholder()}
|
||||
disabled={isReadOnly}
|
||||
/>
|
||||
</div>
|
||||
@@ -430,7 +433,7 @@ export function ManageFieldsDialog({ projectId, open, onOpenChange }: ManageFiel
|
||||
onCheckedChange={setEditAiAutofill}
|
||||
disabled={isReadOnly}
|
||||
/>
|
||||
<Label>AI Autofill</Label>
|
||||
<Label>{m.ai_autofill()}</Label>
|
||||
</div>
|
||||
|
||||
{/* TODO: Add specific option editors here */}
|
||||
@@ -439,7 +442,7 @@ export function ManageFieldsDialog({ projectId, open, onOpenChange }: ManageFiel
|
||||
selectedField.config?.type === 'selectMulti') && (
|
||||
<div className="space-y-2">
|
||||
<div className="flex items-center justify-between">
|
||||
<label className="text-sm font-medium">Options</label>
|
||||
<label className="text-sm font-medium">{m.options()}</label>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
@@ -447,7 +450,7 @@ export function ManageFieldsDialog({ projectId, open, onOpenChange }: ManageFiel
|
||||
// Logic to add option
|
||||
const newOption = {
|
||||
id: ulid(),
|
||||
displayName: 'New Option',
|
||||
displayName: m.new_option(),
|
||||
color: '#808080',
|
||||
}
|
||||
const currentOptions =
|
||||
@@ -464,7 +467,7 @@ export function ManageFieldsDialog({ projectId, open, onOpenChange }: ManageFiel
|
||||
})
|
||||
}}
|
||||
>
|
||||
<Plus className="h-4 w-4 mr-2" /> Add option
|
||||
<Plus className="h-4 w-4 mr-2" /> {m.add_option()}
|
||||
</Button>
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
@@ -566,7 +569,7 @@ export function ManageFieldsDialog({ projectId, open, onOpenChange }: ManageFiel
|
||||
onClick={handleDelete}
|
||||
className="text-destructive hover:bg-destructive/10"
|
||||
>
|
||||
Delete field
|
||||
{m.delete_field()}
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
@@ -580,12 +583,12 @@ export function ManageFieldsDialog({ projectId, open, onOpenChange }: ManageFiel
|
||||
<Dialog open={open} onOpenChange={onOpenChange}>
|
||||
<DialogContent className="!max-w-[50rem] h-[70vh] flex flex-col p-0 gap-0">
|
||||
<div className="p-4 border-b flex items-center justify-between">
|
||||
<DialogTitle>Manage Fields</DialogTitle>
|
||||
<DialogTitle>{m.manage_fields()}</DialogTitle>
|
||||
</div>
|
||||
<div className="flex overflow-hidden h-full">
|
||||
{/* Left Column: Groups */}
|
||||
<div className="w-60 border-r bg-muted/30 p-4 space-y-1">
|
||||
<div className="font-semibold mb-4 px-2">Groups</div>
|
||||
<div className="font-semibold mb-4 px-2">{m.groups()}</div>
|
||||
{groups.map((group) => (
|
||||
<button
|
||||
key={group.id}
|
||||
@@ -613,7 +616,7 @@ export function ManageFieldsDialog({ projectId, open, onOpenChange }: ManageFiel
|
||||
</span>
|
||||
{selectedGroup === SCOPE_GROUPS.PROJECT && (
|
||||
<Button size="sm" variant="outline" className="h-8" onClick={handleCreateClick}>
|
||||
New <Plus className="ml-1 h-3 w-3" />
|
||||
{m.new_label()} <Plus className="ml-1 h-3 w-3" />
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
@@ -642,7 +645,7 @@ export function ManageFieldsDialog({ projectId, open, onOpenChange }: ManageFiel
|
||||
</DragDropProvider>
|
||||
{filteredFields.length === 0 && (
|
||||
<div className="text-center text-muted-foreground text-sm py-8">
|
||||
No fields found
|
||||
{m.no_fields_found()}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
@@ -660,9 +663,11 @@ export function ManageFieldsDialog({ projectId, open, onOpenChange }: ManageFiel
|
||||
if (selectedFieldId && selectedField) resetEditor(selectedField)
|
||||
}}
|
||||
>
|
||||
Cancel
|
||||
{m.cancel()}
|
||||
</Button>
|
||||
<Button onClick={isCreating ? handleSaveCreation : handleSaveEdit}>
|
||||
{m.save()}
|
||||
</Button>
|
||||
<Button onClick={isCreating ? handleSaveCreation : handleSaveEdit}>Save</Button>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -17,6 +17,7 @@ import { useNavigate } from '@tanstack/react-router'
|
||||
import type { InferRequestType, InferResponseType } from 'hono/client'
|
||||
import { Bell, Check, Loader2, Sliders, Sparkles, Upload, X } from 'lucide-react'
|
||||
import { useEffect, useRef, useState } from 'react'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
|
||||
interface ProjectDialogProps {
|
||||
open: boolean
|
||||
@@ -62,7 +63,7 @@ export function ProjectDialog({ open, onOpenChange, mode, teamId, project }: Pro
|
||||
>({
|
||||
mutationFn: async (payload) => {
|
||||
const res = await $post({ param: { teamId: teamId }, json: payload })
|
||||
if (!res.ok) throw new Error('Failed to create project')
|
||||
if (!res.ok) throw new Error(m.failed_create_project())
|
||||
return await res.json()
|
||||
},
|
||||
onSuccess: (data) => {
|
||||
@@ -91,7 +92,7 @@ export function ProjectDialog({ open, onOpenChange, mode, teamId, project }: Pro
|
||||
param: { projectId: project!.id! },
|
||||
json: payload,
|
||||
})
|
||||
if (!res.ok) throw new Error('Failed to update project')
|
||||
if (!res.ok) throw new Error(m.failed_update_project())
|
||||
return await res.json()
|
||||
},
|
||||
onSuccess: () => {
|
||||
@@ -115,7 +116,7 @@ export function ProjectDialog({ open, onOpenChange, mode, teamId, project }: Pro
|
||||
file: file,
|
||||
},
|
||||
})
|
||||
if (!res.ok) throw new Error('Failed to upload file')
|
||||
if (!res.ok) throw new Error(m.failed_upload_file())
|
||||
return await res.json()
|
||||
},
|
||||
onSuccess: (data) => {
|
||||
@@ -184,12 +185,12 @@ export function ProjectDialog({ open, onOpenChange, mode, teamId, project }: Pro
|
||||
<div className="flex items-center gap-3">
|
||||
<div>
|
||||
<DialogTitle className="text-xl font-semibold tracking-tight text-foreground">
|
||||
{mode === 'create' ? 'Create New Project' : 'Project Settings'}
|
||||
{mode === 'create' ? m.create_new_project() : m.project_settings()}
|
||||
</DialogTitle>
|
||||
<DialogDescription className="text-xs text-muted-foreground/80 mt-1">
|
||||
{mode === 'create'
|
||||
? 'Configure your new project workspace and appearance.'
|
||||
: 'Manage and update your project workspace configurations.'}
|
||||
? m.configure_new_project_description()
|
||||
: m.manage_project_description()}
|
||||
</DialogDescription>
|
||||
</div>
|
||||
</div>
|
||||
@@ -200,14 +201,14 @@ export function ProjectDialog({ open, onOpenChange, mode, teamId, project }: Pro
|
||||
{/* Project Name Field */}
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="name" className="text-sm font-semibold tracking-tight text-foreground">
|
||||
Project Name
|
||||
{m.project_name()}
|
||||
</Label>
|
||||
<div className="relative">
|
||||
<Input
|
||||
id="name"
|
||||
value={name}
|
||||
onChange={(e) => setName(e.target.value)}
|
||||
placeholder="e.g. Acme Marketing, Q3 Product Launch..."
|
||||
placeholder={m.project_name_placeholder()}
|
||||
className="h-11 px-4 rounded-xl border-border/80 focus-visible:ring-ring/25 focus-visible:border-primary transition-all shadow-xs pr-10"
|
||||
/>
|
||||
{name.trim() && (
|
||||
@@ -216,9 +217,7 @@ export function ProjectDialog({ open, onOpenChange, mode, teamId, project }: Pro
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<p className="text-[11px] text-muted-foreground">
|
||||
A clear, concise name to identify your project space.
|
||||
</p>
|
||||
<p className="text-[11px] text-muted-foreground">{m.project_name_hint()}</p>
|
||||
</div>
|
||||
|
||||
{/* Cover Image & Branding Section */}
|
||||
@@ -226,7 +225,7 @@ export function ProjectDialog({ open, onOpenChange, mode, teamId, project }: Pro
|
||||
<div className="flex items-center justify-between">
|
||||
<Label className="text-sm font-semibold tracking-tight text-foreground flex items-center gap-1.5">
|
||||
<Sparkles className="w-4 h-4 text-primary" />
|
||||
Project Cover
|
||||
{m.project_cover()}
|
||||
</Label>
|
||||
{coverImagePreview && (
|
||||
<button
|
||||
@@ -235,7 +234,7 @@ export function ProjectDialog({ open, onOpenChange, mode, teamId, project }: Pro
|
||||
className="text-xs text-muted-foreground hover:text-destructive hover:bg-destructive/5 px-2.5 py-1 rounded-lg transition-all flex items-center gap-1 font-medium"
|
||||
>
|
||||
<X className="w-3.5 h-3.5" />
|
||||
Remove Cover
|
||||
{m.remove_cover()}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
@@ -258,7 +257,7 @@ export function ProjectDialog({ open, onOpenChange, mode, teamId, project }: Pro
|
||||
<div className="absolute inset-0 bg-background/70 backdrop-blur-xs flex flex-col items-center justify-center gap-2 z-20">
|
||||
<div className="flex items-center gap-2 px-3 py-1.5 bg-background border rounded-full shadow-lg">
|
||||
<Loader2 className="w-4 h-4 animate-spin text-primary" />
|
||||
<span className="text-xs font-semibold text-foreground">Uploading...</span>
|
||||
<span className="text-xs font-semibold text-foreground">{m.uploading()}</span>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
@@ -267,13 +266,13 @@ export function ProjectDialog({ open, onOpenChange, mode, teamId, project }: Pro
|
||||
<>
|
||||
<img
|
||||
src={coverImagePreview}
|
||||
alt="Cover Preview"
|
||||
alt={m.cover_preview()}
|
||||
className="w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"
|
||||
/>
|
||||
{/* Hover Overlay */}
|
||||
<div className="absolute inset-0 bg-black/45 opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex flex-col items-center justify-center gap-1.5 text-white z-10">
|
||||
<Upload className="w-5 h-5 transform translate-y-1 group-hover:translate-y-0 transition-transform duration-300" />
|
||||
<span className="text-xs font-semibold">Upload Image</span>
|
||||
<span className="text-xs font-semibold">{m.upload_image()}</span>
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
@@ -282,9 +281,9 @@ export function ProjectDialog({ open, onOpenChange, mode, teamId, project }: Pro
|
||||
<Upload className="w-4 h-4 text-muted-foreground" />
|
||||
</div>
|
||||
<div>
|
||||
<p className="text-xs font-medium text-foreground">Upload cover</p>
|
||||
<p className="text-xs font-medium text-foreground">{m.upload_cover()}</p>
|
||||
<p className="text-[11px] text-muted-foreground mt-0.5 max-w-[140px] mx-auto leading-normal">
|
||||
Drag and drop, or browse. Recommended 1:1 (400×400px).
|
||||
{m.upload_cover_hint()}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -296,18 +295,17 @@ export function ProjectDialog({ open, onOpenChange, mode, teamId, project }: Pro
|
||||
<div className="space-y-3 border-t border-border/40 pt-5">
|
||||
<Label className="text-sm font-semibold tracking-tight text-foreground flex items-center gap-1.5">
|
||||
<Sliders className="w-4 h-4 text-primary" />
|
||||
Project Preferences
|
||||
{m.project_preferences()}
|
||||
</Label>
|
||||
|
||||
<div className="flex items-start justify-between rounded-xl border border-border/50 bg-muted/10 p-4 transition-all duration-300 hover:bg-muted/20">
|
||||
<div className="space-y-1 pr-4">
|
||||
<div className="text-sm font-semibold flex items-center gap-2 text-foreground">
|
||||
<Bell className="w-4 h-4 text-primary" />
|
||||
Activity Notifications
|
||||
{m.activity_notifications()}
|
||||
</div>
|
||||
<p className="text-xs text-muted-foreground leading-normal">
|
||||
Receive in-app updates for comments, uploads, and automated background analysis
|
||||
tasks inside this project.
|
||||
{m.activity_notifications_description()}
|
||||
</p>
|
||||
</div>
|
||||
<Switch
|
||||
@@ -329,7 +327,7 @@ export function ProjectDialog({ open, onOpenChange, mode, teamId, project }: Pro
|
||||
disabled={isUploading}
|
||||
className="rounded-xl h-10 px-4 hover:bg-muted font-medium text-sm text-muted-foreground hover:text-foreground transition-colors"
|
||||
>
|
||||
Cancel
|
||||
{m.cancel()}
|
||||
</Button>
|
||||
<Button
|
||||
type="submit"
|
||||
@@ -340,12 +338,12 @@ export function ProjectDialog({ open, onOpenChange, mode, teamId, project }: Pro
|
||||
{isUploading ? (
|
||||
<>
|
||||
<Loader2 className="w-4 h-4 animate-spin" />
|
||||
Processing...
|
||||
{m.processing()}
|
||||
</>
|
||||
) : mode === 'create' ? (
|
||||
'Create Project'
|
||||
m.create_project()
|
||||
) : (
|
||||
'Save Changes'
|
||||
m.save_changes()
|
||||
)}
|
||||
</Button>
|
||||
</DialogFooter>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
import { client } from '@/ui/api/client'
|
||||
import { useTopNavStore } from '@/ui/stores/top-nav'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
import { useInfiniteQuery, useQuery } from '@tanstack/react-query'
|
||||
import { useEffect, useState, useMemo, useRef } from 'react'
|
||||
import { TopNav } from './top-nav'
|
||||
@@ -386,7 +387,7 @@ export function PublicShareManager({
|
||||
<div className="mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-primary/10">
|
||||
<Lock className="h-6 w-6 text-primary" />
|
||||
</div>
|
||||
<CardTitle>Password Protected</CardTitle>
|
||||
<CardTitle>{m.password_protected()}</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<form onSubmit={handlePasswordSubmit} className="space-y-4">
|
||||
|
||||
@@ -18,6 +18,7 @@ import RatingField from '../fields/rating-field'
|
||||
import { useEffect, useMemo } from 'react'
|
||||
import { useMemberStore } from '@/ui/stores/members'
|
||||
import { useTeamId } from '@/ui/hooks/use-team-id'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
|
||||
interface FilterPanelProps {
|
||||
fields: FieldInfo[]
|
||||
@@ -28,13 +29,6 @@ interface FilterPanelProps {
|
||||
hidePrefix?: boolean
|
||||
}
|
||||
|
||||
const SYSTEM_FIELDS = [
|
||||
{ id: 'name', label: 'Name', type: 'text' },
|
||||
{ id: 'createdAt', label: 'Created At', type: 'date' },
|
||||
{ id: 'updatedAt', label: 'Updated At', type: 'date' },
|
||||
{ id: 'sizeByte', label: 'Size', type: 'number' },
|
||||
]
|
||||
|
||||
export function FilterPanel({
|
||||
fields,
|
||||
conditions,
|
||||
@@ -60,19 +54,25 @@ export function FilterPanel({
|
||||
}))
|
||||
}, [members])
|
||||
|
||||
const allFields = [
|
||||
...SYSTEM_FIELDS,
|
||||
...fields.map((f) => ({
|
||||
const allFields = useMemo(() => {
|
||||
const sys = [
|
||||
{ id: 'name', label: m.sort_name(), type: 'text' },
|
||||
{ id: 'createdAt', label: m.field_created_at(), type: 'date' },
|
||||
{ id: 'updatedAt', label: m.field_updated_at(), type: 'date' },
|
||||
{ id: 'sizeByte', label: m.field_size(), type: 'number' },
|
||||
]
|
||||
const custom = fields.map((f) => ({
|
||||
id: f.id!,
|
||||
label: f.config?.name || f.description || 'Unknown',
|
||||
label: f.config?.name || f.description || m.unknown(),
|
||||
type: getFieldType(f),
|
||||
options:
|
||||
f.config?.type === 'user' || f.config?.type === 'userMulti'
|
||||
? memberOptions
|
||||
: f.config?.select?.options || f.config?.selectMulti?.options,
|
||||
config: f.config,
|
||||
})),
|
||||
].filter((f) => !excludeFields?.includes(f.id))
|
||||
}))
|
||||
return [...sys, ...custom].filter((f) => !excludeFields?.includes(f.id))
|
||||
}, [fields, memberOptions, excludeFields])
|
||||
|
||||
const handleAddCondition = () => {
|
||||
onChange([
|
||||
@@ -136,7 +136,7 @@ export function FilterPanel({
|
||||
<div key={index} className="flex items-center gap-2">
|
||||
{!hidePrefix && (
|
||||
<div className="w-16 text-sm text-muted-foreground font-medium text-right">
|
||||
{index === 0 ? 'Where' : 'and'}
|
||||
{index === 0 ? m.filter_where() : m.filter_and()}
|
||||
</div>
|
||||
)}
|
||||
<div className="flex-1 flex items-center gap-2">
|
||||
@@ -145,7 +145,7 @@ export function FilterPanel({
|
||||
onValueChange={(val) => handleConditionChange(index, 'field', val)}
|
||||
>
|
||||
<SelectTrigger className="w-[180px]">
|
||||
<SelectValue placeholder="Select field" />
|
||||
<SelectValue placeholder={m.select_field()} />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{allFields.map((field) => (
|
||||
@@ -161,7 +161,7 @@ export function FilterPanel({
|
||||
onValueChange={(val) => handleConditionChange(index, 'operator', val)}
|
||||
>
|
||||
<SelectTrigger className="w-[140px]">
|
||||
<SelectValue placeholder="Operator" />
|
||||
<SelectValue placeholder={m.operator()} />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{getOperators(
|
||||
@@ -202,7 +202,7 @@ export function FilterPanel({
|
||||
className="text-muted-foreground hover:text-foreground"
|
||||
onClick={handleAddCondition}
|
||||
>
|
||||
+ Add condition
|
||||
{m.add_condition()}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -242,22 +242,22 @@ function getOperators(field: { id: string; label: string; type: string }): {
|
||||
|
||||
if (id === 'name') {
|
||||
return [
|
||||
{ value: 'eq' as SearchConditionOperator, label: 'is' },
|
||||
{ value: 'neq' as SearchConditionOperator, label: 'is not' },
|
||||
{ value: 'contains' as SearchConditionOperator, label: 'contains' },
|
||||
{ value: 'notContains' as SearchConditionOperator, label: 'does not contain' },
|
||||
{ value: 'isEmpty' as SearchConditionOperator, label: 'is empty' },
|
||||
{ value: 'isNotEmpty' as SearchConditionOperator, label: 'is not empty' },
|
||||
{ value: 'eq' as SearchConditionOperator, label: m.operator_is() },
|
||||
{ value: 'neq' as SearchConditionOperator, label: m.operator_is_not() },
|
||||
{ value: 'contains' as SearchConditionOperator, label: m.operator_contains() },
|
||||
{ value: 'notContains' as SearchConditionOperator, label: m.operator_does_not_contain() },
|
||||
{ value: 'isEmpty' as SearchConditionOperator, label: m.operator_is_empty() },
|
||||
{ value: 'isNotEmpty' as SearchConditionOperator, label: m.operator_is_not_empty() },
|
||||
]
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
case 'text':
|
||||
return [
|
||||
{ value: 'eq' as SearchConditionOperator, label: 'is' },
|
||||
{ value: 'neq' as SearchConditionOperator, label: 'is not' },
|
||||
{ value: 'isEmpty' as SearchConditionOperator, label: 'is empty' },
|
||||
{ value: 'isNotEmpty' as SearchConditionOperator, label: 'is not empty' },
|
||||
{ value: 'eq' as SearchConditionOperator, label: m.operator_is() },
|
||||
{ value: 'neq' as SearchConditionOperator, label: m.operator_is_not() },
|
||||
{ value: 'isEmpty' as SearchConditionOperator, label: m.operator_is_empty() },
|
||||
{ value: 'isNotEmpty' as SearchConditionOperator, label: m.operator_is_not_empty() },
|
||||
]
|
||||
case 'number':
|
||||
case 'rating':
|
||||
@@ -268,43 +268,43 @@ function getOperators(field: { id: string; label: string; type: string }): {
|
||||
{ value: 'lt' as SearchConditionOperator, label: '<' },
|
||||
{ value: 'lte' as SearchConditionOperator, label: '≤' },
|
||||
{ value: 'gte' as SearchConditionOperator, label: '≥' },
|
||||
{ value: 'isEmpty' as SearchConditionOperator, label: 'is empty' },
|
||||
{ value: 'isNotEmpty' as SearchConditionOperator, label: 'is not empty' },
|
||||
{ value: 'isEmpty' as SearchConditionOperator, label: m.operator_is_empty() },
|
||||
{ value: 'isNotEmpty' as SearchConditionOperator, label: m.operator_is_not_empty() },
|
||||
]
|
||||
case 'select':
|
||||
return [
|
||||
{ value: 'eq' as SearchConditionOperator, label: 'is' },
|
||||
{ value: 'neq' as SearchConditionOperator, label: 'is not' },
|
||||
{ value: 'in' as SearchConditionOperator, label: 'is any of' },
|
||||
{ value: 'notIn' as SearchConditionOperator, label: 'is none of' },
|
||||
{ value: 'isEmpty' as SearchConditionOperator, label: 'is empty' },
|
||||
{ value: 'isNotEmpty' as SearchConditionOperator, label: 'is not empty' },
|
||||
{ value: 'eq' as SearchConditionOperator, label: m.operator_is() },
|
||||
{ value: 'neq' as SearchConditionOperator, label: m.operator_is_not() },
|
||||
{ value: 'in' as SearchConditionOperator, label: m.operator_is_any_of() },
|
||||
{ value: 'notIn' as SearchConditionOperator, label: m.operator_is_none_of() },
|
||||
{ value: 'isEmpty' as SearchConditionOperator, label: m.operator_is_empty() },
|
||||
{ value: 'isNotEmpty' as SearchConditionOperator, label: m.operator_is_not_empty() },
|
||||
]
|
||||
case 'selectMulti':
|
||||
return [
|
||||
{ value: 'hasAny' as SearchConditionOperator, label: 'has any of' },
|
||||
{ value: 'hasAll' as SearchConditionOperator, label: 'has all of' },
|
||||
{ value: 'eq' as SearchConditionOperator, label: 'is exactly' },
|
||||
{ value: 'hasNone' as SearchConditionOperator, label: 'has none of' },
|
||||
{ value: 'isEmpty' as SearchConditionOperator, label: 'is empty' },
|
||||
{ value: 'isNotEmpty' as SearchConditionOperator, label: 'is not empty' },
|
||||
{ value: 'hasAny' as SearchConditionOperator, label: m.operator_has_any_of() },
|
||||
{ value: 'hasAll' as SearchConditionOperator, label: m.operator_has_all_of() },
|
||||
{ value: 'eq' as SearchConditionOperator, label: m.operator_is_exactly() },
|
||||
{ value: 'hasNone' as SearchConditionOperator, label: m.operator_has_none_of() },
|
||||
{ value: 'isEmpty' as SearchConditionOperator, label: m.operator_is_empty() },
|
||||
{ value: 'isNotEmpty' as SearchConditionOperator, label: m.operator_is_not_empty() },
|
||||
]
|
||||
case 'date':
|
||||
return [
|
||||
{ value: 'eq' as SearchConditionOperator, label: 'is' },
|
||||
{ value: 'isWithin' as SearchConditionOperator, label: 'is within' },
|
||||
{ value: 'lt' as SearchConditionOperator, label: 'is before' },
|
||||
{ value: 'gt' as SearchConditionOperator, label: 'is after' },
|
||||
{ value: 'lte' as SearchConditionOperator, label: 'is on or before' },
|
||||
{ value: 'gte' as SearchConditionOperator, label: 'is on or after' },
|
||||
{ value: 'neq' as SearchConditionOperator, label: 'is not' },
|
||||
{ value: 'isEmpty' as SearchConditionOperator, label: 'is empty' },
|
||||
{ value: 'isNotEmpty' as SearchConditionOperator, label: 'is not empty' },
|
||||
{ value: 'eq' as SearchConditionOperator, label: m.operator_is() },
|
||||
{ value: 'isWithin' as SearchConditionOperator, label: m.operator_is_within() },
|
||||
{ value: 'lt' as SearchConditionOperator, label: m.operator_is_before() },
|
||||
{ value: 'gt' as SearchConditionOperator, label: m.operator_is_after() },
|
||||
{ value: 'lte' as SearchConditionOperator, label: m.operator_is_on_or_before() },
|
||||
{ value: 'gte' as SearchConditionOperator, label: m.operator_is_on_or_after() },
|
||||
{ value: 'neq' as SearchConditionOperator, label: m.operator_is_not() },
|
||||
{ value: 'isEmpty' as SearchConditionOperator, label: m.operator_is_empty() },
|
||||
{ value: 'isNotEmpty' as SearchConditionOperator, label: m.operator_is_not_empty() },
|
||||
]
|
||||
case 'toggle':
|
||||
return [{ value: 'eq' as SearchConditionOperator, label: 'is' }]
|
||||
return [{ value: 'eq' as SearchConditionOperator, label: m.operator_is() }]
|
||||
default:
|
||||
return [{ value: 'eq' as SearchConditionOperator, label: 'is' }]
|
||||
return [{ value: 'eq' as SearchConditionOperator, label: m.operator_is() }]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -362,7 +362,7 @@ function MultiSelectValueInput({
|
||||
>
|
||||
<div className="flex flex-wrap gap-1 items-center max-w-[90%]">
|
||||
{selectedOptions.length === 0 ? (
|
||||
<span className="text-muted-foreground">Select options...</span>
|
||||
<span className="text-muted-foreground">{m.select_options()}</span>
|
||||
) : (
|
||||
selectedOptions.map((option) => (
|
||||
<span
|
||||
@@ -433,7 +433,7 @@ function ConditionValueInput({
|
||||
return (
|
||||
<Select value={value as string} onValueChange={onChange}>
|
||||
<SelectTrigger>
|
||||
<SelectValue placeholder="Select option" />
|
||||
<SelectValue placeholder={m.select_option()} />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{field.options.map((opt) => (
|
||||
@@ -453,13 +453,13 @@ function ConditionValueInput({
|
||||
|
||||
if (field.type === 'date') {
|
||||
const relativeDates = [
|
||||
{ value: 'today', label: 'Today' },
|
||||
{ value: 'yesterday', label: 'Yesterday' },
|
||||
{ value: 'tomorrow', label: 'Tomorrow' },
|
||||
{ value: 'one week ago', label: 'One week ago' },
|
||||
{ value: 'one week from now', label: 'One week from now' },
|
||||
{ value: 'one month ago', label: 'One month ago' },
|
||||
{ value: 'one month from now', label: 'One month from now' },
|
||||
{ value: 'today', label: m.date_today() },
|
||||
{ value: 'yesterday', label: m.date_yesterday() },
|
||||
{ value: 'tomorrow', label: m.date_tomorrow() },
|
||||
{ value: 'one week ago', label: m.date_one_week_ago() },
|
||||
{ value: 'one week from now', label: m.date_one_week_from_now() },
|
||||
{ value: 'one month ago', label: m.date_one_month_ago() },
|
||||
{ value: 'one month from now', label: m.date_one_month_from_now() },
|
||||
]
|
||||
|
||||
const isRelative = relativeDates.some((rd) => rd.value === value)
|
||||
@@ -474,7 +474,7 @@ function ConditionValueInput({
|
||||
}}
|
||||
>
|
||||
<SelectTrigger className="w-[140px]">
|
||||
<SelectValue placeholder="Date type" />
|
||||
<SelectValue placeholder={m.date_type()} />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{relativeDates.map((rd) => (
|
||||
@@ -482,7 +482,7 @@ function ConditionValueInput({
|
||||
{rd.label}
|
||||
</SelectItem>
|
||||
))}
|
||||
<SelectItem value="exact">Exact date...</SelectItem>
|
||||
<SelectItem value="exact">{m.exact_date()}</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
{!isRelative && (
|
||||
@@ -527,8 +527,8 @@ function ConditionValueInput({
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="true">Checked</SelectItem>
|
||||
<SelectItem value="false">Unchecked</SelectItem>
|
||||
<SelectItem value="true">{m.toggle_checked()}</SelectItem>
|
||||
<SelectItem value="false">{m.toggle_unchecked()}</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
)
|
||||
@@ -537,7 +537,7 @@ function ConditionValueInput({
|
||||
return (
|
||||
<DebouncedInput
|
||||
type="text"
|
||||
placeholder="Enter a value"
|
||||
placeholder={m.enter_a_value()}
|
||||
value={value as string}
|
||||
onChange={onChange}
|
||||
/>
|
||||
|
||||
@@ -26,6 +26,7 @@ import { useEffect, useMemo, useState } from 'react'
|
||||
import { useInView } from 'react-intersection-observer'
|
||||
import { toast } from 'sonner'
|
||||
import { FilterPanel } from './filter-panel'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
|
||||
interface SearchFilterDialogProps {
|
||||
open: boolean
|
||||
@@ -72,7 +73,7 @@ export function SearchFilterDialog({
|
||||
const res = await client.api.teams[':teamId'].settings.$get({
|
||||
param: { teamId },
|
||||
})
|
||||
if (!res.ok) throw new Error('Failed to fetch team settings')
|
||||
if (!res.ok) throw new Error(m.failed_load_settings())
|
||||
return (await res.json()) as { semanticSearchEnabled: boolean }
|
||||
},
|
||||
enabled: open,
|
||||
@@ -123,7 +124,7 @@ export function SearchFilterDialog({
|
||||
const fieldName = field?.config?.name || first.field
|
||||
name = `${fieldName} ${first.operator} ${first.value}`
|
||||
}
|
||||
if (!name) name = 'Untitled Collection'
|
||||
if (!name) name = m.untitled_collection()
|
||||
|
||||
const res = await client.api.projects[':projectId'].collections.$post({
|
||||
param: { projectId },
|
||||
@@ -140,12 +141,12 @@ export function SearchFilterDialog({
|
||||
},
|
||||
},
|
||||
})
|
||||
if (!res.ok) throw new Error('Failed to save collection')
|
||||
if (!res.ok) throw new Error(m.failed_save_collection())
|
||||
return await res.json()
|
||||
},
|
||||
onSuccess: (data) => {
|
||||
queryClient.invalidateQueries({ queryKey: ['collections', projectId] })
|
||||
toast.success('Collection saved')
|
||||
toast.success(m.collection_saved())
|
||||
onOpenChange(false)
|
||||
navigate({
|
||||
to: '/projects/$projectId/collections/$collectionId',
|
||||
@@ -184,7 +185,7 @@ export function SearchFilterDialog({
|
||||
})
|
||||
if (!res.ok) {
|
||||
const errorData = (await res.json().catch(() => ({}))) as Record<string, unknown>
|
||||
throw new Error((errorData.message as string) || 'Search failed')
|
||||
throw new Error((errorData.message as string) || m.search_failed())
|
||||
}
|
||||
return (await res.json()) as {
|
||||
data: AssetInfo[]
|
||||
@@ -255,7 +256,7 @@ export function SearchFilterDialog({
|
||||
<Dialog open={open} onOpenChange={onOpenChange}>
|
||||
<DialogContent className="sm:max-w-[900px] p-0 gap-0 overflow-hidden bg-background border-border rounded-2xl shadow-2xl flex flex-col h-[85vh]">
|
||||
<DialogHeader className="px-6 pt-3 pb-0 text-left">
|
||||
<DialogTitle className="text-lg font-bold">Search</DialogTitle>
|
||||
<DialogTitle className="text-lg font-bold">{m.search_dialog_title()}</DialogTitle>
|
||||
</DialogHeader>
|
||||
|
||||
<div className="px-6 pb-6 pt-4 border-b border-border bg-muted/30 flex flex-col gap-3">
|
||||
@@ -271,7 +272,7 @@ export function SearchFilterDialog({
|
||||
value={searchInput}
|
||||
onChange={(e) => setSearchInput(e.target.value)}
|
||||
placeholder={
|
||||
isSemantic ? 'Search records by content...' : 'Search records by name...'
|
||||
isSemantic ? m.search_by_content_placeholder() : m.search_by_name_placeholder()
|
||||
}
|
||||
className="w-full pl-4 pr-24 py-3 bg-background border-border rounded-xl text-sm h-12 focus-visible:ring-2 focus-visible:ring-primary/20 shadow-sm"
|
||||
/>
|
||||
@@ -291,7 +292,7 @@ export function SearchFilterDialog({
|
||||
type="submit"
|
||||
className="absolute right-1.5 top-1.5 bottom-1.5 px-4 bg-primary hover:bg-primary/90 text-primary-foreground text-xs font-semibold rounded-lg flex items-center justify-center transition-colors shadow-sm"
|
||||
>
|
||||
Search
|
||||
{m.search_button()}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -315,12 +316,12 @@ export function SearchFilterDialog({
|
||||
!semanticSearchEnabled && 'opacity-50 cursor-not-allowed',
|
||||
)}
|
||||
>
|
||||
Semantic Search
|
||||
{m.semantic_search()}
|
||||
</Label>
|
||||
</div>
|
||||
{!semanticSearchEnabled && (
|
||||
<span className="text-[10px] text-muted-foreground italic">
|
||||
* Semantic search requires an enabled embedding agent.
|
||||
{m.semantic_search_requires_embedding()}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
@@ -338,12 +339,12 @@ export function SearchFilterDialog({
|
||||
) : (
|
||||
<ChevronDown className="w-4 h-4 text-muted-foreground group-hover:text-foreground" />
|
||||
)}
|
||||
<span className="text-xs font-semibold text-foreground/80">Filters</span>
|
||||
<span className="text-xs font-semibold text-foreground/80">{m.filters()}</span>
|
||||
</button>
|
||||
|
||||
{activeFiltersCount > 0 && (
|
||||
<span className="px-1.5 py-0.5 rounded-full text-[10px] font-mono font-bold bg-primary/10 text-primary border border-primary/20">
|
||||
{activeFiltersCount} active
|
||||
{activeFiltersCount} {m.active_filters()}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
@@ -357,7 +358,7 @@ export function SearchFilterDialog({
|
||||
}}
|
||||
className="text-[11px] font-medium text-destructive hover:text-destructive/80 underline underline-offset-2 transition-colors"
|
||||
>
|
||||
Reset
|
||||
{m.reset()}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
@@ -383,14 +384,12 @@ export function SearchFilterDialog({
|
||||
<div className="p-4 md:p-5">
|
||||
<div className="flex items-center justify-between mb-3 px-1">
|
||||
<span className="text-[11px] font-bold uppercase tracking-wider text-muted-foreground/60 font-mono">
|
||||
Search Results
|
||||
{m.search_results()}
|
||||
</span>
|
||||
{isLoading && (
|
||||
<span className="inline-flex items-center gap-1.5 text-xs text-primary">
|
||||
<Loader2 className="h-3 w-3 animate-spin" />
|
||||
{isSemantic
|
||||
? 'Semantic search using media intelligence might be slow...'
|
||||
: 'Querying database...'}
|
||||
{isSemantic ? m.semantic_search_slow() : m.querying_database()}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
@@ -399,25 +398,25 @@ export function SearchFilterDialog({
|
||||
{!hasActiveCriteria ? (
|
||||
<div className="py-20 text-center flex flex-col items-center justify-center bg-muted/20 px-4">
|
||||
<Search className="w-10 h-10 text-muted-foreground/30 mb-2" />
|
||||
<h3 className="text-sm font-semibold text-foreground/80">Ready to Search</h3>
|
||||
<h3 className="text-sm font-semibold text-foreground/80">
|
||||
{m.ready_to_search()}
|
||||
</h3>
|
||||
<p className="text-xs text-muted-foreground max-w-sm mt-1 mx-auto">
|
||||
Type your query above and click the Search button to display results.
|
||||
{m.type_query_instruction()}
|
||||
</p>
|
||||
{isSemantic && (
|
||||
<p className="text-xs text-muted-foreground/80 max-w-md mt-4 mx-auto border-t border-border/60 pt-3">
|
||||
Semantic search results will be ordered by their relevance to the search query
|
||||
text, but won't be strictly filtered. If you need accurate filtering, please
|
||||
add filter conditions to control that.
|
||||
{m.semantic_search_note()}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
) : searchError ? (
|
||||
<div className="py-12 px-4 text-center flex flex-col items-center justify-center bg-muted/20">
|
||||
<AlertCircle className="w-10 h-10 text-destructive/50 mb-2" />
|
||||
<h3 className="text-sm font-semibold text-foreground/80">Search failed</h3>
|
||||
<h3 className="text-sm font-semibold text-foreground/80">{m.search_failed()}</h3>
|
||||
<p className="text-xs text-muted-foreground max-w-sm mt-1 mx-auto">
|
||||
{searchError.message.includes('Embedding agent not configured')
|
||||
? 'Please create and enable an embedding agent in the team settings to use semantic search.'
|
||||
? m.enable_embedding_agent_hint()
|
||||
: searchError.message}
|
||||
</p>
|
||||
</div>
|
||||
@@ -438,10 +437,10 @@ export function SearchFilterDialog({
|
||||
<div className="py-12 px-4 text-center flex flex-col items-center justify-center bg-muted/20">
|
||||
<AlertCircle className="w-10 h-10 text-muted-foreground/30 mb-2" />
|
||||
<h3 className="text-sm font-semibold text-foreground/80">
|
||||
No records matched your criteria
|
||||
{m.no_records_matched()}
|
||||
</h3>
|
||||
<p className="text-xs text-muted-foreground max-w-sm mt-1 mx-auto">
|
||||
Try adjusting spelling or removing filter rows.
|
||||
{m.try_adjusting_spelling()}
|
||||
</p>
|
||||
</div>
|
||||
) : (
|
||||
@@ -479,15 +478,15 @@ export function SearchFilterDialog({
|
||||
</span>
|
||||
<span className="text-xs text-muted-foreground block mt-0.5 truncate">
|
||||
{record.type === 'folder'
|
||||
? 'Folder'
|
||||
: `Size: ${formatSize(record.sizeByte || 0)}`}
|
||||
? m.folder()
|
||||
: `${m.size_prefix()} ${formatSize(record.sizeByte || 0)}`}
|
||||
</span>
|
||||
{record.startTime !== undefined &&
|
||||
record.startTime !== null &&
|
||||
record.endTime !== undefined &&
|
||||
record.endTime !== null && (
|
||||
<span className="text-[10px] font-semibold text-primary bg-primary/10 border border-primary/20 px-1.5 py-0.5 rounded mt-1 inline-block">
|
||||
Match found at {formatTimestamp(record.startTime)} -{' '}
|
||||
{m.match_found_at()} {formatTimestamp(record.startTime)} -{' '}
|
||||
{formatTimestamp(record.endTime)}
|
||||
</span>
|
||||
)}
|
||||
@@ -516,13 +515,7 @@ export function SearchFilterDialog({
|
||||
{/* Footer ported from Demo */}
|
||||
<div className="p-4 border-t border-border bg-muted/30 flex items-center justify-between shrink-0">
|
||||
<div className="text-xs text-muted-foreground flex items-center gap-2">
|
||||
<span>
|
||||
Matched{' '}
|
||||
<strong className="font-mono font-bold text-foreground">
|
||||
{formatMatchedCount(totalCount)}
|
||||
</strong>{' '}
|
||||
items
|
||||
</span>
|
||||
<span>{m.matched_items({ count: formatMatchedCount(totalCount) })}</span>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-2">
|
||||
@@ -536,10 +529,10 @@ export function SearchFilterDialog({
|
||||
{isSaving ? (
|
||||
<>
|
||||
<Loader2 className="mr-2 h-3 w-3 animate-spin" />
|
||||
Saving...
|
||||
{m.saving_ellipsis()}
|
||||
</>
|
||||
) : (
|
||||
'Save as collection'
|
||||
m.save_as_collection()
|
||||
)}
|
||||
</Button>
|
||||
|
||||
@@ -548,7 +541,7 @@ export function SearchFilterDialog({
|
||||
className="h-8 text-[10px] font-semibold uppercase tracking-wider"
|
||||
onClick={isSemantic ? () => onOpenChange(false) : handleApply}
|
||||
>
|
||||
{isSemantic ? 'Close' : 'Apply and Close'}
|
||||
{isSemantic ? m.close() : m.apply_and_close()}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10,6 +10,8 @@ import {
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from '@/ui/components/ui/select'
|
||||
import { useMemo } from 'react'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
|
||||
interface SortControlProps {
|
||||
fields: MetadataFieldInfo[]
|
||||
@@ -18,22 +20,21 @@ interface SortControlProps {
|
||||
disabled?: boolean
|
||||
}
|
||||
|
||||
const SYSTEM_FIELDS = [
|
||||
{ id: 'custom', label: 'Custom' },
|
||||
{ id: 'name', label: 'Name' },
|
||||
{ id: 'createdAt', label: 'Date Created' },
|
||||
{ id: 'updatedAt', label: 'Date Modified' },
|
||||
{ id: 'sizeByte', label: 'Size' },
|
||||
]
|
||||
|
||||
export function SortControl({ fields, sort, onSortChange, disabled }: SortControlProps) {
|
||||
const allFields = [
|
||||
...SYSTEM_FIELDS,
|
||||
...fields.map((f) => ({
|
||||
const allFields = useMemo(() => {
|
||||
const sys = [
|
||||
{ id: 'custom', label: m.sort_custom() },
|
||||
{ id: 'name', label: m.sort_name() },
|
||||
{ id: 'createdAt', label: m.sort_date_created() },
|
||||
{ id: 'updatedAt', label: m.sort_date_modified() },
|
||||
{ id: 'sizeByte', label: m.sort_size() },
|
||||
]
|
||||
const custom = fields.map((f) => ({
|
||||
id: f.id!,
|
||||
label: f.config?.name || f.description || 'Unknown',
|
||||
})),
|
||||
]
|
||||
label: f.config?.name || f.description || m.unknown(),
|
||||
}))
|
||||
return [...sys, ...custom]
|
||||
}, [fields])
|
||||
|
||||
// Default to Custom if no sort selected
|
||||
const currentFieldId = sort?.field || 'custom'
|
||||
@@ -43,15 +44,15 @@ export function SortControl({ fields, sort, onSortChange, disabled }: SortContro
|
||||
|
||||
const getDirectionOptions = (fieldId: string) => {
|
||||
if (fieldId === 'name') {
|
||||
return { asc: 'A → Z', desc: 'Z → A' }
|
||||
return { asc: m.sort_a_to_z(), desc: m.sort_z_to_a() }
|
||||
}
|
||||
if (['createdAt', 'updatedAt'].includes(fieldId)) {
|
||||
return { asc: 'Oldest → Newest', desc: 'Newest → Oldest' }
|
||||
return { asc: m.sort_oldest_to_newest(), desc: m.sort_newest_to_oldest() }
|
||||
}
|
||||
if (fieldId === 'sizeByte') {
|
||||
return { asc: 'Smallest → Largest', desc: 'Largest → Smallest' }
|
||||
return { asc: m.sort_smallest_to_largest(), desc: m.sort_largest_to_smallest() }
|
||||
}
|
||||
return { asc: 'Ascending', desc: 'Descending' }
|
||||
return { asc: m.ascending(), desc: m.descending() }
|
||||
}
|
||||
|
||||
const dirOptions = getDirectionOptions(currentFieldId)
|
||||
@@ -79,13 +80,13 @@ export function SortControl({ fields, sort, onSortChange, disabled }: SortContro
|
||||
className="h-8"
|
||||
disabled={disabled}
|
||||
>
|
||||
{sort ? `Sorted by ${currentField.label}` : 'Sort by'}
|
||||
{sort ? m.sorted_by({ field: currentField.label }) : m.sort_by()}
|
||||
</Button>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-[280px] p-3" align="end">
|
||||
<div className="grid gap-4">
|
||||
<div className="grid gap-2">
|
||||
<span className="text-sm text-muted-foreground">Sort by</span>
|
||||
<span className="text-sm text-muted-foreground">{m.sort_by()}</span>
|
||||
<Select value={currentFieldId} onValueChange={handleFieldChange}>
|
||||
<SelectTrigger className="w-full">
|
||||
<SelectValue />
|
||||
@@ -102,7 +103,7 @@ export function SortControl({ fields, sort, onSortChange, disabled }: SortContro
|
||||
|
||||
{currentFieldId !== 'custom' && (
|
||||
<div className="grid gap-2">
|
||||
<span className="text-sm text-muted-foreground">Order</span>
|
||||
<span className="text-sm text-muted-foreground">{m.order()}</span>
|
||||
<Button
|
||||
variant="outline"
|
||||
className="w-full justify-between font-normal"
|
||||
|
||||
@@ -23,6 +23,7 @@ import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'
|
||||
import { useForm, useStore } from '@tanstack/react-form'
|
||||
import { Loader2, Puzzle } from 'lucide-react'
|
||||
import { useEffect, useMemo } from 'react'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
import { toast } from 'sonner'
|
||||
import { AgentInfo, AgentType, ThinkingLevel, thinkingLevelSchema } from '@shumai/dtos'
|
||||
import { Textarea } from '@/ui/components/ui/textarea'
|
||||
@@ -41,7 +42,7 @@ interface AgentFormDialogProps {
|
||||
}
|
||||
|
||||
const agentFormSchema = z.object({
|
||||
name: z.string().min(1, 'Name is required'),
|
||||
name: z.string().min(1, m.name_is_required()),
|
||||
type: z.enum(['chat', 'autofill', 'embedding']),
|
||||
avatar: z.string().optional(),
|
||||
providerId: z.string().optional(),
|
||||
@@ -98,14 +99,14 @@ export function AgentFormDialog({
|
||||
if (!data.providerId) {
|
||||
ctx.addIssue({
|
||||
code: z.ZodIssueCode.custom,
|
||||
message: 'Provider is required',
|
||||
message: m.provider_is_required(),
|
||||
path: ['providerId'],
|
||||
})
|
||||
}
|
||||
if (!data.modelId) {
|
||||
ctx.addIssue({
|
||||
code: z.ZodIssueCode.custom,
|
||||
message: 'Model is required',
|
||||
message: m.model_is_required(),
|
||||
path: ['modelId'],
|
||||
})
|
||||
}
|
||||
@@ -167,10 +168,10 @@ export function AgentFormDialog({
|
||||
onSuccess: () => {
|
||||
onClose()
|
||||
queryClient.invalidateQueries({ queryKey: ['agents', teamId] })
|
||||
toast.success('Agent created successfully')
|
||||
toast.success(m.agent_created_successfully())
|
||||
},
|
||||
onError: (error) => {
|
||||
toast.error(`Error: ${error.message}`)
|
||||
toast.error(m.error_message({ message: error.message }))
|
||||
},
|
||||
})
|
||||
|
||||
@@ -186,10 +187,10 @@ export function AgentFormDialog({
|
||||
onSuccess: () => {
|
||||
onClose()
|
||||
queryClient.invalidateQueries({ queryKey: ['agents', teamId] })
|
||||
toast.success('Agent updated successfully')
|
||||
toast.success(m.agent_updated_successfully())
|
||||
},
|
||||
onError: (error) => {
|
||||
toast.error(`Error: ${error.message}`)
|
||||
toast.error(m.error_message({ message: error.message }))
|
||||
},
|
||||
})
|
||||
|
||||
@@ -217,9 +218,7 @@ export function AgentFormDialog({
|
||||
<DialogContent className="sm:max-w-3xl h-[90vh] flex flex-col p-0 overflow-hidden">
|
||||
<DialogHeader className="p-6 pb-2 flex-shrink-0">
|
||||
<DialogTitle>{title}</DialogTitle>
|
||||
<DialogDescription>
|
||||
Configure your AI agent's personality and capabilities.
|
||||
</DialogDescription>
|
||||
<DialogDescription>{m.configure_agent_description()}</DialogDescription>
|
||||
</DialogHeader>
|
||||
|
||||
<form
|
||||
@@ -239,12 +238,12 @@ export function AgentFormDialog({
|
||||
const isInvalid = !!field.state.meta.errors.length && field.state.meta.isTouched
|
||||
return (
|
||||
<Field data-invalid={isInvalid}>
|
||||
<FieldLabel>Agent Name</FieldLabel>
|
||||
<FieldLabel>{m.agent_name()}</FieldLabel>
|
||||
<Input
|
||||
value={field.state.value}
|
||||
onBlur={field.handleBlur}
|
||||
onChange={(e) => field.handleChange(e.target.value)}
|
||||
placeholder="e.g., Support Assistant"
|
||||
placeholder={m.agent_name_placeholder()}
|
||||
aria-invalid={isInvalid}
|
||||
/>
|
||||
{isInvalid && <FieldError errors={mapErrors(field.state.meta.errors)} />}
|
||||
@@ -257,7 +256,7 @@ export function AgentFormDialog({
|
||||
name="type"
|
||||
children={(field) => (
|
||||
<Field>
|
||||
<FieldLabel>Agent Type</FieldLabel>
|
||||
<FieldLabel>{m.agent_type()}</FieldLabel>
|
||||
<Select
|
||||
value={field.state.value}
|
||||
onValueChange={(val) => field.handleChange(val as AgentType)}
|
||||
@@ -267,9 +266,9 @@ export function AgentFormDialog({
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="chat">Chat</SelectItem>
|
||||
<SelectItem value="autofill">Autofill</SelectItem>
|
||||
<SelectItem value="embedding">Embedding</SelectItem>
|
||||
<SelectItem value="chat">{m.agent_type_chat()}</SelectItem>
|
||||
<SelectItem value="autofill">{m.agent_type_autofill()}</SelectItem>
|
||||
<SelectItem value="embedding">{m.agent_type_embedding()}</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</Field>
|
||||
@@ -280,7 +279,7 @@ export function AgentFormDialog({
|
||||
name="avatar"
|
||||
children={(field) => (
|
||||
<Field className="md:col-span-2">
|
||||
<FieldLabel>Agent Avatar</FieldLabel>
|
||||
<FieldLabel>{m.agent_avatar()}</FieldLabel>
|
||||
<div className="flex gap-4 mt-2">
|
||||
{AVAILABLE_AVATARS.map((avatarPath) => {
|
||||
const isSelected = field.state.value === avatarPath
|
||||
@@ -299,7 +298,7 @@ export function AgentFormDialog({
|
||||
<img
|
||||
src={avatarPath}
|
||||
className="w-full h-full object-cover"
|
||||
alt="Preset Avatar Option"
|
||||
alt={m.preset_avatar_option()}
|
||||
/>
|
||||
</button>
|
||||
)
|
||||
@@ -312,7 +311,7 @@ export function AgentFormDialog({
|
||||
<img
|
||||
src={field.state.value}
|
||||
className="w-full h-full object-cover"
|
||||
alt="Current Custom Avatar"
|
||||
alt={m.current_custom_avatar()}
|
||||
/>
|
||||
</button>
|
||||
)}
|
||||
@@ -332,7 +331,7 @@ export function AgentFormDialog({
|
||||
!!field.state.meta.errors.length && field.state.meta.isTouched
|
||||
return (
|
||||
<Field data-invalid={isInvalid}>
|
||||
<FieldLabel>Provider</FieldLabel>
|
||||
<FieldLabel>{m.provider()}</FieldLabel>
|
||||
<Select
|
||||
value={field.state.value}
|
||||
onValueChange={(val) => {
|
||||
@@ -341,7 +340,7 @@ export function AgentFormDialog({
|
||||
}}
|
||||
>
|
||||
<SelectTrigger aria-invalid={isInvalid}>
|
||||
<SelectValue placeholder="Select Provider" />
|
||||
<SelectValue placeholder={m.select_provider()} />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{providers?.map((p) => (
|
||||
@@ -367,7 +366,7 @@ export function AgentFormDialog({
|
||||
return (
|
||||
<Field data-invalid={isInvalid}>
|
||||
<FieldLabel className="flex items-center gap-2">
|
||||
Model
|
||||
{m.model()}
|
||||
{isModelsLoading && <Loader2 className="w-3 h-3 animate-spin" />}
|
||||
</FieldLabel>
|
||||
<Select
|
||||
@@ -376,7 +375,7 @@ export function AgentFormDialog({
|
||||
disabled={!selectedProviderId || isModelsLoading}
|
||||
>
|
||||
<SelectTrigger aria-invalid={isInvalid}>
|
||||
<SelectValue placeholder="Select Model" />
|
||||
<SelectValue placeholder={m.select_model()} />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{models?.map((m) => (
|
||||
@@ -397,26 +396,34 @@ export function AgentFormDialog({
|
||||
<div className="md:col-span-2">
|
||||
<form.Field
|
||||
name="thinkingLevel"
|
||||
children={(field) => (
|
||||
<Field>
|
||||
<FieldLabel>Thinking Level</FieldLabel>
|
||||
<Select
|
||||
value={field.state.value}
|
||||
onValueChange={(val) => field.handleChange(val as ThinkingLevel)}
|
||||
>
|
||||
<SelectTrigger>
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{thinkingLevelSchema.options.map((level) => (
|
||||
<SelectItem key={level} value={level}>
|
||||
{level.charAt(0).toUpperCase() + level.slice(1)}
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</Field>
|
||||
)}
|
||||
children={(field) => {
|
||||
const thinkingLabels: Record<string, string> = {
|
||||
off: m.thinking_disable(),
|
||||
low: m.thinking_low(),
|
||||
medium: m.thinking_medium(),
|
||||
high: m.thinking_high(),
|
||||
}
|
||||
return (
|
||||
<Field>
|
||||
<FieldLabel>{m.thinking_level()}</FieldLabel>
|
||||
<Select
|
||||
value={field.state.value}
|
||||
onValueChange={(val) => field.handleChange(val as ThinkingLevel)}
|
||||
>
|
||||
<SelectTrigger>
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{thinkingLevelSchema.options.map((level) => (
|
||||
<SelectItem key={level} value={level}>
|
||||
{thinkingLabels[level] || level}
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</Field>
|
||||
)
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -425,12 +432,12 @@ export function AgentFormDialog({
|
||||
name="soul"
|
||||
children={(field) => (
|
||||
<Field>
|
||||
<FieldLabel>Agent Soul (Personality)</FieldLabel>
|
||||
<FieldLabel>{m.agent_soul()}</FieldLabel>
|
||||
<Textarea
|
||||
value={field.state.value}
|
||||
onBlur={field.handleBlur}
|
||||
onChange={(e) => field.handleChange(e.target.value)}
|
||||
placeholder="Describe the agent's personality, tone, and behavior..."
|
||||
placeholder={m.agent_soul_placeholder()}
|
||||
className="min-h-[120px]"
|
||||
/>
|
||||
</Field>
|
||||
@@ -440,7 +447,7 @@ export function AgentFormDialog({
|
||||
<div className="space-y-4">
|
||||
<Label className="text-base font-bold flex items-center gap-2">
|
||||
<Puzzle className="w-5 h-5 text-primary" />
|
||||
Skills
|
||||
{m.skills()}
|
||||
</Label>
|
||||
|
||||
<div className="space-y-2">
|
||||
@@ -468,7 +475,7 @@ export function AgentFormDialog({
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="text-xs text-muted-foreground">
|
||||
{isEnabled ? 'Enabled' : 'Disabled'}
|
||||
{isEnabled ? m.enabled() : m.disabled()}
|
||||
</span>
|
||||
<Switch
|
||||
checked={isEnabled}
|
||||
@@ -494,7 +501,7 @@ export function AgentFormDialog({
|
||||
{allSkills.length === 0 && (
|
||||
<div className="text-center py-8 border-2 border-dashed border-border rounded-xl">
|
||||
<p className="text-sm text-muted-foreground">
|
||||
No skills available.
|
||||
{m.no_skills_available()}
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
@@ -510,7 +517,7 @@ export function AgentFormDialog({
|
||||
|
||||
<DialogFooter className="p-6 pt-4 border-t border-border flex-shrink-0">
|
||||
<Button variant="outline" onClick={onClose} type="button">
|
||||
Cancel
|
||||
{m.cancel()}
|
||||
</Button>
|
||||
<form.Subscribe
|
||||
selector={(state) => [state.canSubmit, state.isSubmitting]}
|
||||
@@ -528,7 +535,7 @@ export function AgentFormDialog({
|
||||
{(isSubmitting || createMutation.isPending || updateMutation.isPending) && (
|
||||
<Loader2 className="w-4 h-4 animate-spin mr-2" />
|
||||
)}
|
||||
{initialValues ? 'Save Changes' : 'Create Agent'}
|
||||
{initialValues ? m.save_changes() : m.create_agent()}
|
||||
</Button>
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -37,6 +37,7 @@ import {
|
||||
import { cn } from '@/ui/lib/utils'
|
||||
import { ChevronDown } from 'lucide-react'
|
||||
import { Switch } from '@/ui/components/ui/switch'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
|
||||
interface AgentsSettingsProps {
|
||||
teamId: string
|
||||
@@ -65,6 +66,12 @@ export function AgentsSettings({ teamId }: AgentsSettingsProps) {
|
||||
embedding: true,
|
||||
})
|
||||
|
||||
const getSectionLabel = (type: AgentType) => {
|
||||
if (type === 'chat') return m.agent_type_chat()
|
||||
if (type === 'autofill') return m.agent_type_autofill()
|
||||
return m.agent_type_embedding()
|
||||
}
|
||||
|
||||
const { data: agents = [], isLoading } = useQuery({
|
||||
queryKey: ['agents', teamId],
|
||||
queryFn: async () => {
|
||||
@@ -87,7 +94,7 @@ export function AgentsSettings({ teamId }: AgentsSettingsProps) {
|
||||
onSuccess: () => {
|
||||
setIsDeleteDialogOpen(false)
|
||||
queryClient.invalidateQueries({ queryKey: ['agents', teamId] })
|
||||
toast.success('Agent deleted successfully')
|
||||
toast.success(m.agent_deleted_successfully())
|
||||
},
|
||||
onError: (error) => {
|
||||
toast.error(error.message)
|
||||
@@ -129,7 +136,7 @@ export function AgentsSettings({ teamId }: AgentsSettingsProps) {
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['agents', teamId] })
|
||||
toast.success('Agent updated successfully')
|
||||
toast.success(m.agent_updated_successfully())
|
||||
},
|
||||
onError: (error) => {
|
||||
toast.error(error.message)
|
||||
@@ -148,7 +155,11 @@ export function AgentsSettings({ teamId }: AgentsSettingsProps) {
|
||||
{(isCreateDialogOpen || editingAgent) && (
|
||||
<AgentFormDialog
|
||||
isOpen={true}
|
||||
title={editingAgent ? `Edit ${editingAgent.name}` : `Create ${createType} Agent`}
|
||||
title={
|
||||
editingAgent
|
||||
? m.edit_item({ name: editingAgent.name })
|
||||
: m.create_type_agent({ type: getSectionLabel(createType) })
|
||||
}
|
||||
onClose={() => {
|
||||
setIsCreateDialogOpen(false)
|
||||
setAgentToEdit(null)
|
||||
@@ -162,14 +173,13 @@ export function AgentsSettings({ teamId }: AgentsSettingsProps) {
|
||||
<AlertDialog open={isDeleteDialogOpen} onOpenChange={setIsDeleteDialogOpen}>
|
||||
<AlertDialogContent>
|
||||
<AlertDialogHeader>
|
||||
<AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
|
||||
<AlertDialogTitle>{m.are_you_absolutely_sure()}</AlertDialogTitle>
|
||||
<AlertDialogDescription>
|
||||
This action cannot be undone. This will permanently delete the agent "
|
||||
{agentToDelete?.name}" and remove all its data from our servers.
|
||||
{m.delete_agent_confirmation({ name: agentToDelete?.name ?? '' })}
|
||||
</AlertDialogDescription>
|
||||
</AlertDialogHeader>
|
||||
<AlertDialogFooter>
|
||||
<AlertDialogCancel>Cancel</AlertDialogCancel>
|
||||
<AlertDialogCancel>{m.cancel()}</AlertDialogCancel>
|
||||
<AlertDialogAction
|
||||
className="bg-destructive hover:bg-destructive/90 text-white"
|
||||
onClick={(e) => {
|
||||
@@ -185,7 +195,7 @@ export function AgentsSettings({ teamId }: AgentsSettingsProps) {
|
||||
{deleteAgentMutation.isPending ? (
|
||||
<Loader2 className="w-4 h-4 animate-spin" />
|
||||
) : (
|
||||
'Delete Agent'
|
||||
m.delete_agent()
|
||||
)}
|
||||
</AlertDialogAction>
|
||||
</AlertDialogFooter>
|
||||
@@ -222,7 +232,11 @@ export function AgentsSettings({ teamId }: AgentsSettingsProps) {
|
||||
>
|
||||
<div className="flex items-center gap-2">
|
||||
<h3 className="font-semibold text-foreground">
|
||||
{section.label} {isSingleAgentType ? 'Agent' : 'Agents'}
|
||||
{section.type === 'chat'
|
||||
? m.chat_agents()
|
||||
: section.type === 'autofill'
|
||||
? m.autofill_agent()
|
||||
: m.embedding_agent()}
|
||||
</h3>
|
||||
{!isSingleAgentType && (
|
||||
<Badge variant="secondary" className="h-5 px-1.5 min-w-[1.25rem] text-[10px]">
|
||||
@@ -285,7 +299,7 @@ export function AgentsSettings({ teamId }: AgentsSettingsProps) {
|
||||
<div className="flex items-center gap-2 text-xs text-muted-foreground mt-0.5">
|
||||
<span className="flex items-center gap-1">
|
||||
<Puzzle className="w-3 h-3" />
|
||||
{agent.skills?.length || 0} Skills
|
||||
{m.skills_count_value({ count: agent.skills?.length || 0 })}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -331,7 +345,7 @@ export function AgentsSettings({ teamId }: AgentsSettingsProps) {
|
||||
}}
|
||||
className="text-red-500 focus:text-red-500 gap-2 cursor-pointer"
|
||||
>
|
||||
<Trash2 className="w-4 h-4" /> Delete
|
||||
<Trash2 className="w-4 h-4" /> {m.delete()}
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>{' '}
|
||||
@@ -345,7 +359,7 @@ export function AgentsSettings({ teamId }: AgentsSettingsProps) {
|
||||
<Icon className="w-5 h-5 text-muted-foreground" />
|
||||
</div>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
No {section.label} {isSingleAgentType ? 'agent' : 'agents'} found
|
||||
{m.no_agents_found({ type: getSectionLabel(section.type) })}
|
||||
</p>
|
||||
<Button
|
||||
variant="link"
|
||||
@@ -356,7 +370,7 @@ export function AgentsSettings({ teamId }: AgentsSettingsProps) {
|
||||
setIsCreateDialogOpen(true)
|
||||
}}
|
||||
>
|
||||
Create one now
|
||||
{m.create_one_now()}
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
} from '@/ui/components/ui/dialog'
|
||||
import { Button } from '@/ui/components/ui/button'
|
||||
import { Move, ZoomIn, ZoomOut, Loader2 } from 'lucide-react'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
|
||||
interface AvatarCropDialogProps {
|
||||
isOpen: boolean
|
||||
@@ -141,7 +142,7 @@ export function AvatarCropDialog({ isOpen, onClose, imageSrc, onConfirm }: Avata
|
||||
<DialogHeader className="p-6 border-b border-border/40 bg-gradient-to-br from-primary/5 to-transparent">
|
||||
<DialogTitle className="text-xl font-bold flex items-center gap-2">
|
||||
<Move className="w-5 h-5 text-primary" />
|
||||
Position and resize
|
||||
{m.position_and_resize()}
|
||||
</DialogTitle>
|
||||
</DialogHeader>
|
||||
|
||||
@@ -163,7 +164,7 @@ export function AvatarCropDialog({ isOpen, onClose, imageSrc, onConfirm }: Avata
|
||||
<img
|
||||
ref={imageRef}
|
||||
src={imageSrc}
|
||||
alt="Avatar Source"
|
||||
alt={m.avatar_source()}
|
||||
crossOrigin="anonymous"
|
||||
className="absolute origin-center max-w-none pointer-events-none transition-transform duration-75 select-none"
|
||||
style={{
|
||||
@@ -206,16 +207,16 @@ export function AvatarCropDialog({ isOpen, onClose, imageSrc, onConfirm }: Avata
|
||||
|
||||
<DialogFooter className="p-6 border-t border-border/40 bg-muted/20 flex flex-row justify-end gap-3">
|
||||
<Button variant="outline" onClick={onClose} disabled={isSaving}>
|
||||
Cancel
|
||||
{m.cancel()}
|
||||
</Button>
|
||||
<Button onClick={handleConfirm} disabled={isSaving || !imageSrc} className="min-w-[80px]">
|
||||
{isSaving ? (
|
||||
<>
|
||||
<Loader2 className="w-4 h-4 animate-spin mr-2" />
|
||||
Saving
|
||||
{m.saving()}
|
||||
</>
|
||||
) : (
|
||||
'Save'
|
||||
m.save()
|
||||
)}
|
||||
</Button>
|
||||
</DialogFooter>
|
||||
|
||||
@@ -15,6 +15,7 @@ import {
|
||||
import { Loader2, Plus, Trash2, Copy, Check } from 'lucide-react'
|
||||
import { toast } from 'sonner'
|
||||
import type { ApiTokenResponse } from '@shumai/dtos'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
|
||||
export function DeveloperSettings({ teamId }: { teamId: string }) {
|
||||
const queryClient = useQueryClient()
|
||||
@@ -44,10 +45,10 @@ export function DeveloperSettings({ teamId }: { teamId: string }) {
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['teams', teamId, 'api-tokens'] })
|
||||
setTokenName('')
|
||||
toast.success('API token generated successfully')
|
||||
toast.success(m.api_token_generated_successfully())
|
||||
},
|
||||
onError: (err) => {
|
||||
toast.error(err instanceof Error ? err.message : 'Failed to generate token')
|
||||
toast.error(err instanceof Error ? err.message : m.failed_to_generate_token())
|
||||
},
|
||||
})
|
||||
|
||||
@@ -61,10 +62,10 @@ export function DeveloperSettings({ teamId }: { teamId: string }) {
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['teams', teamId, 'api-tokens'] })
|
||||
toast.success('API token revoked successfully')
|
||||
toast.success(m.api_token_revoked_successfully())
|
||||
},
|
||||
onError: (err) => {
|
||||
toast.error(err instanceof Error ? err.message : 'Failed to revoke token')
|
||||
toast.error(err instanceof Error ? err.message : m.failed_to_revoke_token())
|
||||
},
|
||||
})
|
||||
|
||||
@@ -77,7 +78,7 @@ export function DeveloperSettings({ teamId }: { teamId: string }) {
|
||||
const handleCopy = (id: string, token: string) => {
|
||||
navigator.clipboard.writeText(token)
|
||||
setCopiedId(id)
|
||||
toast.success('Copied API token to clipboard')
|
||||
toast.success(m.copied_api_token_to_clipboard())
|
||||
setTimeout(() => setCopiedId(null), 2000)
|
||||
}
|
||||
|
||||
@@ -93,23 +94,20 @@ export function DeveloperSettings({ teamId }: { teamId: string }) {
|
||||
<div className="space-y-6">
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle>API Tokens</CardTitle>
|
||||
<CardDescription>
|
||||
Generate and manage API tokens. These tokens allow you or your agents to run terminal
|
||||
commands via shumai-cli.
|
||||
</CardDescription>
|
||||
<CardTitle>{m.api_tokens()}</CardTitle>
|
||||
<CardDescription>{m.api_tokens_description()}</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent className="space-y-6">
|
||||
<form onSubmit={handleGenerate} className="flex gap-4 items-end max-w-md">
|
||||
<div className="flex-1 space-y-2">
|
||||
<label htmlFor="tokenName" className="text-sm font-medium text-muted-foreground">
|
||||
Token Name
|
||||
{m.token_name()}
|
||||
</label>
|
||||
<Input
|
||||
id="tokenName"
|
||||
value={tokenName}
|
||||
onChange={(e) => setTokenName(e.target.value)}
|
||||
placeholder="e.g. My CLI token"
|
||||
placeholder={m.token_name_placeholder()}
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
@@ -119,7 +117,7 @@ export function DeveloperSettings({ teamId }: { teamId: string }) {
|
||||
) : (
|
||||
<Plus className="w-4 h-4 mr-2" />
|
||||
)}
|
||||
Generate
|
||||
{m.generate()}
|
||||
</Button>
|
||||
</form>
|
||||
|
||||
@@ -127,10 +125,10 @@ export function DeveloperSettings({ teamId }: { teamId: string }) {
|
||||
<Table>
|
||||
<TableHeader>
|
||||
<TableRow>
|
||||
<TableHead>Name</TableHead>
|
||||
<TableHead>Token</TableHead>
|
||||
<TableHead>Created At</TableHead>
|
||||
<TableHead className="w-[100px] text-right">Actions</TableHead>
|
||||
<TableHead>{m.name()}</TableHead>
|
||||
<TableHead>{m.token()}</TableHead>
|
||||
<TableHead>{m.created_at()}</TableHead>
|
||||
<TableHead className="w-[100px] text-right">{m.actions()}</TableHead>
|
||||
</TableRow>
|
||||
</TableHeader>
|
||||
<TableBody>
|
||||
@@ -140,7 +138,7 @@ export function DeveloperSettings({ teamId }: { teamId: string }) {
|
||||
colSpan={4}
|
||||
className="text-center py-6 text-muted-foreground text-sm"
|
||||
>
|
||||
No API tokens found. Generate one above to get started.
|
||||
{m.no_api_tokens_found()}
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
) : (
|
||||
|
||||
@@ -12,6 +12,7 @@ import { Textarea } from '@/ui/components/ui/textarea'
|
||||
import React from 'react'
|
||||
import { PROVIDERS } from './constants'
|
||||
import { ThinkingLevel } from './types'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
|
||||
// --- Section Header ---
|
||||
export const SectionLabel: React.FC<{
|
||||
@@ -46,14 +47,14 @@ export const AgentTypeSelector: React.FC<{
|
||||
}> = ({ value, onChange }) => {
|
||||
return (
|
||||
<div className="space-y-2">
|
||||
<SectionLabel label="Agent Type" />
|
||||
<SectionLabel label={m.agent_type()} />
|
||||
<Select value={value} onValueChange={(val: 'chat' | 'autofill') => onChange(val)}>
|
||||
<SelectTrigger className="w-full">
|
||||
<SelectValue placeholder="Select type" />
|
||||
<SelectValue placeholder={m.select_type()} />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="chat">Chat Agent</SelectItem>
|
||||
<SelectItem value="autofill">Autofill Agent</SelectItem>
|
||||
<SelectItem value="chat">{m.chat_agent()}</SelectItem>
|
||||
<SelectItem value="autofill">{m.autofill_agent()}</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
@@ -96,7 +97,7 @@ export const ModelSelector: React.FC<ModelSelectorProps> = ({
|
||||
models,
|
||||
onProviderChange,
|
||||
onModelChange,
|
||||
label = 'AI Provider',
|
||||
label = m.ai_provider(),
|
||||
subLabel,
|
||||
}) => {
|
||||
return (
|
||||
@@ -105,7 +106,7 @@ export const ModelSelector: React.FC<ModelSelectorProps> = ({
|
||||
<SectionLabel label={label} subLabel={subLabel} />
|
||||
<Select value={provider || ''} onValueChange={(val) => onProviderChange(val)}>
|
||||
<SelectTrigger className="w-full">
|
||||
<SelectValue placeholder="Select provider" />
|
||||
<SelectValue placeholder={m.select_provider()} />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{PROVIDERS.map((p) => (
|
||||
@@ -118,10 +119,10 @@ export const ModelSelector: React.FC<ModelSelectorProps> = ({
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<SectionLabel label="Model" />
|
||||
<SectionLabel label={m.model()} />
|
||||
<Select value={model || ''} onValueChange={(val) => onModelChange(val)}>
|
||||
<SelectTrigger className="w-full">
|
||||
<SelectValue placeholder="Select model" />
|
||||
<SelectValue placeholder={m.select_model()} />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{models.length > 0 ? (
|
||||
@@ -132,7 +133,7 @@ export const ModelSelector: React.FC<ModelSelectorProps> = ({
|
||||
))
|
||||
) : (
|
||||
<SelectItem value="none" disabled>
|
||||
No models configured
|
||||
{m.no_models_configured()}
|
||||
</SelectItem>
|
||||
)}
|
||||
</SelectContent>
|
||||
@@ -154,22 +155,22 @@ export const ThinkingLevelSelector: React.FC<ThinkingLevelSelectorProps> = ({
|
||||
value,
|
||||
onChange,
|
||||
disabled,
|
||||
label = 'Thinking Strength',
|
||||
label = m.thinking_strength(),
|
||||
}) => {
|
||||
const levels = [
|
||||
{
|
||||
id: ThinkingLevel.DISABLED,
|
||||
label: 'Disable',
|
||||
desc: 'Standard generation',
|
||||
label: m.thinking_disable(),
|
||||
desc: m.standard_generation(),
|
||||
},
|
||||
{ id: ThinkingLevel.LOW, label: 'Low', desc: 'Quick reasoning' },
|
||||
{ id: ThinkingLevel.MEDIUM, label: 'Medium', desc: 'Balanced thought' },
|
||||
{ id: ThinkingLevel.HIGH, label: 'High', desc: 'Deep reasoning' },
|
||||
{ id: ThinkingLevel.LOW, label: m.thinking_low(), desc: m.quick_reasoning() },
|
||||
{ id: ThinkingLevel.MEDIUM, label: m.thinking_medium(), desc: m.balanced_thought() },
|
||||
{ id: ThinkingLevel.HIGH, label: m.thinking_high(), desc: m.deep_reasoning() },
|
||||
]
|
||||
|
||||
return (
|
||||
<div className={disabled ? 'opacity-50 pointer-events-none grayscale' : ''}>
|
||||
<SectionLabel label={label} subLabel="Control the depth of reasoning for complex tasks." />
|
||||
<SectionLabel label={label} subLabel={m.thinking_level_description()} />
|
||||
<div className="grid grid-cols-2 sm:grid-cols-4 gap-3">
|
||||
{levels.map((level) => {
|
||||
const isSelected = value === level.id
|
||||
|
||||
@@ -14,6 +14,7 @@ import {
|
||||
} from 'lucide-react'
|
||||
import { toast } from 'sonner'
|
||||
import type { NotificationSettings as Settings } from '@shumai/dtos'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
|
||||
export function NotificationSettings({ teamId }: { teamId: string }) {
|
||||
const queryClient = useQueryClient()
|
||||
@@ -24,7 +25,7 @@ export function NotificationSettings({ teamId }: { teamId: string }) {
|
||||
const res = await client.api.teams[':teamId'].notifications.settings.$get({
|
||||
param: { teamId },
|
||||
})
|
||||
if (!res.ok) throw new Error('Failed to fetch notification settings')
|
||||
if (!res.ok) throw new Error(m.failed_load_settings())
|
||||
return (await res.json()) as Settings
|
||||
},
|
||||
})
|
||||
@@ -35,16 +36,16 @@ export function NotificationSettings({ teamId }: { teamId: string }) {
|
||||
param: { teamId },
|
||||
json: updated,
|
||||
})
|
||||
if (!res.ok) throw new Error('Failed to update notification settings')
|
||||
if (!res.ok) throw new Error(m.failed_to_update_notification_settings())
|
||||
return await res.json()
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['teams', teamId, 'notification-settings'] })
|
||||
queryClient.invalidateQueries({ queryKey: ['teams', teamId, 'notifications'] })
|
||||
toast.success('Notification settings updated')
|
||||
toast.success(m.notification_settings_updated())
|
||||
},
|
||||
onError: (err) => {
|
||||
toast.error(err instanceof Error ? err.message : 'Failed to update notification settings')
|
||||
toast.error(err instanceof Error ? err.message : m.failed_to_update_notification_settings())
|
||||
},
|
||||
})
|
||||
|
||||
@@ -73,12 +74,9 @@ export function NotificationSettings({ teamId }: { teamId: string }) {
|
||||
<CardHeader className="border-b border-slate-100 dark:border-slate-800 bg-slate-50/50 dark:bg-slate-900/50">
|
||||
<div className="flex items-center gap-2">
|
||||
<MessageSquare className="w-5 h-5 text-blue-500" />
|
||||
<CardTitle className="text-lg">Comments & Replies</CardTitle>
|
||||
<CardTitle className="text-lg">{m.comments_and_replies()}</CardTitle>
|
||||
</div>
|
||||
<CardDescription>
|
||||
Control notification preferences when other users comment on assets you collaborate on
|
||||
or mention you.
|
||||
</CardDescription>
|
||||
<CardDescription>{m.comments_notification_description()}</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent className="divide-y divide-slate-100 dark:divide-slate-800 p-0">
|
||||
{/* General Comments */}
|
||||
@@ -89,10 +87,10 @@ export function NotificationSettings({ teamId }: { teamId: string }) {
|
||||
</div>
|
||||
<div className="space-y-0.5">
|
||||
<h4 className="text-sm font-semibold text-slate-900 dark:text-white">
|
||||
General Comments
|
||||
{m.general_comments()}
|
||||
</h4>
|
||||
<p className="text-sm text-slate-500 dark:text-slate-400">
|
||||
When someone comments on an asset
|
||||
{m.when_someone_comments()}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -111,10 +109,10 @@ export function NotificationSettings({ teamId }: { teamId: string }) {
|
||||
</div>
|
||||
<div className="space-y-0.5">
|
||||
<h4 className="text-sm font-semibold text-slate-900 dark:text-white">
|
||||
Comment Replies
|
||||
{m.comment_replies()}
|
||||
</h4>
|
||||
<p className="text-sm text-slate-500 dark:text-slate-400">
|
||||
When someone replies to your comment
|
||||
{m.when_someone_replies()}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -133,10 +131,10 @@ export function NotificationSettings({ teamId }: { teamId: string }) {
|
||||
</div>
|
||||
<div className="space-y-0.5">
|
||||
<h4 className="text-sm font-semibold text-slate-900 dark:text-white">
|
||||
@Mentions
|
||||
{m.at_mentions()}
|
||||
</h4>
|
||||
<p className="text-sm text-slate-500 dark:text-slate-400">
|
||||
When someone @mentions you in a comment
|
||||
{m.when_someone_mentions()}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -154,11 +152,9 @@ export function NotificationSettings({ teamId }: { teamId: string }) {
|
||||
<CardHeader className="border-b border-slate-100 dark:border-slate-800 bg-slate-50/50 dark:bg-slate-900/50">
|
||||
<div className="flex items-center gap-2">
|
||||
<UploadCloud className="w-5 h-5 text-emerald-500" />
|
||||
<CardTitle className="text-lg">Assets & Statuses</CardTitle>
|
||||
<CardTitle className="text-lg">{m.assets_and_statuses()}</CardTitle>
|
||||
</div>
|
||||
<CardDescription>
|
||||
Manage notifications related to file uploads and metadata field status updates.
|
||||
</CardDescription>
|
||||
<CardDescription>{m.assets_notification_description()}</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent className="divide-y divide-slate-100 dark:divide-slate-800 p-0">
|
||||
{/* Your Uploads */}
|
||||
@@ -169,10 +165,10 @@ export function NotificationSettings({ teamId }: { teamId: string }) {
|
||||
</div>
|
||||
<div className="space-y-0.5">
|
||||
<h4 className="text-sm font-semibold text-slate-900 dark:text-white">
|
||||
Your Uploads
|
||||
{m.your_uploads()}
|
||||
</h4>
|
||||
<p className="text-sm text-slate-500 dark:text-slate-400">
|
||||
When you upload assets
|
||||
{m.when_you_upload_assets()}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -191,10 +187,10 @@ export function NotificationSettings({ teamId }: { teamId: string }) {
|
||||
</div>
|
||||
<div className="space-y-0.5">
|
||||
<h4 className="text-sm font-semibold text-slate-900 dark:text-white">
|
||||
Other Uploads
|
||||
{m.other_uploads()}
|
||||
</h4>
|
||||
<p className="text-sm text-slate-500 dark:text-slate-400">
|
||||
When other users upload assets
|
||||
{m.when_other_users_upload_assets()}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -213,10 +209,10 @@ export function NotificationSettings({ teamId }: { teamId: string }) {
|
||||
</div>
|
||||
<div className="space-y-0.5">
|
||||
<h4 className="text-sm font-semibold text-slate-900 dark:text-white">
|
||||
Status Updates
|
||||
{m.status_updates()}
|
||||
</h4>
|
||||
<p className="text-sm text-slate-500 dark:text-slate-400">
|
||||
When someone changes an asset’s status
|
||||
{m.when_someone_changes_status()}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -59,6 +59,7 @@ import {
|
||||
import { useEffect, useMemo, useState } from 'react'
|
||||
import { toast } from 'sonner'
|
||||
import { z } from 'zod'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
|
||||
const API_PROTOCOL_LABELS: Record<(typeof KNOWN_APIS)[number], string> = {
|
||||
'openai-completions': 'OpenAI Completions',
|
||||
@@ -73,9 +74,9 @@ const API_PROTOCOL_LABELS: Record<(typeof KNOWN_APIS)[number], string> = {
|
||||
}
|
||||
|
||||
const providerFormSchemaBase = z.object({
|
||||
name: z.string().min(1, 'Provider name is required'),
|
||||
name: z.string().min(1, m.provider_name_is_required()),
|
||||
config: providerConfigSchema,
|
||||
models: z.array(providerModelSchema).min(1, 'At least one model is required'),
|
||||
models: z.array(providerModelSchema).min(1, m.at_least_one_model_required()),
|
||||
})
|
||||
|
||||
type ProviderFormValues = z.infer<typeof providerFormSchemaBase>
|
||||
@@ -153,10 +154,10 @@ export function ProvidersSettings({ teamId }: ProvidersSettingsProps) {
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['teams', teamId, 'providers'] })
|
||||
setIsCreateDialogOpen(false)
|
||||
toast.success('Provider created successfully')
|
||||
toast.success(m.provider_created_successfully())
|
||||
},
|
||||
onError: (error) => {
|
||||
toast.error(`Error: ${error.message}`)
|
||||
toast.error(m.error_message({ message: error.message }))
|
||||
},
|
||||
})
|
||||
|
||||
@@ -176,10 +177,10 @@ export function ProvidersSettings({ teamId }: ProvidersSettingsProps) {
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['teams', teamId, 'providers'] })
|
||||
setEditingProviderId(null)
|
||||
toast.success('Provider updated successfully')
|
||||
toast.success(m.provider_updated_successfully())
|
||||
},
|
||||
onError: (error) => {
|
||||
toast.error(`Error: ${error.message}`)
|
||||
toast.error(m.error_message({ message: error.message }))
|
||||
},
|
||||
})
|
||||
|
||||
@@ -197,10 +198,10 @@ export function ProvidersSettings({ teamId }: ProvidersSettingsProps) {
|
||||
setEditingProviderId(null)
|
||||
setIsDeleteDialogOpen(false)
|
||||
setProviderToDelete(null)
|
||||
toast.success('Provider deleted successfully')
|
||||
toast.success(m.provider_deleted_successfully())
|
||||
},
|
||||
onError: (error) => {
|
||||
toast.error(`Error: ${error.message}`)
|
||||
toast.error(m.error_message({ message: error.message }))
|
||||
},
|
||||
})
|
||||
|
||||
@@ -218,21 +219,21 @@ export function ProvidersSettings({ teamId }: ProvidersSettingsProps) {
|
||||
<div className="flex items-center justify-between">
|
||||
<h3 className="text-lg font-semibold text-foreground flex items-center gap-2">
|
||||
<Cpu className="w-5 h-5 text-primary" />
|
||||
Configured AI Providers
|
||||
{m.configured_ai_providers()}
|
||||
</h3>
|
||||
<Button
|
||||
onClick={() => setIsCreateDialogOpen(true)}
|
||||
className="bg-primary hover:bg-primary/90 text-primary-foreground gap-2"
|
||||
>
|
||||
<Plus className="w-4 h-4" />
|
||||
Add Provider
|
||||
{m.add_provider()}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<div className="relative px-0.5">
|
||||
<Search className="absolute left-3.5 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground" />
|
||||
<Input
|
||||
placeholder="Search providers..."
|
||||
placeholder={m.search_providers_placeholder()}
|
||||
value={searchQuery}
|
||||
onChange={(e) => setSearchQuery(e.target.value)}
|
||||
className="pl-10 bg-card border-border focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-0"
|
||||
@@ -261,7 +262,7 @@ export function ProvidersSettings({ teamId }: ProvidersSettingsProps) {
|
||||
variant="secondary"
|
||||
className="flex-none text-[10px] uppercase tracking-wider font-bold h-5"
|
||||
>
|
||||
Built-in
|
||||
{m.built_in()}
|
||||
</Badge>
|
||||
)}
|
||||
</div>
|
||||
@@ -282,7 +283,7 @@ export function ProvidersSettings({ teamId }: ProvidersSettingsProps) {
|
||||
<span className="flex items-center gap-1 flex-none">
|
||||
<span className="h-1 w-1 rounded-full bg-muted-foreground/30 flex-none" />
|
||||
<Maximize2 className="w-3 h-3" />
|
||||
{provider.modelsCount} Models
|
||||
{m.n_models_count({ count: provider.modelsCount })}
|
||||
{editingProviderId === provider.id && isModelsLoading && (
|
||||
<Loader2 className="w-3 h-3 animate-spin ml-1" />
|
||||
)}
|
||||
@@ -311,7 +312,7 @@ export function ProvidersSettings({ teamId }: ProvidersSettingsProps) {
|
||||
}}
|
||||
className="text-destructive focus:text-destructive gap-2 cursor-pointer"
|
||||
>
|
||||
<Trash2 className="w-4 h-4" /> Delete
|
||||
<Trash2 className="w-4 h-4" /> {m.delete()}
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
@@ -324,19 +325,17 @@ export function ProvidersSettings({ teamId }: ProvidersSettingsProps) {
|
||||
{providers?.length === 0 && (
|
||||
<div className="text-center py-12 bg-muted/30 rounded-2xl border-2 border-dashed border-border">
|
||||
<Cpu className="w-12 h-12 text-muted-foreground/50 mx-auto mb-4" />
|
||||
<h4 className="text-foreground font-medium">No Providers Configured</h4>
|
||||
<p className="text-sm text-muted-foreground mt-1">
|
||||
Add your first AI provider to get started.
|
||||
</p>
|
||||
<h4 className="text-foreground font-medium">{m.no_providers_configured()}</h4>
|
||||
<p className="text-sm text-muted-foreground mt-1">{m.add_first_provider()}</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{providers && providers.length > 0 && filteredProviders.length === 0 && (
|
||||
<div className="text-center py-12">
|
||||
<Search className="w-12 h-12 text-muted-foreground/50 mx-auto mb-4" />
|
||||
<h4 className="text-foreground font-medium">No matches found</h4>
|
||||
<h4 className="text-foreground font-medium">{m.no_matches_found()}</h4>
|
||||
<p className="text-sm text-muted-foreground mt-1">
|
||||
Try adjusting your search for "{searchQuery}"
|
||||
{m.try_adjusting_search({ query: searchQuery })}
|
||||
</p>
|
||||
<Button
|
||||
variant="ghost"
|
||||
@@ -344,7 +343,7 @@ export function ProvidersSettings({ teamId }: ProvidersSettingsProps) {
|
||||
onClick={() => setSearchQuery('')}
|
||||
className="mt-4 text-primary hover:text-primary/90 hover:bg-primary/10"
|
||||
>
|
||||
Clear search
|
||||
{m.clear_search()}
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
@@ -356,7 +355,7 @@ export function ProvidersSettings({ teamId }: ProvidersSettingsProps) {
|
||||
onClose={() => setIsCreateDialogOpen(false)}
|
||||
onSubmit={(values) => createMutation.mutate(values)}
|
||||
isLoading={createMutation.isPending}
|
||||
title="Add New Provider"
|
||||
title={m.add_new_provider()}
|
||||
existingProviderNames={existingProviderNames}
|
||||
/>
|
||||
|
||||
@@ -376,20 +375,21 @@ export function ProvidersSettings({ teamId }: ProvidersSettingsProps) {
|
||||
: undefined
|
||||
}
|
||||
isBuiltin={editingProvider?.isBuiltin}
|
||||
title={`Edit ${editingProvider?.name}`}
|
||||
title={editingProvider ? m.edit_item({ name: editingProvider.name }) : ''}
|
||||
existingProviderNames={existingProviderNames}
|
||||
/>
|
||||
<AlertDialog open={isDeleteDialogOpen} onOpenChange={setIsDeleteDialogOpen}>
|
||||
<AlertDialogContent>
|
||||
<AlertDialogHeader>
|
||||
<AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
|
||||
<AlertDialogTitle>{m.are_you_absolutely_sure()}</AlertDialogTitle>
|
||||
<AlertDialogDescription>
|
||||
This action cannot be undone. This will permanently delete the provider "
|
||||
{providerToDelete?.name}" and all associated model configurations.
|
||||
{m.delete_provider_confirmation({ name: providerToDelete?.name ?? '' })}
|
||||
</AlertDialogDescription>
|
||||
</AlertDialogHeader>
|
||||
<AlertDialogFooter>
|
||||
<AlertDialogCancel onClick={() => setProviderToDelete(null)}>Cancel</AlertDialogCancel>
|
||||
<AlertDialogCancel onClick={() => setProviderToDelete(null)}>
|
||||
{m.cancel()}
|
||||
</AlertDialogCancel>
|
||||
<AlertDialogAction
|
||||
className="bg-destructive hover:bg-destructive/90 text-destructive-foreground"
|
||||
onClick={() => {
|
||||
@@ -403,7 +403,7 @@ export function ProvidersSettings({ teamId }: ProvidersSettingsProps) {
|
||||
) : (
|
||||
<Trash2 className="w-4 h-4 mr-2" />
|
||||
)}
|
||||
Delete
|
||||
{m.delete()}
|
||||
</AlertDialogAction>
|
||||
</AlertDialogFooter>
|
||||
</AlertDialogContent>
|
||||
@@ -504,9 +504,7 @@ function ProviderFormDialog({
|
||||
<DialogContent className="sm:max-w-4xl h-[90vh] flex flex-col p-0 overflow-hidden">
|
||||
<DialogHeader className="p-6 pb-2 shrink-0">
|
||||
<DialogTitle className="text-xl">{title}</DialogTitle>
|
||||
<DialogDescription>
|
||||
Configure authentication and model details for your AI provider.
|
||||
</DialogDescription>
|
||||
<DialogDescription>{m.configure_provider_description()}</DialogDescription>
|
||||
</DialogHeader>
|
||||
|
||||
<form
|
||||
@@ -529,14 +527,14 @@ function ProviderFormDialog({
|
||||
!!field.state.meta.errors.length && field.state.meta.isTouched
|
||||
return (
|
||||
<Field data-invalid={isInvalid}>
|
||||
<FieldLabel htmlFor={field.name}>Provider Name</FieldLabel>
|
||||
<FieldLabel htmlFor={field.name}>{m.provider_name()}</FieldLabel>
|
||||
<Input
|
||||
id={field.name}
|
||||
name={field.name}
|
||||
value={field.state.value}
|
||||
onBlur={field.handleBlur}
|
||||
onChange={(e) => field.handleChange(e.target.value)}
|
||||
placeholder="e.g., My OpenAI"
|
||||
placeholder={m.provider_name_placeholder()}
|
||||
disabled={isBuiltin}
|
||||
aria-invalid={isInvalid}
|
||||
/>
|
||||
@@ -553,14 +551,14 @@ function ProviderFormDialog({
|
||||
!!field.state.meta.errors.length && field.state.meta.isTouched
|
||||
return (
|
||||
<Field data-invalid={isInvalid}>
|
||||
<FieldLabel htmlFor={field.name}>Global API Protocol</FieldLabel>
|
||||
<FieldLabel htmlFor={field.name}>{m.global_api_protocol()}</FieldLabel>
|
||||
<Select
|
||||
onValueChange={field.handleChange as (value: string) => void}
|
||||
value={field.state.value}
|
||||
disabled={isBuiltin}
|
||||
>
|
||||
<SelectTrigger id={field.name} aria-invalid={isInvalid}>
|
||||
<SelectValue placeholder="Select API Protocol" />
|
||||
<SelectValue placeholder={m.select_api_protocol()} />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{KNOWN_APIS.map((api) => (
|
||||
@@ -584,7 +582,7 @@ function ProviderFormDialog({
|
||||
!!field.state.meta.errors.length && field.state.meta.isTouched
|
||||
return (
|
||||
<Field data-invalid={isInvalid}>
|
||||
<FieldLabel htmlFor={field.name}>Base URL (Optional)</FieldLabel>
|
||||
<FieldLabel htmlFor={field.name}>{m.base_url_optional()}</FieldLabel>
|
||||
<Input
|
||||
id={field.name}
|
||||
name={field.name}
|
||||
@@ -594,7 +592,7 @@ function ProviderFormDialog({
|
||||
placeholder="https://api.openai.com/v1"
|
||||
aria-invalid={isInvalid}
|
||||
/>
|
||||
<FieldDescription>Override the default endpoint.</FieldDescription>
|
||||
<FieldDescription>{m.override_default_endpoint()}</FieldDescription>
|
||||
{isInvalid && (
|
||||
<FieldError errors={mapErrors(field.state.meta.errors)} />
|
||||
)}
|
||||
@@ -616,7 +614,7 @@ function ProviderFormDialog({
|
||||
return (
|
||||
<Field data-invalid={isInvalid}>
|
||||
<FieldLabel htmlFor={field.name} className="text-base font-semibold">
|
||||
API Key
|
||||
{m.api_key()}
|
||||
</FieldLabel>
|
||||
<Input
|
||||
id={field.name}
|
||||
@@ -625,15 +623,11 @@ function ProviderFormDialog({
|
||||
value={field.state.value || ''}
|
||||
onBlur={field.handleBlur}
|
||||
onChange={(e) => field.handleChange(e.target.value)}
|
||||
placeholder="Enter API Key or Environment Variable"
|
||||
placeholder={m.api_key_placeholder()}
|
||||
aria-invalid={isInvalid}
|
||||
/>
|
||||
<FieldDescription className="text-xs mt-2">
|
||||
You can provide a literal value (e.g.{' '}
|
||||
<code className="bg-muted px-1 rounded text-primary">sk-...</code>) or
|
||||
an Environment variable name (e.g.{' '}
|
||||
<code className="bg-muted px-1 rounded text-primary">MY_API_KEY</code>
|
||||
).
|
||||
{m.api_key_description()}
|
||||
</FieldDescription>
|
||||
{isInvalid && (
|
||||
<FieldError errors={mapErrors(field.state.meta.errors)} />
|
||||
@@ -653,7 +647,7 @@ function ProviderFormDialog({
|
||||
children={(modelsField) => (
|
||||
<div className="space-y-4">
|
||||
<div className="flex items-center justify-between">
|
||||
<Label className="text-lg font-bold">Models Configuration</Label>
|
||||
<Label className="text-lg font-bold">{m.models_configuration()}</Label>
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
@@ -675,7 +669,7 @@ function ProviderFormDialog({
|
||||
className="gap-2"
|
||||
>
|
||||
<Plus className="w-4 h-4" />
|
||||
Add Model
|
||||
{m.add_model()}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@@ -694,7 +688,7 @@ function ProviderFormDialog({
|
||||
!!field.state.meta.errors.length && field.state.meta.isTouched
|
||||
return (
|
||||
<Field data-invalid={isInvalid}>
|
||||
<FieldLabel htmlFor={field.name}>Model ID</FieldLabel>
|
||||
<FieldLabel htmlFor={field.name}>{m.model_id()}</FieldLabel>
|
||||
<Input
|
||||
id={field.name}
|
||||
name={field.name}
|
||||
@@ -719,7 +713,7 @@ function ProviderFormDialog({
|
||||
return (
|
||||
<Field data-invalid={isInvalid}>
|
||||
<FieldLabel htmlFor={field.name}>
|
||||
Display Name (Optional)
|
||||
{m.display_name_optional()}
|
||||
</FieldLabel>
|
||||
<Input
|
||||
id={field.name}
|
||||
@@ -750,7 +744,7 @@ function ProviderFormDialog({
|
||||
className="rounded-lg border border-border p-3 shadow-sm bg-muted/50 justify-between"
|
||||
>
|
||||
<FieldLabel htmlFor={field.name}>
|
||||
Reasoning Support
|
||||
{m.reasoning_support()}
|
||||
</FieldLabel>
|
||||
<Switch
|
||||
id={field.name}
|
||||
@@ -769,7 +763,7 @@ function ProviderFormDialog({
|
||||
return (
|
||||
<Field data-invalid={isInvalid}>
|
||||
<FieldLabel htmlFor={field.name} className="text-xs">
|
||||
Context Window (tokens)
|
||||
{m.context_window_tokens()}
|
||||
</FieldLabel>
|
||||
<Input
|
||||
id={field.name}
|
||||
@@ -802,7 +796,7 @@ function ProviderFormDialog({
|
||||
return (
|
||||
<Field data-invalid={isInvalid}>
|
||||
<FieldLabel htmlFor={field.name} className="text-xs">
|
||||
Max Output Tokens
|
||||
{m.max_output_tokens()}
|
||||
</FieldLabel>
|
||||
<Input
|
||||
id={field.name}
|
||||
@@ -834,7 +828,7 @@ function ProviderFormDialog({
|
||||
htmlFor={field.name}
|
||||
className="text-xs flex items-center gap-1"
|
||||
>
|
||||
<DollarSign className="w-3 h-3" /> Input Cost (1M)
|
||||
<DollarSign className="w-3 h-3" /> {m.input_cost_1m()}
|
||||
</FieldLabel>
|
||||
<Input
|
||||
id={field.name}
|
||||
@@ -867,7 +861,7 @@ function ProviderFormDialog({
|
||||
htmlFor={field.name}
|
||||
className="text-xs flex items-center gap-1"
|
||||
>
|
||||
<DollarSign className="w-3 h-3" /> Output Cost (1M)
|
||||
<DollarSign className="w-3 h-3" /> {m.output_cost_1m()}
|
||||
</FieldLabel>
|
||||
<Input
|
||||
id={field.name}
|
||||
@@ -913,7 +907,7 @@ function ProviderFormDialog({
|
||||
|
||||
<DialogFooter className="p-6 pt-4 border-t border-border gap-2 shrink-0">
|
||||
<Button type="button" variant="outline" onClick={onClose} disabled={isLoading}>
|
||||
Cancel
|
||||
{m.cancel()}
|
||||
</Button>
|
||||
<form.Subscribe
|
||||
selector={(state) => [state.canSubmit, state.isSubmitting]}
|
||||
@@ -926,7 +920,7 @@ function ProviderFormDialog({
|
||||
{isSubmitting || isLoading ? (
|
||||
<Loader2 className="w-4 h-4 animate-spin" />
|
||||
) : (
|
||||
'Save Configuration'
|
||||
m.save_configuration()
|
||||
)}
|
||||
</Button>
|
||||
)}
|
||||
@@ -938,14 +932,15 @@ function ProviderFormDialog({
|
||||
<AlertDialog open={isDeleteDialogOpen} onOpenChange={setIsDeleteDialogOpen}>
|
||||
<AlertDialogContent>
|
||||
<AlertDialogHeader>
|
||||
<AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
|
||||
<AlertDialogTitle>{m.are_you_absolutely_sure()}</AlertDialogTitle>
|
||||
<AlertDialogDescription>
|
||||
This action cannot be undone. This will permanently delete the provider and all
|
||||
associated model configurations.
|
||||
{m.delete_provider_confirmation({ name: initialValues?.name ?? '' })}
|
||||
</AlertDialogDescription>
|
||||
</AlertDialogHeader>
|
||||
<AlertDialogFooter>
|
||||
<AlertDialogCancel>Cancel</AlertDialogCancel>
|
||||
<AlertDialogCancel onClick={() => setIsDeleteDialogOpen(false)}>
|
||||
{m.cancel()}
|
||||
</AlertDialogCancel>
|
||||
<AlertDialogAction
|
||||
className="bg-destructive hover:bg-destructive/90 text-destructive-foreground"
|
||||
onClick={() => {
|
||||
@@ -953,7 +948,7 @@ function ProviderFormDialog({
|
||||
setIsDeleteDialogOpen(false)
|
||||
}}
|
||||
>
|
||||
Delete
|
||||
{m.delete()}
|
||||
</AlertDialogAction>
|
||||
</AlertDialogFooter>
|
||||
</AlertDialogContent>
|
||||
|
||||
@@ -7,6 +7,7 @@ import { Input } from '@/ui/components/ui/input'
|
||||
import { Button } from '@/ui/components/ui/button'
|
||||
import { Loader2, Plus, X, Globe, Check, Trash2, ShieldAlert } from 'lucide-react'
|
||||
import { toast } from 'sonner'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
|
||||
export function SandboxSettings({ teamId }: { teamId: string }) {
|
||||
const queryClient = useQueryClient()
|
||||
@@ -18,7 +19,7 @@ export function SandboxSettings({ teamId }: { teamId: string }) {
|
||||
const res = await client.api.teams[':teamId'].sandbox.$get({
|
||||
param: { teamId },
|
||||
})
|
||||
if (!res.ok) throw new Error('Failed to fetch sandbox settings')
|
||||
if (!res.ok) throw new Error(m.failed_load_settings())
|
||||
return await res.json()
|
||||
},
|
||||
})
|
||||
@@ -29,15 +30,15 @@ export function SandboxSettings({ teamId }: { teamId: string }) {
|
||||
param: { teamId },
|
||||
json: params,
|
||||
})
|
||||
if (!res.ok) throw new Error('Failed to update sandbox settings')
|
||||
if (!res.ok) throw new Error(m.failed_to_update_sandbox_settings())
|
||||
return await res.json()
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['teams', teamId, 'sandbox'] })
|
||||
toast.success('Sandbox settings updated')
|
||||
toast.success(m.sandbox_settings_updated())
|
||||
},
|
||||
onError: (err) => {
|
||||
toast.error(err instanceof Error ? err.message : 'Failed to update sandbox settings')
|
||||
toast.error(err instanceof Error ? err.message : m.failed_to_update_sandbox_settings())
|
||||
},
|
||||
})
|
||||
|
||||
@@ -45,7 +46,7 @@ export function SandboxSettings({ teamId }: { teamId: string }) {
|
||||
e.preventDefault()
|
||||
if (!newDomain.trim()) return
|
||||
if (sandbox?.allowedDomains.includes(newDomain.trim())) {
|
||||
toast.error('Domain already exists')
|
||||
toast.error(m.domain_already_exists())
|
||||
return
|
||||
}
|
||||
const updatedAllowed = [...(sandbox?.allowedDomains || []), newDomain.trim()]
|
||||
@@ -86,12 +87,9 @@ export function SandboxSettings({ teamId }: { teamId: string }) {
|
||||
<CardHeader>
|
||||
<div className="flex items-center gap-2">
|
||||
<Globe className="w-5 h-5 text-primary" />
|
||||
<CardTitle>Network Sandbox</CardTitle>
|
||||
<CardTitle>{m.network_sandbox()}</CardTitle>
|
||||
</div>
|
||||
<CardDescription>
|
||||
Configure allowed domains for the sandboxed agent. By default, only essential domains
|
||||
are allowed.
|
||||
</CardDescription>
|
||||
<CardDescription>{m.network_sandbox_description()}</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<form onSubmit={handleAddDomain} className="flex gap-2 mb-6">
|
||||
@@ -107,12 +105,14 @@ export function SandboxSettings({ teamId }: { teamId: string }) {
|
||||
) : (
|
||||
<Plus className="w-4 h-4 mr-2" />
|
||||
)}
|
||||
Add Domain
|
||||
{m.add_domain()}
|
||||
</Button>
|
||||
</form>
|
||||
|
||||
<div className="space-y-2">
|
||||
<h4 className="text-sm font-medium text-muted-foreground mb-3">Allowed Domains</h4>
|
||||
<h4 className="text-sm font-medium text-muted-foreground mb-3">
|
||||
{m.allowed_domains()}
|
||||
</h4>
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{sandbox?.allowedDomains.map((domain) => (
|
||||
<div
|
||||
@@ -131,7 +131,7 @@ export function SandboxSettings({ teamId }: { teamId: string }) {
|
||||
))}
|
||||
{sandbox?.allowedDomains.length === 0 && (
|
||||
<div className="text-sm text-muted-foreground italic">
|
||||
No custom domains allowed
|
||||
{m.no_custom_domains_allowed()}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
@@ -144,12 +144,9 @@ export function SandboxSettings({ teamId }: { teamId: string }) {
|
||||
<CardHeader>
|
||||
<div className="flex items-center gap-2">
|
||||
<ShieldAlert className="w-5 h-5 text-orange-500" />
|
||||
<CardTitle>Pending Domain Approvals</CardTitle>
|
||||
<CardTitle>{m.pending_domain_approvals()}</CardTitle>
|
||||
</div>
|
||||
<CardDescription>
|
||||
These domains were blocked during agent execution. You can approve them to allow
|
||||
future network requests, or delete them from this list.
|
||||
</CardDescription>
|
||||
<CardDescription>{m.pending_domains_description()}</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div className="space-y-3">
|
||||
@@ -172,7 +169,7 @@ export function SandboxSettings({ teamId }: { teamId: string }) {
|
||||
disabled={isUpdating}
|
||||
>
|
||||
<Check className="w-4 h-4 mr-1.5" />
|
||||
Approve
|
||||
{m.approve()}
|
||||
</Button>
|
||||
<Button
|
||||
size="sm"
|
||||
@@ -182,7 +179,7 @@ export function SandboxSettings({ teamId }: { teamId: string }) {
|
||||
disabled={isUpdating}
|
||||
>
|
||||
<Trash2 className="w-4 h-4 mr-1.5" />
|
||||
Delete
|
||||
{m.delete()}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -190,7 +187,7 @@ export function SandboxSettings({ teamId }: { teamId: string }) {
|
||||
</div>
|
||||
) : (
|
||||
<div className="text-sm text-muted-foreground italic py-2">
|
||||
No pending domains requiring approval
|
||||
{m.no_pending_domains()}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
@@ -199,11 +196,8 @@ export function SandboxSettings({ teamId }: { teamId: string }) {
|
||||
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle>Filesystem Restriction</CardTitle>
|
||||
<CardDescription>
|
||||
The agent is restricted to reading and writing only within the <code>.pi</code> and{' '}
|
||||
<code>/tmp</code> folders. These settings are currently hardcoded for security.
|
||||
</CardDescription>
|
||||
<CardTitle>{m.filesystem_restriction()}</CardTitle>
|
||||
<CardDescription>{m.filesystem_restriction_description()}</CardDescription>
|
||||
</CardHeader>
|
||||
</Card>
|
||||
</div>
|
||||
|
||||
@@ -33,6 +33,7 @@ import {
|
||||
AlertDialogTitle,
|
||||
} from '@/ui/components/ui/alert-dialog'
|
||||
import { SkillInfo } from '@shumai/dtos'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
|
||||
const Github = (props: React.SVGProps<SVGSVGElement>) => (
|
||||
<svg
|
||||
@@ -68,7 +69,7 @@ export const SkillsConfigCard: React.FC<SkillsConfigCardProps> = ({ teamId }) =>
|
||||
queryKey: ['teams', teamId, 'skills'],
|
||||
queryFn: async () => {
|
||||
const res = await client.api.teams[':teamId'].skills.$get({ param: { teamId } })
|
||||
if (!res.ok) throw new Error('Failed to fetch skills')
|
||||
if (!res.ok) throw new Error(m.failed_load_settings())
|
||||
return await res.json()
|
||||
},
|
||||
})
|
||||
@@ -79,7 +80,7 @@ export const SkillsConfigCard: React.FC<SkillsConfigCardProps> = ({ teamId }) =>
|
||||
const res = await client.api.skills[':id'].$delete({
|
||||
param: { id },
|
||||
})
|
||||
if (!res.ok) throw new Error('Failed to delete skill')
|
||||
if (!res.ok) throw new Error(m.failed_to_delete())
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['teams', teamId, 'skills'] })
|
||||
@@ -97,14 +98,12 @@ export const SkillsConfigCard: React.FC<SkillsConfigCardProps> = ({ teamId }) =>
|
||||
<Puzzle className="w-6 h-6" />
|
||||
</div>
|
||||
<div>
|
||||
<CardTitle className="text-xl font-bold">Skills Management</CardTitle>
|
||||
<CardDescription>
|
||||
Extend your chatbot's capabilities with custom skills.
|
||||
</CardDescription>
|
||||
<CardTitle className="text-xl font-bold">{m.skills_management()}</CardTitle>
|
||||
<CardDescription>{m.skills_management_description()}</CardDescription>
|
||||
</div>
|
||||
</div>
|
||||
<Button onClick={() => setIsAddDialogOpen(true)} className="gap-2">
|
||||
<Plus className="w-4 h-4" /> Add Skill
|
||||
<Plus className="w-4 h-4" /> {m.add_skill()}
|
||||
</Button>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
@@ -117,9 +116,9 @@ export const SkillsConfigCard: React.FC<SkillsConfigCardProps> = ({ teamId }) =>
|
||||
<div className="mx-auto w-12 h-12 bg-muted rounded-full flex items-center justify-center mb-4 text-muted-foreground">
|
||||
<Puzzle className="w-6 h-6" />
|
||||
</div>
|
||||
<h3 className="text-lg font-medium text-foreground">No skills installed</h3>
|
||||
<h3 className="text-lg font-medium text-foreground">{m.no_skills_installed()}</h3>
|
||||
<p className="text-muted-foreground mt-1 max-w-xs mx-auto">
|
||||
Add a skill via GitHub URL or upload a ZIP file to get started.
|
||||
{m.add_skill_to_get_started()}
|
||||
</p>
|
||||
</div>
|
||||
) : (
|
||||
@@ -164,14 +163,13 @@ export const SkillsConfigCard: React.FC<SkillsConfigCardProps> = ({ teamId }) =>
|
||||
<AlertDialog open={isDeleteDialogOpen} onOpenChange={setIsDeleteDialogOpen}>
|
||||
<AlertDialogContent>
|
||||
<AlertDialogHeader>
|
||||
<AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
|
||||
<AlertDialogTitle>{m.are_you_absolutely_sure()}</AlertDialogTitle>
|
||||
<AlertDialogDescription>
|
||||
This action cannot be undone. This will permanently delete the skill "
|
||||
{selectedSkill?.name}" and all its configurations.
|
||||
{m.delete_skill_confirmation({ name: selectedSkill?.name ?? '' })}
|
||||
</AlertDialogDescription>
|
||||
</AlertDialogHeader>
|
||||
<AlertDialogFooter>
|
||||
<AlertDialogCancel>Cancel</AlertDialogCancel>
|
||||
<AlertDialogCancel>{m.cancel()}</AlertDialogCancel>
|
||||
<AlertDialogAction
|
||||
className="bg-destructive hover:bg-destructive/90 text-destructive-foreground"
|
||||
onClick={() => {
|
||||
@@ -185,7 +183,7 @@ export const SkillsConfigCard: React.FC<SkillsConfigCardProps> = ({ teamId }) =>
|
||||
) : (
|
||||
<Trash2 className="w-4 h-4 mr-2" />
|
||||
)}
|
||||
Delete
|
||||
{m.delete()}
|
||||
</AlertDialogAction>
|
||||
</AlertDialogFooter>
|
||||
</AlertDialogContent>
|
||||
@@ -225,18 +223,20 @@ const SkillItem = ({
|
||||
}}
|
||||
className="text-destructive focus:text-destructive gap-2 cursor-pointer"
|
||||
>
|
||||
<Trash2 className="w-4 h-4" /> Delete
|
||||
<Trash2 className="w-4 h-4" /> {m.delete()}
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
</div>
|
||||
<p className="text-sm text-muted-foreground line-clamp-2">
|
||||
{skill.description || 'No description provided.'}
|
||||
{skill.description || m.no_description_provided()}
|
||||
</p>
|
||||
</div>
|
||||
<div className="mt-4 flex items-center justify-between text-[10px] text-muted-foreground uppercase tracking-wider font-semibold">
|
||||
<span>Updated {new Date(skill.updatedAt).toLocaleDateString()}</span>
|
||||
<div className="px-2 py-0.5 rounded-full bg-primary/10 text-primary">Installed</div>
|
||||
<span>
|
||||
{m.updated_date()} {new Date(skill.updatedAt).toLocaleDateString()}
|
||||
</span>
|
||||
<div className="px-2 py-0.5 rounded-full bg-primary/10 text-primary">{m.installed()}</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
@@ -284,13 +284,13 @@ const AddSkillDialog = ({
|
||||
|
||||
if (res.status === 409) {
|
||||
const data = (await res.json()) as { error: string }
|
||||
if (window.confirm(`${data.error}\n\nDo you want to override the existing skill?`)) {
|
||||
if (window.confirm(`${data.error}\n\n${m.override_existing_skill()}`)) {
|
||||
await installSkill({ ...payload, override: true })
|
||||
return
|
||||
}
|
||||
} else if (!res.ok) {
|
||||
const errorData = (await res.json().catch(() => ({}))) as { error?: string }
|
||||
throw new Error(errorData.error || 'Failed to install skill')
|
||||
throw new Error(errorData.error || m.failed_to_install_skill())
|
||||
} else {
|
||||
queryClient.invalidateQueries({ queryKey: ['teams', teamId, 'skills'] })
|
||||
onOpenChange(false)
|
||||
@@ -300,7 +300,7 @@ const AddSkillDialog = ({
|
||||
if (err instanceof Error) {
|
||||
alert(err.message)
|
||||
} else {
|
||||
alert('An unknown error occurred')
|
||||
alert(m.an_unknown_error_occurred())
|
||||
}
|
||||
} finally {
|
||||
setIsProcessing(false)
|
||||
@@ -312,13 +312,13 @@ const AddSkillDialog = ({
|
||||
|
||||
const projectId = projectsData?.data?.[0]?.id
|
||||
if (!projectId) {
|
||||
alert('You need at least one project in your team to upload skills.')
|
||||
alert(m.need_project_to_upload_skills())
|
||||
return
|
||||
}
|
||||
|
||||
const fileToUpload = files[0]
|
||||
if (!fileToUpload.name.toLowerCase().endsWith('.zip')) {
|
||||
alert('Only .zip files are supported.')
|
||||
alert(m.only_zip_files_supported())
|
||||
return
|
||||
}
|
||||
|
||||
@@ -357,7 +357,7 @@ const AddSkillDialog = ({
|
||||
if (err instanceof Error) {
|
||||
alert(err.message)
|
||||
} else {
|
||||
alert('An unknown error occurred')
|
||||
alert(m.an_unknown_error_occurred())
|
||||
}
|
||||
} finally {
|
||||
setIsProcessing(false)
|
||||
@@ -368,16 +368,14 @@ const AddSkillDialog = ({
|
||||
<Dialog open={open} onOpenChange={onOpenChange}>
|
||||
<DialogContent className="sm:max-w-[450px]">
|
||||
<DialogHeader>
|
||||
<DialogTitle>Add New Skill</DialogTitle>
|
||||
<DialogDescription>
|
||||
Import a skill from a local ZIP archive or a GitHub repository.
|
||||
</DialogDescription>
|
||||
<DialogTitle>{m.add_new_skill()}</DialogTitle>
|
||||
<DialogDescription>{m.import_skill_description()}</DialogDescription>
|
||||
</DialogHeader>
|
||||
|
||||
<div className="space-y-6 pt-4">
|
||||
{/* File Upload Section */}
|
||||
<div className="space-y-3">
|
||||
<Label>Package Upload</Label>
|
||||
<Label>{m.package_upload()}</Label>
|
||||
<div
|
||||
onClick={() => !isProcessing && fileInputRef.current?.click()}
|
||||
className={cn(
|
||||
@@ -398,16 +396,16 @@ const AddSkillDialog = ({
|
||||
<Upload className="w-6 h-6 text-muted-foreground group-hover:text-primary" />
|
||||
</div>
|
||||
<div className="mt-3 text-center">
|
||||
<p className="text-sm font-medium text-foreground">Select ZIP file</p>
|
||||
<p className="text-sm font-medium text-foreground">{m.select_zip_file()}</p>
|
||||
<p className="text-[10px] text-muted-foreground mt-1 uppercase tracking-wider font-semibold">
|
||||
Packages must contain a SKILL.md
|
||||
{m.packages_must_contain_skill_md()}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{isProcessing && !githubUrl && (
|
||||
<div className="flex items-center gap-2 text-sm text-primary justify-center bg-primary/10 py-2 rounded-lg animate-pulse">
|
||||
<Loader2 className="w-4 h-4 animate-spin" />
|
||||
Processing package...
|
||||
{m.processing_package()}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
@@ -417,14 +415,14 @@ const AddSkillDialog = ({
|
||||
<span className="w-full border-t border-border" />
|
||||
</div>
|
||||
<div className="relative flex justify-center text-xs uppercase">
|
||||
<span className="bg-background px-2 text-muted-foreground font-bold">OR</span>
|
||||
<span className="bg-background px-2 text-muted-foreground font-bold">{m.or()}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* GitHub URL Section */}
|
||||
<div className="space-y-4">
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="githubUrl">GitHub Repository URL</Label>
|
||||
<Label htmlFor="githubUrl">{m.github_repository_url()}</Label>
|
||||
<div className="flex gap-2">
|
||||
<div className="relative flex-1">
|
||||
<Github className="absolute left-3 top-2.5 w-4 h-4 text-muted-foreground" />
|
||||
@@ -445,13 +443,11 @@ const AddSkillDialog = ({
|
||||
{isProcessing && githubUrl ? (
|
||||
<Loader2 className="w-4 h-4 animate-spin" />
|
||||
) : (
|
||||
'Install'
|
||||
m.install()
|
||||
)}
|
||||
</Button>
|
||||
</div>
|
||||
<p className="text-[10px] text-muted-foreground italic">
|
||||
Example: https://github.com/google/gemini-cli
|
||||
</p>
|
||||
<p className="text-[10px] text-muted-foreground italic">{m.github_url_example()}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -524,7 +520,7 @@ const ConfigSkillDialog = ({
|
||||
if (err instanceof Error) {
|
||||
alert(err.message)
|
||||
} else {
|
||||
alert('An unknown error occurred')
|
||||
alert(m.an_unknown_error_occurred())
|
||||
}
|
||||
} finally {
|
||||
setIsSaving(false)
|
||||
@@ -540,21 +536,17 @@ const ConfigSkillDialog = ({
|
||||
<div className="flex items-center justify-between">
|
||||
<DialogTitle className="flex items-center gap-2">
|
||||
<Code className="w-5 h-5 text-primary" />
|
||||
Configure Skill: {skill.name}
|
||||
{m.configure_skill({ name: skill.name })}
|
||||
</DialogTitle>
|
||||
</div>
|
||||
<DialogDescription>
|
||||
Manage environment variables for this skill instance.
|
||||
</DialogDescription>
|
||||
<DialogDescription>{m.manage_env_vars_description()}</DialogDescription>
|
||||
</DialogHeader>
|
||||
|
||||
<ScrollArea className="max-h-[60vh]">
|
||||
<div className="py-4 space-y-4 pr-4">
|
||||
{envVars.length === 0 ? (
|
||||
<div className="text-center py-10 bg-muted/50 rounded-xl border border-dashed border-border">
|
||||
<p className="text-muted-foreground text-sm italic">
|
||||
No environment variables found. Click "Add Variable" to create one.
|
||||
</p>
|
||||
<p className="text-muted-foreground text-sm italic">{m.no_env_vars_found()}</p>
|
||||
</div>
|
||||
) : (
|
||||
envVars.map((env: { name: string; default?: string | undefined }, index: number) => (
|
||||
@@ -571,28 +563,28 @@ const ConfigSkillDialog = ({
|
||||
|
||||
<div className="space-y-1.5">
|
||||
<Label className="text-[10px] uppercase tracking-wider font-bold text-muted-foreground">
|
||||
Variable Name
|
||||
{m.variable_name()}
|
||||
</Label>
|
||||
<Input
|
||||
value={env.name}
|
||||
onChange={(e) => handleEnvVarNameChange(index, e.target.value)}
|
||||
placeholder="e.app. API_KEY"
|
||||
placeholder="e.g. API_KEY"
|
||||
className="h-8 bg-background border-border text-sm font-mono"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="space-y-1.5">
|
||||
<Label className="text-[10px] uppercase tracking-wider font-bold text-muted-foreground">
|
||||
Default Value
|
||||
{m.default_value()}
|
||||
</Label>
|
||||
<Input
|
||||
value={env.default || ''}
|
||||
onChange={(e) => handleEnvVarValueChange(index, e.target.value)}
|
||||
placeholder="Optional default value..."
|
||||
placeholder={m.optional_default_value_placeholder()}
|
||||
className="h-8 bg-background border-border text-sm"
|
||||
/>
|
||||
<p className="text-[10px] text-muted-foreground italic">
|
||||
If left empty, the value will be read from the host machine's environment.
|
||||
{m.env_var_empty_note()}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -608,15 +600,15 @@ const ConfigSkillDialog = ({
|
||||
onClick={addEnvVar}
|
||||
className="h-8 gap-1.5 text-primary hover:text-primary hover:bg-primary/10"
|
||||
>
|
||||
<Plus className="w-3.5 h-3.5" /> Add Variable
|
||||
<Plus className="w-3.5 h-3.5" /> {m.add_variable()}
|
||||
</Button>
|
||||
<div className="flex gap-2">
|
||||
<Button variant="ghost" onClick={() => onOpenChange(false)}>
|
||||
Cancel
|
||||
{m.cancel()}
|
||||
</Button>
|
||||
<Button onClick={handleSave} disabled={isSaving} className="px-8">
|
||||
{isSaving ? <Loader2 className="w-4 h-4 animate-spin mr-2" /> : null}
|
||||
Save Changes
|
||||
{m.save_changes()}
|
||||
</Button>
|
||||
</div>
|
||||
</DialogFooter>
|
||||
|
||||
@@ -20,6 +20,7 @@ import { useUserMetadataStore } from '@/ui/stores/user-metadata'
|
||||
import { useTopNavStore } from '@/ui/stores/top-nav'
|
||||
import type { ShareLinkInfo } from '@shumai/dtos'
|
||||
import { toast } from 'sonner'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
|
||||
type ShareManagerProps = {
|
||||
teamId: string
|
||||
@@ -51,7 +52,7 @@ export default function ShareManager({
|
||||
const res = await client.api.shares[':shareId'].$get({
|
||||
param: { shareId },
|
||||
})
|
||||
if (!res.ok) throw new Error('Failed to fetch share link')
|
||||
if (!res.ok) throw new Error(m.failed_fetch_share_link())
|
||||
return (await res.json()) as unknown as ShareLinkInfo
|
||||
},
|
||||
})
|
||||
@@ -123,7 +124,7 @@ export default function ShareManager({
|
||||
order,
|
||||
},
|
||||
})
|
||||
if (!res.ok) throw new Error('Failed to fetch folders')
|
||||
if (!res.ok) throw new Error(m.failed_fetch_folders())
|
||||
return (await res.json()) as unknown as AssetInfoPaginatedList
|
||||
},
|
||||
enabled: !!currentFolderId,
|
||||
@@ -148,7 +149,7 @@ export default function ShareManager({
|
||||
order,
|
||||
},
|
||||
})
|
||||
if (!res.ok) throw new Error('Failed to fetch files')
|
||||
if (!res.ok) throw new Error(m.failed_fetch_files())
|
||||
return (await res.json()) as unknown as AssetInfoPaginatedList
|
||||
},
|
||||
enabled: !!currentFolderId,
|
||||
@@ -221,11 +222,11 @@ export default function ShareManager({
|
||||
const res = await $removeFromShare({
|
||||
param: { shareId, assetId },
|
||||
})
|
||||
if (!res.ok) throw new Error('Failed to remove')
|
||||
if (!res.ok) throw new Error(m.failed_remove())
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['folder-children', teamId, currentFolderId] })
|
||||
toast.success('Removed from share')
|
||||
toast.success(m.removed_from_share())
|
||||
},
|
||||
})
|
||||
|
||||
@@ -236,12 +237,12 @@ export default function ShareManager({
|
||||
param: { shareId },
|
||||
json,
|
||||
})
|
||||
if (!res.ok) throw new Error('Failed to update')
|
||||
if (!res.ok) throw new Error(m.failed_update())
|
||||
return await res.json()
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['share', shareId] })
|
||||
toast.success('Settings updated')
|
||||
toast.success(m.settings_updated())
|
||||
},
|
||||
})
|
||||
|
||||
@@ -250,7 +251,7 @@ export default function ShareManager({
|
||||
const currentFolderName =
|
||||
currentFolderId === shareRootId
|
||||
? shareLink?.name || ''
|
||||
: folders.find((f) => f.id === currentFolderId)?.name || 'Unknown'
|
||||
: folders.find((f) => f.id === currentFolderId)?.name || m.unknown()
|
||||
|
||||
setAncestorFolders((prev) => [{ id: currentFolderId!, name: currentFolderName }, ...prev])
|
||||
setCurrentFolderId(item.id)
|
||||
@@ -258,7 +259,7 @@ export default function ShareManager({
|
||||
}
|
||||
}
|
||||
|
||||
if (!shareLink) return <div>Loading...</div>
|
||||
if (!shareLink) return <div>{m.loading()}</div>
|
||||
|
||||
return (
|
||||
<DragDropProvider
|
||||
@@ -354,7 +355,7 @@ export default function ShareManager({
|
||||
<DragOverlay>
|
||||
{dragState?.isActive ? (
|
||||
<div className="flex items-center gap-2 rounded-md bg-popover px-3 py-2 text-sm font-medium shadow-md">
|
||||
Moving {dragState.itemCount} item{dragState.itemCount !== 1 ? 's' : ''}
|
||||
{m.moving_items({ count: dragState.itemCount })}
|
||||
</div>
|
||||
) : null}
|
||||
</DragOverlay>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { ShareLinkInfo, UpdateShareLinkRequest } from '@shumai/dtos'
|
||||
import { type FieldInfo as MetadataFieldInfo } from '@shumai/dtos'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
import { client } from '@/ui/api/client'
|
||||
import { Button } from '@/ui/components/ui/button'
|
||||
import { Input } from '@/ui/components/ui/input'
|
||||
@@ -62,7 +63,7 @@ export function ShareSettingsSidebar({
|
||||
const res = await client.api.projects[':projectId'].fields.$get({
|
||||
param: { projectId: shareLink.projectId },
|
||||
})
|
||||
if (!res.ok) throw new Error('Failed to fetch fields')
|
||||
if (!res.ok) throw new Error(m.failed_fetch_fields())
|
||||
return await res.json()
|
||||
},
|
||||
enabled: !!shareLink.projectId,
|
||||
@@ -75,13 +76,13 @@ export function ShareSettingsSidebar({
|
||||
param: { shareId: shareLink.id },
|
||||
json,
|
||||
})
|
||||
if (!res.ok) throw new Error('Failed to update')
|
||||
if (!res.ok) throw new Error(m.failed_update())
|
||||
return await res.json()
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['shares', shareLink.projectId] })
|
||||
queryClient.invalidateQueries({ queryKey: ['share', shareLink.id] })
|
||||
toast.success('Settings updated')
|
||||
toast.success(m.settings_updated())
|
||||
},
|
||||
})
|
||||
|
||||
@@ -89,7 +90,7 @@ export function ShareSettingsSidebar({
|
||||
|
||||
const copyToClipboard = (text: string) => {
|
||||
navigator.clipboard.writeText(text)
|
||||
toast.success('Copied to clipboard')
|
||||
toast.success(m.copied_to_clipboard())
|
||||
}
|
||||
|
||||
const toggleFieldVisibility = (fieldId: string) => {
|
||||
@@ -113,7 +114,7 @@ export function ShareSettingsSidebar({
|
||||
<div className="p-4 space-y-6">
|
||||
<div className="space-y-4">
|
||||
<div className="flex items-center justify-between">
|
||||
<h3 className="text-sm font-medium">Link Visibility</h3>
|
||||
<h3 className="text-sm font-medium">{m.link_visibility()}</h3>
|
||||
<Switch
|
||||
checked={!shareLink.isDisabled}
|
||||
onCheckedChange={(checked) => updateShare({ isDisabled: !checked })}
|
||||
@@ -134,11 +135,11 @@ export function ShareSettingsSidebar({
|
||||
</div>
|
||||
|
||||
<div className="space-y-1">
|
||||
<SidebarAccordionItem title="Security" icon={<Shield className="h-4 w-4" />}>
|
||||
<SidebarAccordionItem title={m.security()} icon={<Shield className="h-4 w-4" />}>
|
||||
<div className="p-3 space-y-4 pt-0">
|
||||
<div className="space-y-2">
|
||||
<div className="flex items-center justify-between">
|
||||
<Label className="text-xs">Password</Label>
|
||||
<Label className="text-xs">{m.password()}</Label>
|
||||
<Switch
|
||||
checked={isPasswordEnabled}
|
||||
onCheckedChange={(checked) => {
|
||||
@@ -153,18 +154,18 @@ export function ShareSettingsSidebar({
|
||||
type="text"
|
||||
value={password}
|
||||
onChange={(e) => setPassword(e.target.value)}
|
||||
placeholder="Enter password"
|
||||
placeholder={m.enter_password()}
|
||||
className="text-xs"
|
||||
/>
|
||||
<Button size="sm" onClick={() => updateShare({ password })}>
|
||||
Save
|
||||
{m.save()}
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<div className="flex items-center justify-between">
|
||||
<Label className="text-xs">Expiration Date</Label>
|
||||
<Label className="text-xs">{m.expiration_date()}</Label>
|
||||
<Switch
|
||||
checked={isExpireEnabled}
|
||||
onCheckedChange={(checked) => {
|
||||
@@ -191,7 +192,7 @@ export function ShareSettingsSidebar({
|
||||
</div>
|
||||
</div>
|
||||
</SidebarAccordionItem>
|
||||
<SidebarAccordionItem title="Appearance" icon={<Palette className="h-4 w-4" />}>
|
||||
<SidebarAccordionItem title={m.appearance()} icon={<Palette className="h-4 w-4" />}>
|
||||
<div className="p-3 space-y-3 pt-0 flex gap-2">
|
||||
<Button
|
||||
variant={viewMode === 'card' ? 'secondary' : 'outline'}
|
||||
@@ -200,7 +201,7 @@ export function ShareSettingsSidebar({
|
||||
onClick={() => onViewModeChange('card')}
|
||||
>
|
||||
<LayoutGrid className="h-4 w-4" />
|
||||
Grid
|
||||
{m.grid()}
|
||||
</Button>
|
||||
<Button
|
||||
variant={viewMode === 'list' ? 'secondary' : 'outline'}
|
||||
@@ -209,11 +210,11 @@ export function ShareSettingsSidebar({
|
||||
onClick={() => onViewModeChange('list')}
|
||||
>
|
||||
<List className="h-4 w-4" />
|
||||
List
|
||||
{m.list()}
|
||||
</Button>
|
||||
</div>
|
||||
</SidebarAccordionItem>
|
||||
<SidebarAccordionItem title="Fields" icon={<ListFilter className="h-4 w-4" />}>
|
||||
<SidebarAccordionItem title={m.fields()} icon={<ListFilter className="h-4 w-4" />}>
|
||||
<div className="p-3 space-y-3 pt-0">
|
||||
{(fields as MetadataFieldInfo[])?.map((field) => (
|
||||
<div key={field.id} className="flex items-center justify-between">
|
||||
@@ -226,10 +227,10 @@ export function ShareSettingsSidebar({
|
||||
))}
|
||||
</div>
|
||||
</SidebarAccordionItem>
|
||||
<SidebarAccordionItem title="Sort by" icon={<SortAsc className="h-4 w-4" />}>
|
||||
<SidebarAccordionItem title={m.sort_by()} icon={<SortAsc className="h-4 w-4" />}>
|
||||
<div className="p-3 space-y-4 pt-0">
|
||||
<div className="space-y-2">
|
||||
<Label className="text-xs text-muted-foreground">Field</Label>
|
||||
<Label className="text-xs text-muted-foreground">{m.field()}</Label>
|
||||
<Select
|
||||
value={currentSortField}
|
||||
onValueChange={(val) => {
|
||||
@@ -244,16 +245,16 @@ export function ShareSettingsSidebar({
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="index">Custom</SelectItem>
|
||||
<SelectItem value="name">Name</SelectItem>
|
||||
<SelectItem value="createdAt">Date Created</SelectItem>
|
||||
<SelectItem value="size">Size</SelectItem>
|
||||
<SelectItem value="index">{m.sort_custom()}</SelectItem>
|
||||
<SelectItem value="name">{m.sort_name()}</SelectItem>
|
||||
<SelectItem value="createdAt">{m.sort_date_created()}</SelectItem>
|
||||
<SelectItem value="size">{m.sort_size()}</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
|
||||
<div className="space-y-2">
|
||||
<Label className="text-xs text-muted-foreground">Order</Label>
|
||||
<Label className="text-xs text-muted-foreground">{m.order()}</Label>
|
||||
<Button
|
||||
variant="outline"
|
||||
className="w-full justify-between font-normal text-xs h-9"
|
||||
@@ -266,19 +267,19 @@ export function ShareSettingsSidebar({
|
||||
<span>
|
||||
{currentSortField === 'name'
|
||||
? currentSortOrder === 'asc'
|
||||
? 'A → Z'
|
||||
: 'Z → A'
|
||||
? m.sort_a_to_z()
|
||||
: m.sort_z_to_a()
|
||||
: currentSortField === 'createdAt'
|
||||
? currentSortOrder === 'asc'
|
||||
? 'Oldest → Newest'
|
||||
: 'Newest → Oldest'
|
||||
? m.sort_oldest_to_newest()
|
||||
: m.sort_newest_to_oldest()
|
||||
: currentSortField === 'size'
|
||||
? currentSortOrder === 'asc'
|
||||
? 'Smallest → Largest'
|
||||
: 'Largest → Smallest'
|
||||
? m.sort_smallest_to_largest()
|
||||
: m.sort_largest_to_smallest()
|
||||
: currentSortOrder === 'asc'
|
||||
? 'Ascending'
|
||||
: 'Descending'}
|
||||
? m.ascending()
|
||||
: m.descending()}
|
||||
</span>
|
||||
<ArrowDownUp className="h-4 w-4 opacity-50" />
|
||||
</Button>
|
||||
@@ -296,14 +297,14 @@ export function ShareSettingsSidebar({
|
||||
onClick={() => window.open(shareUrl, '_blank')}
|
||||
>
|
||||
<ExternalLink className="h-4 w-4 mr-2" />
|
||||
Open Share Link
|
||||
{m.open_share_link()}
|
||||
</Button>
|
||||
<Button
|
||||
className="w-full justify-center bg-blue-600 hover:bg-blue-700 text-white"
|
||||
onClick={() => copyToClipboard(shareUrl)}
|
||||
>
|
||||
<Copy className="h-4 w-4 mr-2" />
|
||||
Copy Link
|
||||
{m.copy_link()}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
DropdownMenuTrigger,
|
||||
} from '@/ui/components/ui/dropdown-menu'
|
||||
import { ArrowDownWideNarrow, ArrowUpNarrowWide, Check } from 'lucide-react'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
|
||||
interface SortDropdownProps {
|
||||
sortBy: string
|
||||
@@ -26,11 +27,11 @@ export function SortDropdown({ sortBy, sortDirection, onSortChange }: SortDropdo
|
||||
const formatSortBy = (field: string) => {
|
||||
switch (field) {
|
||||
case 'name':
|
||||
return 'Name'
|
||||
return m.sort_name()
|
||||
case 'created_at':
|
||||
return 'Created'
|
||||
return m.sort_created()
|
||||
case 'updated_at':
|
||||
return 'Updated'
|
||||
return m.sort_updated()
|
||||
default:
|
||||
return field
|
||||
}
|
||||
@@ -42,12 +43,12 @@ export function SortDropdown({ sortBy, sortDirection, onSortChange }: SortDropdo
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button variant="outline" className="gap-2 bg-muted/50">
|
||||
<span className="text-muted-foreground">Sorted by</span>
|
||||
<span className="text-muted-foreground">{m.sorted_by_label()}</span>
|
||||
<span className="font-medium text-foreground">{formatSortBy(sortBy)}</span>
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="end" className="w-56 p-2">
|
||||
<div className="text-xs font-semibold text-muted-foreground mb-2 px-2">Sort by</div>
|
||||
<div className="text-xs font-semibold text-muted-foreground mb-2 px-2">{m.sort_by()}</div>
|
||||
|
||||
{/* Field Selection */}
|
||||
<DropdownMenu>
|
||||
@@ -83,14 +84,14 @@ export function SortDropdown({ sortBy, sortDirection, onSortChange }: SortDropdo
|
||||
<span className="text-muted-foreground">
|
||||
{sortBy === 'name' ? (
|
||||
isAsc ? (
|
||||
<>from A → Z</>
|
||||
<>{m.sort_a_to_z()}</>
|
||||
) : (
|
||||
<>from Z → A</>
|
||||
<>{m.sort_z_to_a()}</>
|
||||
)
|
||||
) : isAsc ? (
|
||||
<>Oldest → Newest</>
|
||||
<>{m.sort_oldest_to_newest()}</>
|
||||
) : (
|
||||
<>Newest → Oldest</>
|
||||
<>{m.sort_newest_to_oldest()}</>
|
||||
)}
|
||||
</span>
|
||||
{isAsc ? (
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
} from '@/ui/components/ui/dialog'
|
||||
import { useQuery } from '@tanstack/react-query'
|
||||
import { useNavigate } from '@tanstack/react-router'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
|
||||
export function TeamSelector() {
|
||||
const navigate = useNavigate()
|
||||
@@ -23,7 +24,7 @@ export function TeamSelector() {
|
||||
})
|
||||
|
||||
if (isLoading) {
|
||||
return <div>Loading...</div>
|
||||
return <div>{m.loading()}</div>
|
||||
}
|
||||
|
||||
const teams = teamsData?.data
|
||||
@@ -37,10 +38,8 @@ export function TeamSelector() {
|
||||
<Dialog open={true}>
|
||||
<DialogContent>
|
||||
<DialogHeader>
|
||||
<DialogTitle>Select a Team</DialogTitle>
|
||||
<DialogDescription>
|
||||
You are a member of multiple teams. Please select one to continue.
|
||||
</DialogDescription>
|
||||
<DialogTitle>{m.select_a_team()}</DialogTitle>
|
||||
<DialogDescription>{m.select_team_description()}</DialogDescription>
|
||||
</DialogHeader>
|
||||
<div className="space-y-2">
|
||||
{teams?.map((team) => (
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { useEffect, useState } from 'react'
|
||||
import { Monitor, Moon, Sun } from 'lucide-react'
|
||||
import { cn } from '../lib/utils'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
|
||||
type Theme = 'light' | 'dark' | 'system'
|
||||
|
||||
@@ -53,14 +54,14 @@ export function ThemeSwitcher() {
|
||||
}
|
||||
|
||||
const options: { value: Theme; icon: typeof Sun; label: string }[] = [
|
||||
{ value: 'light', icon: Sun, label: 'Light' },
|
||||
{ value: 'dark', icon: Moon, label: 'Dark' },
|
||||
{ value: 'system', icon: Monitor, label: 'System' },
|
||||
{ value: 'light', icon: Sun, label: m.light() },
|
||||
{ value: 'dark', icon: Moon, label: m.dark() },
|
||||
{ value: 'system', icon: Monitor, label: m.system() },
|
||||
]
|
||||
|
||||
return (
|
||||
<div className="space-y-2">
|
||||
<div className="px-1 text-xs font-semibold text-sidebar-foreground/60">THEME</div>
|
||||
<div className="px-1 text-xs font-semibold text-sidebar-foreground/60">{m.theme()}</div>
|
||||
<div className="flex items-center gap-1 rounded-lg bg-sidebar-accent p-1">
|
||||
{options.map(({ value, icon: Icon, label }) => (
|
||||
<button
|
||||
|
||||
@@ -20,6 +20,7 @@ import { useNavigate } from '@tanstack/react-router'
|
||||
import { Check } from 'lucide-react'
|
||||
import { APP_VERSION } from '../version'
|
||||
import { useTheme } from './theme-provider'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
|
||||
const Github = (props: React.SVGProps<SVGSVGElement>) => (
|
||||
<svg
|
||||
@@ -101,28 +102,28 @@ export function UserMenu() {
|
||||
</>
|
||||
)}
|
||||
<DropdownMenuSub>
|
||||
<DropdownMenuSubTrigger>Theme</DropdownMenuSubTrigger>
|
||||
<DropdownMenuSubTrigger>{m.theme()}</DropdownMenuSubTrigger>
|
||||
<DropdownMenuPortal>
|
||||
<DropdownMenuSubContent>
|
||||
<DropdownMenuItem
|
||||
className="justify-between flex items-center"
|
||||
onClick={() => setTheme('light')}
|
||||
>
|
||||
<span>Light</span>
|
||||
<span>{m.light()}</span>
|
||||
{theme === 'light' && <Check className="size-4" />}
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem
|
||||
className="justify-between flex items-center"
|
||||
onClick={() => setTheme('dark')}
|
||||
>
|
||||
<span>Dark</span>
|
||||
<span>{m.dark()}</span>
|
||||
{theme === 'dark' && <Check className="size-4" />}
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem
|
||||
className="justify-between flex items-center"
|
||||
onClick={() => setTheme('system')}
|
||||
>
|
||||
<span>System</span>
|
||||
<span>{m.system()}</span>
|
||||
{theme === 'system' && <Check className="size-4" />}
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuSubContent>
|
||||
@@ -138,11 +139,11 @@ export function UserMenu() {
|
||||
}
|
||||
disabled={!teamId}
|
||||
>
|
||||
Settings
|
||||
{m.settings()}
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuSeparator />
|
||||
<DropdownMenuItem className="text-red-500 focus:text-red-500" onClick={handleLogout}>
|
||||
Log out
|
||||
{m.log_out()}
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuSeparator />
|
||||
<DropdownMenuItem
|
||||
@@ -152,7 +153,7 @@ export function UserMenu() {
|
||||
}
|
||||
>
|
||||
<Github className="size-3.5" />
|
||||
<span>Version {APP_VERSION}</span>
|
||||
<span>{m.version({ version: APP_VERSION })}</span>
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
|
||||
@@ -0,0 +1,799 @@
|
||||
{
|
||||
"$schema": "https://inlang.com/schema/inlang-message-format",
|
||||
"dashboard": "Dashboard",
|
||||
"notifications": "Notifications",
|
||||
"uploads": "Uploads",
|
||||
"language": "Language",
|
||||
"personal_info": "Personal Info",
|
||||
"language_settings": "Language Settings",
|
||||
"select_preferred_language": "Select your preferred display language.",
|
||||
"settings": "Settings",
|
||||
"welcome_back": "Welcome Back",
|
||||
"create_account": "Create Account",
|
||||
"select_a_team": "Select a Team",
|
||||
"projects": "Projects",
|
||||
"select_asset_to_view_details": "Select an asset to view details",
|
||||
"all_collections": "All Collections",
|
||||
"file_not_found": "File not found.",
|
||||
"recently_deleted_notice": "Items are automatically deleted after 30 days.",
|
||||
"all_share_links": "All Share Links",
|
||||
"link_visibility": "Link Visibility",
|
||||
"password_protected": "Password Protected",
|
||||
|
||||
"login": "Login",
|
||||
"login_subtitle": "Enter your credentials to access your account.",
|
||||
"email_address": "Email Address",
|
||||
"email_placeholder": "you@example.com",
|
||||
"password": "Password",
|
||||
"password_placeholder": "Your password",
|
||||
"logging_in": "Logging in...",
|
||||
"invalid_credentials": "Invalid credentials",
|
||||
"invalid_email_address": "Invalid email address",
|
||||
"password_is_required": "Password is required",
|
||||
"no_account_prompt": "Don't have an account? ",
|
||||
"sign_up": "Sign up",
|
||||
"demo_access": "Demo Access:",
|
||||
"demo_access_instructions": "Use \"foo@bar.com\" as the email and \"foo\" as the password to login.",
|
||||
|
||||
"signup_subtitle": "Start building and organizing your space.",
|
||||
"signup_failed": "Signup failed",
|
||||
"password_min_length": "Password must be at least 3 characters",
|
||||
"creating_account": "Creating account...",
|
||||
"already_have_account": "Already have an account? ",
|
||||
"login_here": "Login here",
|
||||
"registration_disabled": "Registration Disabled",
|
||||
"registration_disabled_description": "Public registration is currently disabled. You will need an invite code to join this team.",
|
||||
"first_user_notice": "You will be the owner of the default workspace as the first user!",
|
||||
"password_min_placeholder": "At least 3 characters",
|
||||
"invite_join_message": "{inviterName} invited you to join {targetName} as {role}.",
|
||||
|
||||
"cancel": "Cancel",
|
||||
"create": "Create",
|
||||
"save": "Save",
|
||||
"save_changes": "Save Changes",
|
||||
"delete": "Delete",
|
||||
"edit": "Edit",
|
||||
"remove": "Remove",
|
||||
"rename": "Rename",
|
||||
"confirm": "Confirm",
|
||||
"close": "Close",
|
||||
"loading": "Loading...",
|
||||
"search": "Search",
|
||||
"copy": "Copy",
|
||||
"copied": "Copied!",
|
||||
"download": "Download",
|
||||
"upload": "Upload",
|
||||
"back": "Back",
|
||||
"share": "Share",
|
||||
"add": "Add",
|
||||
"done": "Done",
|
||||
"error": "Error",
|
||||
"unknown": "Unknown",
|
||||
"yes": "Yes",
|
||||
"no": "No",
|
||||
"name": "Name",
|
||||
"email": "Email",
|
||||
"type": "Type",
|
||||
"size": "Size",
|
||||
"description": "Description",
|
||||
"preview": "Preview",
|
||||
"restore": "Restore",
|
||||
"reset": "Reset",
|
||||
"apply": "Apply",
|
||||
"install": "Install",
|
||||
"generate": "Generate",
|
||||
"approve": "Approve",
|
||||
"test": "Test",
|
||||
"or": "OR",
|
||||
"new": "New",
|
||||
|
||||
"select_team_description": "You are a member of multiple teams. Please select one to continue.",
|
||||
"create_team": "Create Team",
|
||||
|
||||
"all_projects": "All Projects",
|
||||
"create_project": "Create Project",
|
||||
"no_projects_yet": "No projects yet.",
|
||||
"project_created": "Project created",
|
||||
"failed_create_project": "Failed to create project",
|
||||
"project_settings": "Project Settings",
|
||||
"create_new_project": "Create New Project",
|
||||
"configure_new_project_description": "Configure your new project workspace and appearance.",
|
||||
"manage_project_description": "Manage and update your project workspace configurations.",
|
||||
"project_name": "Project Name",
|
||||
"project_name_placeholder": "e.g. Acme Marketing, Q3 Product Launch...",
|
||||
"project_name_hint": "A clear, concise name to identify your project space.",
|
||||
"project_cover": "Project Cover",
|
||||
"remove_cover": "Remove Cover",
|
||||
"uploading": "Uploading...",
|
||||
"cover_preview": "Cover Preview",
|
||||
"upload_image": "Upload Image",
|
||||
"upload_cover": "Upload cover",
|
||||
"upload_cover_hint": "Drag and drop, or browse. Recommended 1:1 (400×400px).",
|
||||
"project_preferences": "Project Preferences",
|
||||
"activity_notifications": "Activity Notifications",
|
||||
"activity_notifications_description": "Receive in-app updates for comments, uploads, and automated background analysis tasks inside this project.",
|
||||
"processing": "Processing...",
|
||||
"project_updated": "Project updated",
|
||||
"failed_update_project": "Failed to update project",
|
||||
"project_notification_updated": "Project notification settings updated",
|
||||
"failed_update_project_notification": "Failed to update project notification settings",
|
||||
"notification": "Notification",
|
||||
"are_you_sure": "Are you absolutely sure?",
|
||||
"delete_project_warning": "This action cannot be undone. This will permanently delete the project \"{name}\" and all its assets.",
|
||||
"type_delete_to_confirm": "Type **delete** to confirm:",
|
||||
"delete_placeholder": "delete",
|
||||
"deleting": "Deleting...",
|
||||
"team_members": "Team Members",
|
||||
"updated_ago": "Updated",
|
||||
|
||||
"all_files": "All Files",
|
||||
"recently_deleted": "Recently Deleted",
|
||||
"collections": "Collections",
|
||||
"shares": "Shares",
|
||||
|
||||
"no_collections_yet": "No collections created yet.",
|
||||
"collection_name": "Collection Name",
|
||||
"creator": "Creator",
|
||||
"created_date": "Created Date",
|
||||
"collection_created": "Collection created",
|
||||
"failed_create_collection": "Failed to create collection",
|
||||
"failed_save_collection": "Failed to save collection",
|
||||
"loading_collection": "Loading collection...",
|
||||
"untitled_collection": "Untitled Collection",
|
||||
"collection_saved": "Collection saved",
|
||||
"collection_renamed": "Collection renamed",
|
||||
"collection_deleted": "Collection deleted",
|
||||
|
||||
"no_share_links_yet": "No share links created yet.",
|
||||
"share_link_created": "Share link created",
|
||||
"share_link_status_updated": "Share link status updated",
|
||||
"link_copied": "Link copied to clipboard",
|
||||
"public_link": "Public Link",
|
||||
"active": "Active",
|
||||
"click_to_copy_link": "Click to copy link",
|
||||
"create_share_link": "Create Share Link",
|
||||
"share_link_renamed": "Share link renamed",
|
||||
"share_link_deleted": "Share link deleted",
|
||||
"share_settings": "Share Settings",
|
||||
"share_link_disabled": "This share link is disabled",
|
||||
"share_link_expired": "This share link has expired",
|
||||
"enter_password": "Enter password",
|
||||
"share_link_password_protected": "This share link is password protected.",
|
||||
"access_share": "Access Share",
|
||||
"incorrect_password": "Incorrect password. Please try again.",
|
||||
"share_expired": "Share Expired",
|
||||
"share_disabled": "Share Disabled",
|
||||
"add_to_share_links": "Add to Share Links",
|
||||
"added_to_share_link": "Added to share link",
|
||||
"remove_from_share": "Remove from Share",
|
||||
"removed_from_share": "Removed from share",
|
||||
"open_share_link": "Open Share Link",
|
||||
"copy_link": "Copy Link",
|
||||
"view": "View",
|
||||
|
||||
"security": "Security",
|
||||
"expiration_date": "Expiration Date",
|
||||
"appearance": "Appearance",
|
||||
"grid": "Grid",
|
||||
"list": "List",
|
||||
"field": "Field",
|
||||
"sort_by": "Sort by",
|
||||
"sorted_by": "Sorted by {field}",
|
||||
"sorted_by_label": "Sorted by",
|
||||
"order": "Order",
|
||||
"custom": "Custom",
|
||||
"date_created": "Date Created",
|
||||
"sort_a_to_z": "A → Z",
|
||||
"sort_z_to_a": "Z → A",
|
||||
"sort_oldest_to_newest": "Oldest → Newest",
|
||||
"sort_newest_to_oldest": "Newest → Oldest",
|
||||
"sort_smallest_to_largest": "Smallest → Largest",
|
||||
"sort_largest_to_smallest": "Largest → Smallest",
|
||||
"ascending": "Ascending",
|
||||
"descending": "Descending",
|
||||
"sort_name": "Name",
|
||||
"sort_date_created": "Date Created",
|
||||
"sort_date_modified": "Date Modified",
|
||||
"sort_size": "Size",
|
||||
"sort_custom": "Custom",
|
||||
"sort_created": "Created",
|
||||
"sort_updated": "Updated",
|
||||
|
||||
"general": "General",
|
||||
"general_settings": "General Settings",
|
||||
"general_settings_description": "View your personal information and team role.",
|
||||
"personal_info_description": "Manage your profile name and avatar image.",
|
||||
"avatar": "Avatar",
|
||||
"change": "Change",
|
||||
"enter_your_name": "Enter your name",
|
||||
"email_managed_by_auth": "Email address is managed by authentication provider.",
|
||||
"select_language": "Select Language",
|
||||
"english": "English",
|
||||
"chinese": "简体中文 (Chinese)",
|
||||
"language_updated": "Language updated successfully",
|
||||
"failed_update_language": "Failed to update language",
|
||||
"avatar_updated": "Avatar updated successfully",
|
||||
"failed_update_avatar": "Failed to update avatar",
|
||||
"avatar_removed": "Avatar removed successfully",
|
||||
"failed_remove_avatar": "Failed to remove avatar",
|
||||
"profile_updated": "Profile updated successfully",
|
||||
"failed_update_profile": "Failed to update profile",
|
||||
"failed_load_settings": "Failed to load settings.",
|
||||
|
||||
"media_processing": "Media Processing",
|
||||
"media_processing_description": "Manage your team's media transcoding configurations.",
|
||||
"transcode_settings": "Transcode Settings",
|
||||
"transcode_description": "Manage your team's media transcoding configurations.",
|
||||
"transcode_strategy_note": "Strategy: We select the best resolution from your list that supports the input quality. Content is never upscaled.",
|
||||
"video_strategy": "Video Strategy",
|
||||
"best_match": "Best match",
|
||||
"best_match_description": "Generates a single optimal resolution matching the source quality.",
|
||||
"all_resolutions": "All resolutions",
|
||||
"all_resolutions_description": "Generates all supported resolutions up to the source quality.",
|
||||
|
||||
"notification_settings": "Notification Settings",
|
||||
"notifications_description": "Configure your personal notification preferences for this team.",
|
||||
"notification_settings_updated": "Notification settings updated",
|
||||
"failed_to_update_notification_settings": "Failed to update notification settings",
|
||||
"comments_and_replies": "Comments & Replies",
|
||||
"comments_notification_description": "Control notification preferences when other users comment on assets you collaborate on or mention you.",
|
||||
"general_comments": "General Comments",
|
||||
"when_someone_comments": "When someone comments on an asset",
|
||||
"comment_replies": "Comment Replies",
|
||||
"when_someone_replies": "When someone replies to your comment",
|
||||
"at_mentions": "@Mentions",
|
||||
"when_someone_mentions": "When someone @mentions you in a comment",
|
||||
"assets_and_statuses": "Assets & Statuses",
|
||||
"assets_notification_description": "Manage notifications related to file uploads and metadata field status updates.",
|
||||
"your_uploads": "Your Uploads",
|
||||
"when_you_upload_assets": "When you upload assets",
|
||||
"other_uploads": "Other Uploads",
|
||||
"when_other_users_upload_assets": "When other users upload assets",
|
||||
"status_updates": "Status Updates",
|
||||
"when_someone_changes_status": "When someone changes an asset's status",
|
||||
|
||||
"api_tokens": "API Tokens",
|
||||
"api_tokens_description": "Generate and manage API tokens. These tokens allow you or your agents to run terminal commands via shumai-cli.",
|
||||
"developer_settings": "Developer Settings",
|
||||
"developer_description": "Generate and manage API keys for developers and automated workflows.",
|
||||
"token_name": "Token Name",
|
||||
"token_name_placeholder": "e.g. My CLI token",
|
||||
"token": "Token",
|
||||
"created_at": "Created At",
|
||||
"actions": "Actions",
|
||||
"no_api_tokens_found": "No API tokens found. Generate one above to get started.",
|
||||
"api_token_generated_successfully": "API token generated successfully",
|
||||
"failed_to_generate_token": "Failed to generate token",
|
||||
"api_token_revoked_successfully": "API token revoked successfully",
|
||||
"failed_to_revoke_token": "Failed to revoke token",
|
||||
"copied_to_clipboard": "Copied to clipboard",
|
||||
"copied_api_token_to_clipboard": "Copied API token to clipboard",
|
||||
|
||||
"ai": "AI",
|
||||
"providers": "Providers",
|
||||
"providers_description": "Configure AI providers and their models for this team.",
|
||||
"configured_ai_providers": "Configured AI Providers",
|
||||
"add_provider": "Add Provider",
|
||||
"search_providers_placeholder": "Search providers...",
|
||||
"built_in": "Built-in",
|
||||
"models_count": "Models",
|
||||
"n_models_count": "{count} Models",
|
||||
"no_providers_configured": "No Providers Configured",
|
||||
"add_first_provider": "Add your first AI provider to get started.",
|
||||
"no_matches_found": "No matches found",
|
||||
"try_adjusting_search": "Try adjusting your search for \"{query}\"",
|
||||
"clear_search": "Clear search",
|
||||
"add_new_provider": "Add New Provider",
|
||||
"provider_created_successfully": "Provider created successfully",
|
||||
"provider_updated_successfully": "Provider updated successfully",
|
||||
"provider_deleted_successfully": "Provider deleted successfully",
|
||||
"are_you_absolutely_sure": "Are you absolutely sure?",
|
||||
"delete_provider_confirmation": "This action cannot be undone. This will permanently delete the provider \"{name}\" and all associated model configurations.",
|
||||
"configure_provider_description": "Configure authentication and model details for your AI provider.",
|
||||
"provider_name": "Provider Name",
|
||||
"provider_name_placeholder": "e.g., My OpenAI",
|
||||
"provider_name_is_required": "Provider name is required",
|
||||
"provider_name_must_be_unique": "Provider name must be unique",
|
||||
"global_api_protocol": "Global API Protocol",
|
||||
"select_api_protocol": "Select API Protocol",
|
||||
"base_url_optional": "Base URL (Optional)",
|
||||
"override_default_endpoint": "Override the default endpoint.",
|
||||
"api_key": "API Key",
|
||||
"api_key_placeholder": "Enter API Key or Environment Variable",
|
||||
"api_key_description": "You can provide a literal value (e.g. sk-...) or an Environment variable name (e.g. MY_API_KEY).",
|
||||
"models_configuration": "Models Configuration",
|
||||
"add_model": "Add Model",
|
||||
"model_id": "Model ID",
|
||||
"display_name_optional": "Display Name (Optional)",
|
||||
"reasoning_support": "Reasoning Support",
|
||||
"context_window_tokens": "Context Window (tokens)",
|
||||
"max_output_tokens": "Max Output Tokens",
|
||||
"input_cost_1m": "Input Cost (1M)",
|
||||
"output_cost_1m": "Output Cost (1M)",
|
||||
"save_configuration": "Save Configuration",
|
||||
"at_least_one_model_required": "At least one model is required",
|
||||
"provider": "Provider",
|
||||
"model": "Model",
|
||||
"select_provider": "Select Provider",
|
||||
"select_model": "Select Model",
|
||||
|
||||
"skills": "Skills",
|
||||
"skills_description": "Add, update and configure AI skills for the team.",
|
||||
"skills_management": "Skills Management",
|
||||
"skills_management_description": "Extend your chatbot's capabilities with custom skills.",
|
||||
"add_skill": "Add Skill",
|
||||
"no_skills_installed": "No skills installed",
|
||||
"add_skill_to_get_started": "Add a skill via GitHub URL or upload a ZIP file to get started.",
|
||||
"delete_skill_confirmation": "This action cannot be undone. This will permanently delete the skill \"{name}\" and all its configurations.",
|
||||
"no_description_provided": "No description provided.",
|
||||
"updated_date": "Updated",
|
||||
"installed": "Installed",
|
||||
"override_existing_skill": "Do you want to override the existing skill?",
|
||||
"failed_to_install_skill": "Failed to install skill",
|
||||
"an_unknown_error_occurred": "An unknown error occurred",
|
||||
"need_project_to_upload_skills": "You need at least one project in your team to upload skills.",
|
||||
"only_zip_files_supported": "Only .zip files are supported.",
|
||||
"add_new_skill": "Add New Skill",
|
||||
"import_skill_description": "Import a skill from a local ZIP archive or a GitHub repository.",
|
||||
"package_upload": "Package Upload",
|
||||
"select_zip_file": "Select ZIP file",
|
||||
"packages_must_contain_skill_md": "Packages must contain a SKILL.md",
|
||||
"processing_package": "Processing package...",
|
||||
"github_repository_url": "GitHub Repository URL",
|
||||
"github_url_example": "Example: https://github.com/google/gemini-cli",
|
||||
"configure_skill": "Configure Skill: {name}",
|
||||
"manage_env_vars_description": "Manage environment variables for this skill instance.",
|
||||
"no_env_vars_found": "No environment variables found. Click \"Add Variable\" to create one.",
|
||||
"variable_name": "Variable Name",
|
||||
"default_value": "Default Value",
|
||||
"optional_default_value_placeholder": "Optional default value...",
|
||||
"env_var_empty_note": "If left empty, the value will be read from the host machine's environment.",
|
||||
"add_variable": "Add Variable",
|
||||
"skills_count": "Skills",
|
||||
|
||||
"agents": "Agents",
|
||||
"agents_description": "Manage AI agents and their personalities.",
|
||||
"ai_agents": "AI Agents",
|
||||
"ai_providers": "AI Providers",
|
||||
"create_agent": "Create Agent",
|
||||
"edit_item": "Edit {name}",
|
||||
"create_type_agent": "Create {type} Agent",
|
||||
"agent_created_successfully": "Agent created successfully",
|
||||
"agent_updated_successfully": "Agent updated successfully",
|
||||
"agent_deleted_successfully": "Agent deleted successfully",
|
||||
"delete_agent": "Delete Agent",
|
||||
"delete_agent_confirmation": "This action cannot be undone. This will permanently delete the agent \"{name}\" and remove all its data from our servers.",
|
||||
"no_agents_found": "No {type} agents found",
|
||||
"create_one_now": "Create one now",
|
||||
"configure_agent_description": "Configure your AI agent's personality and capabilities.",
|
||||
"agent_name": "Agent Name",
|
||||
"agent_name_placeholder": "e.g., Support Assistant",
|
||||
"agent_type": "Agent Type",
|
||||
"agent_type_chat": "Chat",
|
||||
"agent_type_autofill": "Autofill",
|
||||
"agent_type_embedding": "Embedding",
|
||||
"agent_avatar": "Agent Avatar",
|
||||
"preset_avatar_option": "Preset Avatar Option",
|
||||
"current_custom_avatar": "Current Custom Avatar",
|
||||
"thinking_level": "Thinking Level",
|
||||
"agent_soul": "Agent Soul (Personality)",
|
||||
"agent_soul_placeholder": "Describe the agent's personality, tone, and behavior...",
|
||||
"enabled": "Enabled",
|
||||
"disabled": "Disabled",
|
||||
"no_skills_available": "No skills available.",
|
||||
"name_is_required": "Name is required",
|
||||
"provider_is_required": "Provider is required",
|
||||
"model_is_required": "Model is required",
|
||||
"chat_agent": "Chat Agent",
|
||||
"chat_agents": "Chat Agents",
|
||||
"embedding_agent": "Embedding Agent",
|
||||
"skills_count_value": "{count} Skills",
|
||||
"autofill_agent": "Autofill Agent",
|
||||
"ai_provider": "AI Provider",
|
||||
"no_models_configured": "No models configured",
|
||||
"thinking_strength": "Thinking Strength",
|
||||
"thinking_disable": "Disable",
|
||||
"standard_generation": "Standard generation",
|
||||
"thinking_low": "Low",
|
||||
"quick_reasoning": "Quick reasoning",
|
||||
"thinking_medium": "Medium",
|
||||
"balanced_thought": "Balanced thought",
|
||||
"thinking_high": "High",
|
||||
"deep_reasoning": "Deep reasoning",
|
||||
"thinking_level_description": "Control the depth of reasoning for complex tasks.",
|
||||
"select_type": "Select type",
|
||||
|
||||
"agent_sandbox": "Agent Sandbox",
|
||||
"agent_sandbox_settings": "Agent Sandbox Settings",
|
||||
"sandbox_description": "Configure security and network restrictions for the AI agent.",
|
||||
"sandbox_settings_updated": "Sandbox settings updated",
|
||||
"failed_to_update_sandbox_settings": "Failed to update sandbox settings",
|
||||
"domain_already_exists": "Domain already exists",
|
||||
"network_sandbox": "Network Sandbox",
|
||||
"network_sandbox_description": "Configure allowed domains for the sandboxed agent. By default, only essential domains are allowed.",
|
||||
"add_domain": "Add Domain",
|
||||
"allowed_domains": "Allowed Domains",
|
||||
"no_custom_domains_allowed": "No custom domains allowed",
|
||||
"pending_domain_approvals": "Pending Domain Approvals",
|
||||
"pending_domains_description": "These domains were blocked during agent execution. You can approve them to allow future network requests, or delete them from this list.",
|
||||
"no_pending_domains": "No pending domains requiring approval",
|
||||
"filesystem_restriction": "Filesystem Restriction",
|
||||
"filesystem_restriction_description": "The agent is restricted to reading and writing only within the .pi and /tmp folders. These settings are currently hardcoded for security.",
|
||||
|
||||
"position_and_resize": "Position and resize",
|
||||
"avatar_source": "Avatar Source",
|
||||
"saving": "Saving",
|
||||
|
||||
"auth_tagline": "One workspace for all your creative assets.",
|
||||
"auth_description": "Upload and index your files, enrich them with custom metadata schemas, draw annotations directly on media, and gather instant feedback — all in one modern workspace built for creators.",
|
||||
"auth_feature_uploads": "Instant asset uploads & high-fidelity media players",
|
||||
"auth_feature_metadata": "Custom metadata schemas & drawing canvas reviews",
|
||||
"auth_feature_teams": "Frictionless team workspaces & secure sharing",
|
||||
"auth_community_cta": "Join our community of developers and designers.",
|
||||
|
||||
"versions": "Versions",
|
||||
"manage_versions": "Manage versions...",
|
||||
"show_left_sidebar": "Show Left Sidebar",
|
||||
"hide_left_sidebar": "Hide Left Sidebar",
|
||||
"show_right_sidebar": "Show Right Sidebar",
|
||||
"hide_right_sidebar": "Hide Right Sidebar",
|
||||
"card_view": "Card View",
|
||||
"list_view": "List View",
|
||||
"deleted": "Deleted",
|
||||
"failed_to_delete": "Failed to delete",
|
||||
"renamed_to": "Renamed to",
|
||||
"failed_to_rename": "Failed to rename",
|
||||
"move_to_trash": "Move to Trash",
|
||||
"delete_permanently": "Delete Permanently",
|
||||
|
||||
"open_navigation_menu": "Open navigation menu",
|
||||
|
||||
"preview_unavailable": "Preview unavailable",
|
||||
"download_original_file": "Download original file",
|
||||
"zoom_out": "Zoom Out",
|
||||
"zoom_in": "Zoom In",
|
||||
"fit": "Fit",
|
||||
"copy_image_to_clipboard": "Copy optimized image to clipboard",
|
||||
"download_original_image": "Download original image",
|
||||
|
||||
"no_item_selected": "No item selected",
|
||||
"select_file_to_view_details": "Select a file to view its details and comments.",
|
||||
"enlarged_view": "Enlarged view",
|
||||
"comments": "Comments",
|
||||
"fields": "Fields",
|
||||
|
||||
"folder_tree_assets": "Assets",
|
||||
"share_links": "Share Links",
|
||||
"all_collections_count": "All Collections ({count})",
|
||||
"all_share_links_count": "All Share Links ({count})",
|
||||
"rename_collection": "Rename Collection",
|
||||
"rename_share_link": "Rename Share Link",
|
||||
"rename_folder": "Rename Folder",
|
||||
"enter_new_name": "Enter new name",
|
||||
"delete_collection_confirm": "Delete Collection?",
|
||||
"delete_share_link_confirm": "Delete Share Link?",
|
||||
"delete_folder_confirm": "Delete Folder?",
|
||||
"delete_confirm_description": "Are you sure you want to delete this {type}? This action cannot be undone.",
|
||||
"folder_created": "Folder created",
|
||||
"failed_create_folder": "Failed to create folder",
|
||||
"folder_renamed": "Folder renamed",
|
||||
"folder_deleted": "Folder deleted",
|
||||
"failed_to_prepare_download_links": "Failed to prepare download links",
|
||||
"starting_download_files": "Starting download of {count} files. Please allow multiple downloads if prompted by your browser.",
|
||||
"some_downloads_failed": "Some downloads could not be started",
|
||||
"preparing_download": "Preparing Download",
|
||||
"confirm_download": "Confirm Download",
|
||||
"resolving_files_wait": "Resolving all files and folders. Please wait...",
|
||||
"folder_files_download_description": "Selected folder files will be prepared for download.",
|
||||
"preparing_download_links": "Preparing download links...",
|
||||
"download_includes_files": "This download will include {count} file(s).",
|
||||
"no_folder_structure": "No Folder Structure",
|
||||
"folder_structure_warning": "Folder hierarchy will be flattened. All nested files will be downloaded directly into your default download folder.",
|
||||
"start_download": "Start Download",
|
||||
"new_folder": "New Folder",
|
||||
"folder_name": "Folder name",
|
||||
|
||||
"moved_to_trash": "Moved to trash",
|
||||
"failed_move_to_trash": "Failed to move to trash",
|
||||
"permanently_deleted": "Permanently deleted",
|
||||
"failed_delete_permanently": "Failed to delete permanently",
|
||||
"renamed_successfully": "Renamed successfully",
|
||||
"moved_successfully": "Moved successfully",
|
||||
"failed_to_move": "Failed to move",
|
||||
"copied_successfully": "Copied successfully",
|
||||
"failed_to_copy": "Failed to copy",
|
||||
"restored": "Restored",
|
||||
"failed_to_restore": "Failed to restore",
|
||||
"moving_items": "Moving {count} item(s)",
|
||||
|
||||
"successfully_moved_items": "Successfully moved {count} item(s)",
|
||||
"go_to_folder": "Go to folder",
|
||||
"successfully_copied_items": "Successfully copied {count} item(s)",
|
||||
"trash_emptied_successfully": "Trash emptied successfully",
|
||||
"error_emptying_trash": "Error emptying trash",
|
||||
"n_items": "{count} Items",
|
||||
"n_items_selected": "{count} Item(s) selected",
|
||||
"n_folders_selected": "{count} folder(s) selected",
|
||||
"n_files_selected": "{count} file(s) selected",
|
||||
"drop_files_here_to_upload": "Drop files here to upload",
|
||||
"delete_asset_title": "Delete Asset?",
|
||||
"delete_asset_description": "Deleted items can be recovered for 30 days before being permanently deleted.",
|
||||
"empty_trash_title": "Empty Trash?",
|
||||
"empty_trash_description": "All items in the recently deleted folder will be permanently removed both from the database and from storage. This action cannot be undone.",
|
||||
"delete_now": "Delete Now",
|
||||
"loading_more": "Loading more...",
|
||||
"this_folder_is_empty": "This folder is empty",
|
||||
"confirm_download_dialog": "Confirm Download",
|
||||
"selected_files_will_be_prepared": "Selected files and folders will be prepared for download.",
|
||||
"no_folder_structure_warning": "Folder hierarchy will be flattened. All nested files will be downloaded directly into your default download folder.",
|
||||
"failed_to_upload_file": "Failed to upload file: {name}",
|
||||
"error_message": "Error: {message}",
|
||||
"count_overflow_assets": "10000+ Assets",
|
||||
"count_overflow_folders": "10000+ Folders",
|
||||
|
||||
"select_source_folder": "Select Source Folder",
|
||||
"assets": "Assets",
|
||||
"filter": "Filter",
|
||||
"project_members": "Project Members",
|
||||
|
||||
"upload_file": "Upload File",
|
||||
"upload_folder": "Upload Folder",
|
||||
"move_to": "Move to",
|
||||
"copy_to": "Copy to",
|
||||
"create_new_version": "Create new version",
|
||||
|
||||
"file_card_processing": "Processing",
|
||||
"failed_to_upload": "Failed to upload",
|
||||
"by": "by",
|
||||
"failed_to_upload_parenthesized": "(Failed to upload)",
|
||||
"n_items_count": "{count} Item(s)",
|
||||
"name_column": "Name",
|
||||
"size_column": "Size",
|
||||
"modified_column": "Modified",
|
||||
"file_uploaded": "File uploaded",
|
||||
|
||||
"all_downloads_initiated": "All downloads initiated successfully",
|
||||
"starting_download_of_n_files": "Starting download of {count} files. Please allow multiple downloads if prompted by your browser.",
|
||||
|
||||
"enter_your_details": "Enter your details",
|
||||
"provide_name_email_for_comment": "Please provide your name and email to add a comment.",
|
||||
"name_placeholder": "John Doe",
|
||||
"email_field_placeholder": "john@example.com",
|
||||
|
||||
"select_project": "Select Project",
|
||||
"select_a_project": "Select a project",
|
||||
"select_folder": "Select Folder",
|
||||
"select_project_first": "Select a project first",
|
||||
"copy_comments": "Copy comments",
|
||||
"move_here": "Move Here",
|
||||
"copy_here": "Copy Here",
|
||||
|
||||
"thumbnail": "Thumbnail",
|
||||
|
||||
"theme": "Theme",
|
||||
"light": "Light",
|
||||
"dark": "Dark",
|
||||
"system": "System",
|
||||
"log_out": "Log out",
|
||||
"version": "Version {version}",
|
||||
|
||||
"team_member": "Team Member",
|
||||
"project_member": "Project Member",
|
||||
"editor": "Editor",
|
||||
"reviewer": "Reviewer",
|
||||
"remove_member": "Remove Member",
|
||||
"remove_member_confirmation": "Are you sure you want to remove {name} from this {type}? This action cannot be undone.",
|
||||
"member_role_updated": "Member role updated",
|
||||
"failed_to_update_member_role": "Failed to update member role",
|
||||
"member_removed": "Member removed",
|
||||
"failed_to_remove_member": "Failed to remove member",
|
||||
"failed_to_generate_invite_link": "Failed to generate invite link",
|
||||
"invite_link_copied": "Invite link copied to clipboard",
|
||||
"add_team_member_to_project": "Add Team Member to Project",
|
||||
"added_member_successfully": "Added {name} successfully",
|
||||
"failed_to_add_member": "Failed to add {name}",
|
||||
"invite_new_member": "Invite New Member",
|
||||
"generate_link": "Generate Link",
|
||||
"members": "Members",
|
||||
|
||||
"essentials": "Essentials",
|
||||
"team_attributes": "Team Attributes",
|
||||
"custom_fields": "Custom Fields",
|
||||
"field_created_successfully": "Field created successfully",
|
||||
"field_updated_successfully": "Field updated successfully",
|
||||
"field_deleted_successfully": "Field deleted successfully",
|
||||
"confirm_delete_field": "Are you sure you want to delete this field?",
|
||||
"field_name": "Field Name",
|
||||
"field_name_placeholder": "e.g. Status",
|
||||
"field_type": "Field Type",
|
||||
"select_field_type": "Select field type",
|
||||
"description_optional_placeholder": "Description (Optional)",
|
||||
"ai_autofill": "AI Autofill",
|
||||
"select_field_to_edit": "Select a field to edit options",
|
||||
"type_label": "Type:",
|
||||
"options": "Options",
|
||||
"new_option": "New Option",
|
||||
"add_option": "Add option",
|
||||
"delete_field": "Delete field",
|
||||
"manage_fields": "Manage Fields",
|
||||
"groups": "Groups",
|
||||
"no_fields_found": "No fields found",
|
||||
"new_field": "New Field",
|
||||
"new_field_placeholder": "New Field",
|
||||
"search_fields_placeholder": "Search fields",
|
||||
"visible_count": "({count} visible)",
|
||||
"option_name_placeholder": "Option name",
|
||||
"unknown_field_type": "Unknown Field Type",
|
||||
|
||||
"settings_updated": "Settings updated",
|
||||
"failed_update_settings": "Failed to update settings",
|
||||
|
||||
"unknown_user": "Unknown User",
|
||||
"unknown_asset": "unknown asset",
|
||||
"unknown_project": "unknown project",
|
||||
"unknown_team": "unknown team",
|
||||
"notification_commented_on": "{creator} commented on {asset}",
|
||||
"notification_replied_to": "{creator} replied to a comment on {asset}",
|
||||
"notification_mentioned_you": "{creator} mentioned you in {asset}",
|
||||
"notification_uploaded": "{creator} uploaded {asset} to {project}",
|
||||
"notification_status_updated": "{creator} updated status of {asset}",
|
||||
"notification_joined_team": "{user} joined {team}",
|
||||
"notification_joined_project": "{user} joined {project}",
|
||||
"notification_generic": "New notification from {creator}",
|
||||
"all": "All",
|
||||
"unread": "Unread",
|
||||
"mark_all_as_read": "Mark all as read",
|
||||
"no_notifications": "No notifications",
|
||||
|
||||
"unknown_date": "Unknown Date",
|
||||
"today": "Today",
|
||||
"yesterday": "Yesterday",
|
||||
"untitled_upload": "Untitled Upload",
|
||||
"uploading_status": "Uploading",
|
||||
"no_uploads_yet": "No uploads yet",
|
||||
"no_uploads_hint": "Upload files in the project view to track progress here.",
|
||||
|
||||
"no_content": "No content.",
|
||||
"enter_some_text": "Enter some text...",
|
||||
|
||||
"pick_a_date": "Pick a date",
|
||||
"twenty_four_hours": "24 Hours",
|
||||
"one_week": "1 Week",
|
||||
"two_weeks": "2 Weeks",
|
||||
|
||||
"filters": "Filters",
|
||||
"filter_where": "Where",
|
||||
"filter_and": "and",
|
||||
"select_field": "Select field",
|
||||
"operator": "Operator",
|
||||
"add_condition": "+ Add condition",
|
||||
"operator_is": "is",
|
||||
"operator_is_not": "is not",
|
||||
"operator_contains": "contains",
|
||||
"operator_does_not_contain": "does not contain",
|
||||
"operator_is_empty": "is empty",
|
||||
"operator_is_not_empty": "is not empty",
|
||||
"operator_is_any_of": "is any of",
|
||||
"operator_is_none_of": "is none of",
|
||||
"operator_has_any_of": "has any of",
|
||||
"operator_has_all_of": "has all of",
|
||||
"operator_is_exactly": "is exactly",
|
||||
"operator_has_none_of": "has none of",
|
||||
"operator_is_within": "is within",
|
||||
"operator_is_before": "is before",
|
||||
"operator_is_after": "is after",
|
||||
"operator_is_on_or_before": "is on or before",
|
||||
"operator_is_on_or_after": "is on or after",
|
||||
"select_options": "Select options...",
|
||||
"select_option": "Select option",
|
||||
"date_today": "Today",
|
||||
"date_yesterday": "Yesterday",
|
||||
"date_tomorrow": "Tomorrow",
|
||||
"date_one_week_ago": "One week ago",
|
||||
"date_one_week_from_now": "One week from now",
|
||||
"date_one_month_ago": "One month ago",
|
||||
"date_one_month_from_now": "One month from now",
|
||||
"date_type": "Date type",
|
||||
"exact_date": "Exact date...",
|
||||
"toggle_checked": "Checked",
|
||||
"toggle_unchecked": "Unchecked",
|
||||
"enter_a_value": "Enter a value",
|
||||
"field_created_at": "Created At",
|
||||
"field_updated_at": "Updated At",
|
||||
"field_size": "Size",
|
||||
|
||||
"search_dialog_title": "Search",
|
||||
"search_by_content_placeholder": "Search records by content...",
|
||||
"search_by_name_placeholder": "Search records by name...",
|
||||
"search_button": "Search",
|
||||
"semantic_search": "Semantic Search",
|
||||
"semantic_search_requires_embedding": "* Semantic search requires an enabled embedding agent.",
|
||||
"active_filters": "active",
|
||||
"search_results": "Search Results",
|
||||
"semantic_search_slow": "Semantic search using media intelligence might be slow...",
|
||||
"querying_database": "Querying database...",
|
||||
"ready_to_search": "Ready to Search",
|
||||
"type_query_instruction": "Type your query above and click the Search button to display results.",
|
||||
"semantic_search_note": "Semantic search results will be ordered by their relevance to the search query text, but won't be strictly filtered. If you need accurate filtering, please add filter conditions to control that.",
|
||||
"search_failed": "Search failed",
|
||||
"enable_embedding_agent_hint": "Please create and enable an embedding agent in the team settings to use semantic search.",
|
||||
"no_records_matched": "No records matched your criteria",
|
||||
"try_adjusting_spelling": "Try adjusting spelling or removing filter rows.",
|
||||
"folder": "Folder",
|
||||
"size_prefix": "Size:",
|
||||
"match_found_at": "Match found at",
|
||||
"matched_items": "Matched {count} items",
|
||||
"saving_ellipsis": "Saving...",
|
||||
"save_as_collection": "Save as collection",
|
||||
"apply_and_close": "Apply and Close",
|
||||
|
||||
"generating": "Generating...",
|
||||
"autofilling_metadata": "Autofilling metadata...",
|
||||
"generating_embeddings": "Generating embeddings...",
|
||||
"contains_drawing_annotations": "Contains drawing annotations",
|
||||
"created_by_agent": "Created by Agent",
|
||||
"logs": "Logs",
|
||||
"reply": "Reply",
|
||||
"agent_session_logs": "Agent Session Logs",
|
||||
"agent_logs_description": "Step-by-step execution trace of the agent's background tasks and tool calls.",
|
||||
"role_user": "User",
|
||||
"role_agent": "Agent",
|
||||
"tool_result": "Tool Result:",
|
||||
"role_thinking": "Thinking",
|
||||
"calling_tool": "Calling Tool:",
|
||||
"tool_arguments": "Arguments",
|
||||
"image_object": "[Image Object]",
|
||||
"no_logs_found": "No logs found for this session.",
|
||||
"session_no_entries_yet": "The session might have been initialized but has not produced any entries yet.",
|
||||
|
||||
"reply_to": "reply to:",
|
||||
"reply_placeholder": "Reply...",
|
||||
"message_placeholder": "Message...",
|
||||
"arrow": "Arrow",
|
||||
"line": "Line",
|
||||
"box": "Box",
|
||||
"freehand": "Freehand",
|
||||
"disable_timestamp": "Disable Timestamp",
|
||||
"enable_timestamp": "Enable Timestamp",
|
||||
"attach_files": "Attach files",
|
||||
"toggle_annotation": "Toggle Annotation",
|
||||
|
||||
"loop": "Loop",
|
||||
"click_toggle_time_frames": "Click to toggle Time/Frames",
|
||||
"quality": "Quality",
|
||||
"media_not_available": "Media is not available.",
|
||||
"original": "Original",
|
||||
|
||||
"collection": "collection",
|
||||
"share_link": "share link",
|
||||
|
||||
"failed_fetch_share_links": "Failed to fetch share links",
|
||||
"failed_fetch_collections": "Failed to fetch collections",
|
||||
"failed_create_share_link": "Failed to create share link",
|
||||
"failed_rename_folder": "Failed to rename folder",
|
||||
"failed_delete_folder": "Failed to delete folder",
|
||||
"failed_rename_collection": "Failed to rename collection",
|
||||
"failed_delete_collection": "Failed to delete collection",
|
||||
"failed_rename_share_link": "Failed to rename share link",
|
||||
"failed_delete_share_link": "Failed to delete share link",
|
||||
"failed_to_fetch_folder_children": "Failed to fetch folder children",
|
||||
|
||||
"failed_update_fields_order": "Failed to update fields order",
|
||||
"failed_create_field": "Failed to create field",
|
||||
"failed_update_field": "Failed to update field",
|
||||
"failed_delete_field": "Failed to delete field",
|
||||
"new_label": "New",
|
||||
|
||||
"n_assets_singular": "{count} Asset",
|
||||
"n_assets_plural": "{count} Assets",
|
||||
"n_folders_singular": "{count} Folder",
|
||||
"n_folders_plural": "{count} Folders",
|
||||
"failed_upload_file": "Failed to upload file",
|
||||
|
||||
"failed_fetch_share_link": "Failed to fetch share link",
|
||||
"failed_fetch_folders": "Failed to fetch folders",
|
||||
"failed_fetch_files": "Failed to fetch files",
|
||||
"failed_remove": "Failed to remove",
|
||||
"failed_update": "Failed to update",
|
||||
"failed_fetch_fields": "Failed to fetch fields"
|
||||
}
|
||||
@@ -0,0 +1,799 @@
|
||||
{
|
||||
"$schema": "https://inlang.com/schema/inlang-message-format",
|
||||
"dashboard": "控制台",
|
||||
"notifications": "通知",
|
||||
"uploads": "上传管理",
|
||||
"language": "语言",
|
||||
"personal_info": "个人信息",
|
||||
"language_settings": "语言设置",
|
||||
"select_preferred_language": "选择您首选的显示语言。",
|
||||
"settings": "设置",
|
||||
"welcome_back": "欢迎回来",
|
||||
"create_account": "创建账户",
|
||||
"select_a_team": "选择团队",
|
||||
"projects": "项目",
|
||||
"select_asset_to_view_details": "选择资产查看详情",
|
||||
"all_collections": "所有收藏集",
|
||||
"file_not_found": "文件未找到。",
|
||||
"recently_deleted_notice": "项目将在 30 天后自动删除。",
|
||||
"all_share_links": "所有分享链接",
|
||||
"link_visibility": "链接可见性",
|
||||
"password_protected": "密码保护",
|
||||
|
||||
"login": "登录",
|
||||
"login_subtitle": "输入您的凭证以访问您的账户。",
|
||||
"email_address": "邮箱地址",
|
||||
"email_placeholder": "you@example.com",
|
||||
"password": "密码",
|
||||
"password_placeholder": "请输入密码",
|
||||
"logging_in": "登录中...",
|
||||
"invalid_credentials": "凭证无效",
|
||||
"invalid_email_address": "无效的邮箱地址",
|
||||
"password_is_required": "密码为必填项",
|
||||
"no_account_prompt": "还没有账户?",
|
||||
"sign_up": "注册",
|
||||
"demo_access": "演示访问:",
|
||||
"demo_access_instructions": "使用 \"foo@bar.com\" 作为邮箱,\"foo\" 作为密码登录。",
|
||||
|
||||
"signup_subtitle": "开始构建和整理您的空间。",
|
||||
"signup_failed": "注册失败",
|
||||
"password_min_length": "密码至少需要 3 个字符",
|
||||
"creating_account": "创建账户中...",
|
||||
"already_have_account": "已有账户?",
|
||||
"login_here": "在此登录",
|
||||
"registration_disabled": "注册已关闭",
|
||||
"registration_disabled_description": "公开注册目前已关闭。您需要邀请码才能加入此团队。",
|
||||
"first_user_notice": "作为第一位用户,您将成为默认工作空间的拥有者!",
|
||||
"password_min_placeholder": "至少 3 个字符",
|
||||
"invite_join_message": "{inviterName} 邀请您加入 {targetName},角色为 {role}。",
|
||||
|
||||
"cancel": "取消",
|
||||
"create": "创建",
|
||||
"save": "保存",
|
||||
"save_changes": "保存更改",
|
||||
"delete": "删除",
|
||||
"edit": "编辑",
|
||||
"remove": "移除",
|
||||
"rename": "重命名",
|
||||
"confirm": "确认",
|
||||
"close": "关闭",
|
||||
"loading": "加载中...",
|
||||
"search": "搜索",
|
||||
"copy": "复制",
|
||||
"copied": "已复制!",
|
||||
"download": "下载",
|
||||
"upload": "上传",
|
||||
"back": "返回",
|
||||
"share": "分享",
|
||||
"add": "添加",
|
||||
"done": "完成",
|
||||
"error": "错误",
|
||||
"unknown": "未知",
|
||||
"yes": "是",
|
||||
"no": "否",
|
||||
"name": "名称",
|
||||
"email": "邮箱",
|
||||
"type": "类型",
|
||||
"size": "大小",
|
||||
"description": "描述",
|
||||
"preview": "预览",
|
||||
"restore": "恢复",
|
||||
"reset": "重置",
|
||||
"apply": "应用",
|
||||
"install": "安装",
|
||||
"generate": "生成",
|
||||
"approve": "批准",
|
||||
"test": "测试",
|
||||
"or": "或",
|
||||
"new": "新建",
|
||||
|
||||
"select_team_description": "您是多个团队的成员,请选择一个以继续。",
|
||||
"create_team": "创建团队",
|
||||
|
||||
"all_projects": "所有项目",
|
||||
"create_project": "创建项目",
|
||||
"no_projects_yet": "暂无项目。",
|
||||
"project_created": "项目已创建",
|
||||
"failed_create_project": "创建项目失败",
|
||||
"project_settings": "项目设置",
|
||||
"create_new_project": "创建新项目",
|
||||
"configure_new_project_description": "配置您的新项目工作区和外观。",
|
||||
"manage_project_description": "管理和更新您的项目工作区配置。",
|
||||
"project_name": "项目名称",
|
||||
"project_name_placeholder": "例如:品牌营销、第三季度产品发布...",
|
||||
"project_name_hint": "简洁明了的名称,用于标识您的项目空间。",
|
||||
"project_cover": "项目封面",
|
||||
"remove_cover": "移除封面",
|
||||
"uploading": "上传中...",
|
||||
"cover_preview": "封面预览",
|
||||
"upload_image": "上传图片",
|
||||
"upload_cover": "上传封面",
|
||||
"upload_cover_hint": "拖放或浏览文件。推荐比例 1:1(400×400像素)。",
|
||||
"project_preferences": "项目偏好设置",
|
||||
"activity_notifications": "活动通知",
|
||||
"activity_notifications_description": "接收此项目中评论、上传及自动后台分析任务的应用内通知。",
|
||||
"processing": "处理中...",
|
||||
"project_updated": "项目已更新",
|
||||
"failed_update_project": "更新项目失败",
|
||||
"project_notification_updated": "项目通知设置已更新",
|
||||
"failed_update_project_notification": "更新项目通知设置失败",
|
||||
"notification": "通知",
|
||||
"are_you_sure": "确定要执行此操作吗?",
|
||||
"delete_project_warning": "此操作无法撤销。这将永久删除项目 \"{name}\" 及其所有资产。",
|
||||
"type_delete_to_confirm": "输入 **delete** 以确认:",
|
||||
"delete_placeholder": "delete",
|
||||
"deleting": "删除中...",
|
||||
"team_members": "团队成员",
|
||||
"updated_ago": "更新于",
|
||||
|
||||
"all_files": "全部文件",
|
||||
"recently_deleted": "最近删除",
|
||||
"collections": "收藏集",
|
||||
"shares": "分享",
|
||||
|
||||
"no_collections_yet": "暂无收藏集。",
|
||||
"collection_name": "收藏集名称",
|
||||
"creator": "创建者",
|
||||
"created_date": "创建日期",
|
||||
"collection_created": "收藏集已创建",
|
||||
"failed_create_collection": "创建收藏集失败",
|
||||
"failed_save_collection": "保存收藏集失败",
|
||||
"loading_collection": "正在加载收藏集...",
|
||||
"untitled_collection": "未命名收藏集",
|
||||
"collection_saved": "收藏集已保存",
|
||||
"collection_renamed": "收藏集已重命名",
|
||||
"collection_deleted": "收藏集已删除",
|
||||
|
||||
"no_share_links_yet": "暂无分享链接。",
|
||||
"share_link_created": "分享链接已创建",
|
||||
"share_link_status_updated": "分享链接状态已更新",
|
||||
"link_copied": "链接已复制到剪贴板",
|
||||
"public_link": "公开链接",
|
||||
"active": "启用",
|
||||
"click_to_copy_link": "点击复制链接",
|
||||
"create_share_link": "创建分享链接",
|
||||
"share_link_renamed": "分享链接已重命名",
|
||||
"share_link_deleted": "分享链接已删除",
|
||||
"share_settings": "分享设置",
|
||||
"share_link_disabled": "此分享链接已禁用",
|
||||
"share_link_expired": "此分享链接已过期",
|
||||
"enter_password": "请输入密码",
|
||||
"share_link_password_protected": "此分享链接受密码保护。",
|
||||
"access_share": "访问分享",
|
||||
"incorrect_password": "密码错误,请重试。",
|
||||
"share_expired": "分享已过期",
|
||||
"share_disabled": "分享已禁用",
|
||||
"add_to_share_links": "添加到分享链接",
|
||||
"added_to_share_link": "已添加到分享链接",
|
||||
"remove_from_share": "从分享中移除",
|
||||
"removed_from_share": "已从分享中移除",
|
||||
"open_share_link": "打开分享链接",
|
||||
"copy_link": "复制链接",
|
||||
"view": "查看",
|
||||
|
||||
"security": "安全",
|
||||
"expiration_date": "过期日期",
|
||||
"appearance": "外观",
|
||||
"grid": "网格",
|
||||
"list": "列表",
|
||||
"field": "字段",
|
||||
"sort_by": "排序",
|
||||
"sorted_by": "按{field}排序",
|
||||
"sorted_by_label": "排序方式",
|
||||
"order": "顺序",
|
||||
"custom": "自定义",
|
||||
"date_created": "创建日期",
|
||||
"sort_a_to_z": "A → Z",
|
||||
"sort_z_to_a": "Z → A",
|
||||
"sort_oldest_to_newest": "最旧 → 最新",
|
||||
"sort_newest_to_oldest": "最新 → 最旧",
|
||||
"sort_smallest_to_largest": "最小 → 最大",
|
||||
"sort_largest_to_smallest": "最大 → 最小",
|
||||
"ascending": "升序",
|
||||
"descending": "降序",
|
||||
"sort_name": "名称",
|
||||
"sort_date_created": "创建日期",
|
||||
"sort_date_modified": "修改日期",
|
||||
"sort_size": "大小",
|
||||
"sort_custom": "自定义",
|
||||
"sort_created": "创建时间",
|
||||
"sort_updated": "更新时间",
|
||||
|
||||
"general": "通用",
|
||||
"general_settings": "通用设置",
|
||||
"general_settings_description": "查看您的个人信息和团队角色。",
|
||||
"personal_info_description": "管理您的个人资料名称和头像图片。",
|
||||
"avatar": "头像",
|
||||
"change": "更改",
|
||||
"enter_your_name": "请输入您的名称",
|
||||
"email_managed_by_auth": "邮箱地址由认证提供商管理。",
|
||||
"select_language": "选择语言",
|
||||
"english": "English",
|
||||
"chinese": "简体中文 (Chinese)",
|
||||
"language_updated": "语言更新成功",
|
||||
"failed_update_language": "语言更新失败",
|
||||
"avatar_updated": "头像更新成功",
|
||||
"failed_update_avatar": "头像更新失败",
|
||||
"avatar_removed": "头像已移除",
|
||||
"failed_remove_avatar": "移除头像失败",
|
||||
"profile_updated": "个人资料更新成功",
|
||||
"failed_update_profile": "更新个人资料失败",
|
||||
"failed_load_settings": "加载设置失败。",
|
||||
|
||||
"media_processing": "媒体处理",
|
||||
"media_processing_description": "管理团队的媒体转码配置。",
|
||||
"transcode_settings": "转码设置",
|
||||
"transcode_description": "管理团队的媒体转码配置。",
|
||||
"transcode_strategy_note": "策略:我们会从您的列表中选择支持输入质量的最佳分辨率。内容不会被放大。",
|
||||
"video_strategy": "视频策略",
|
||||
"best_match": "最佳匹配",
|
||||
"best_match_description": "生成与源质量匹配的单一最优分辨率。",
|
||||
"all_resolutions": "所有分辨率",
|
||||
"all_resolutions_description": "生成不超过源质量的所有支持分辨率。",
|
||||
|
||||
"notification_settings": "通知设置",
|
||||
"notifications_description": "配置您在此团队的个人通知偏好。",
|
||||
"notification_settings_updated": "通知设置已更新",
|
||||
"failed_to_update_notification_settings": "更新通知设置失败",
|
||||
"comments_and_replies": "评论与回复",
|
||||
"comments_notification_description": "控制其他用户对您协作的素材评论或提及您时的通知偏好。",
|
||||
"general_comments": "普通评论",
|
||||
"when_someone_comments": "当有人评论素材时",
|
||||
"comment_replies": "评论回复",
|
||||
"when_someone_replies": "当有人回复你的评论时",
|
||||
"at_mentions": "@提及",
|
||||
"when_someone_mentions": "当有人在评论中 @提及你时",
|
||||
"assets_and_statuses": "素材与状态",
|
||||
"assets_notification_description": "管理与文件上传和元数据字段状态更新相关的通知。",
|
||||
"your_uploads": "你的上传",
|
||||
"when_you_upload_assets": "当你上传素材时",
|
||||
"other_uploads": "其他上传",
|
||||
"when_other_users_upload_assets": "当其他用户上传素材时",
|
||||
"status_updates": "状态更新",
|
||||
"when_someone_changes_status": "当有人更改素材的状态时",
|
||||
|
||||
"api_tokens": "API 令牌",
|
||||
"api_tokens_description": "生成和管理 API 令牌。这些令牌允许您或您的智能体通过 shumai-cli 运行终端命令。",
|
||||
"developer_settings": "开发者设置",
|
||||
"developer_description": "为开发者和自动化工作流生成和管理 API 密钥。",
|
||||
"token_name": "令牌名称",
|
||||
"token_name_placeholder": "例如:我的 CLI 令牌",
|
||||
"token": "令牌",
|
||||
"created_at": "创建时间",
|
||||
"actions": "操作",
|
||||
"no_api_tokens_found": "未找到 API 令牌。请在上方生成一个以开始使用。",
|
||||
"api_token_generated_successfully": "API 令牌生成成功",
|
||||
"failed_to_generate_token": "生成令牌失败",
|
||||
"api_token_revoked_successfully": "API 令牌已成功撤销",
|
||||
"failed_to_revoke_token": "撤销令牌失败",
|
||||
"copied_to_clipboard": "已复制到剪贴板",
|
||||
"copied_api_token_to_clipboard": "已将 API 令牌复制到剪贴板",
|
||||
|
||||
"ai": "AI",
|
||||
"providers": "提供商",
|
||||
"providers_description": "为此团队配置 AI 提供商及其模型。",
|
||||
"configured_ai_providers": "已配置的 AI 提供商",
|
||||
"add_provider": "添加提供商",
|
||||
"search_providers_placeholder": "搜索提供商...",
|
||||
"built_in": "内置",
|
||||
"models_count": "模型",
|
||||
"n_models_count": "{count} 个模型",
|
||||
"no_providers_configured": "暂无已配置的提供商",
|
||||
"add_first_provider": "添加您的第一个 AI 提供商以开始使用。",
|
||||
"no_matches_found": "未找到匹配结果",
|
||||
"try_adjusting_search": "请尝试调整搜索 \"{query}\"",
|
||||
"clear_search": "清除搜索",
|
||||
"add_new_provider": "添加新提供商",
|
||||
"provider_created_successfully": "提供商创建成功",
|
||||
"provider_updated_successfully": "提供商更新成功",
|
||||
"provider_deleted_successfully": "提供商删除成功",
|
||||
"are_you_absolutely_sure": "你确定要这样做吗?",
|
||||
"delete_provider_confirmation": "此操作无法撤销。这将永久删除提供商 \"{name}\" 及所有关联的模型配置。",
|
||||
"configure_provider_description": "配置 AI 提供商的身份验证和模型详情。",
|
||||
"provider_name": "提供商名称",
|
||||
"provider_name_placeholder": "例如:我的 OpenAI",
|
||||
"provider_name_is_required": "提供商名称为必填项",
|
||||
"provider_name_must_be_unique": "提供商名称必须唯一",
|
||||
"global_api_protocol": "全局 API 协议",
|
||||
"select_api_protocol": "选择 API 协议",
|
||||
"base_url_optional": "基础 URL(可选)",
|
||||
"override_default_endpoint": "覆盖默认端点。",
|
||||
"api_key": "API 密钥",
|
||||
"api_key_placeholder": "输入 API 密钥或环境变量",
|
||||
"api_key_description": "您可以提供一个字面值(例如 sk-...)或环境变量名称(例如 MY_API_KEY)。",
|
||||
"models_configuration": "模型配置",
|
||||
"add_model": "添加模型",
|
||||
"model_id": "模型 ID",
|
||||
"display_name_optional": "显示名称(可选)",
|
||||
"reasoning_support": "推理支持",
|
||||
"context_window_tokens": "上下文窗口(令牌数)",
|
||||
"max_output_tokens": "最大输出令牌数",
|
||||
"input_cost_1m": "输入成本(每百万)",
|
||||
"output_cost_1m": "输出成本(每百万)",
|
||||
"save_configuration": "保存配置",
|
||||
"at_least_one_model_required": "至少需要一个模型",
|
||||
"provider": "提供商",
|
||||
"model": "模型",
|
||||
"select_provider": "选择提供商",
|
||||
"select_model": "选择模型",
|
||||
|
||||
"skills": "技能",
|
||||
"skills_description": "为团队添加、更新和配置 AI 技能。",
|
||||
"skills_management": "技能管理",
|
||||
"skills_management_description": "使用自定义技能扩展聊天机器人的功能。",
|
||||
"add_skill": "添加技能",
|
||||
"no_skills_installed": "暂无已安装的技能",
|
||||
"add_skill_to_get_started": "通过 GitHub URL 添加技能或上传 ZIP 文件以开始使用。",
|
||||
"delete_skill_confirmation": "此操作无法撤销。这将永久删除技能 \"{name}\" 及其所有配置。",
|
||||
"no_description_provided": "暂无描述。",
|
||||
"updated_date": "更新于",
|
||||
"installed": "已安装",
|
||||
"override_existing_skill": "你想覆盖现有技能吗?",
|
||||
"failed_to_install_skill": "安装技能失败",
|
||||
"an_unknown_error_occurred": "发生了未知错误",
|
||||
"need_project_to_upload_skills": "您的团队中至少需要一个项目才能上传技能。",
|
||||
"only_zip_files_supported": "仅支持 .zip 文件。",
|
||||
"add_new_skill": "添加新技能",
|
||||
"import_skill_description": "从本地 ZIP 压缩包或 GitHub 仓库导入技能。",
|
||||
"package_upload": "包上传",
|
||||
"select_zip_file": "选择 ZIP 文件",
|
||||
"packages_must_contain_skill_md": "包必须包含 SKILL.md",
|
||||
"processing_package": "正在处理包...",
|
||||
"github_repository_url": "GitHub 仓库 URL",
|
||||
"github_url_example": "示例:https://github.com/google/gemini-cli",
|
||||
"configure_skill": "配置技能:{name}",
|
||||
"manage_env_vars_description": "管理此技能实例的环境变量。",
|
||||
"no_env_vars_found": "未找到环境变量。点击\"添加变量\"创建一个。",
|
||||
"variable_name": "变量名称",
|
||||
"default_value": "默认值",
|
||||
"optional_default_value_placeholder": "可选默认值...",
|
||||
"env_var_empty_note": "如果留空,将从主机的环境中读取值。",
|
||||
"add_variable": "添加变量",
|
||||
"skills_count": "技能",
|
||||
|
||||
"agents": "智能体",
|
||||
"agents_description": "管理 AI 智能体及其个性。",
|
||||
"ai_agents": "AI 智能体",
|
||||
"ai_providers": "AI 提供商",
|
||||
"create_agent": "创建智能体",
|
||||
"edit_item": "编辑 {name}",
|
||||
"create_type_agent": "创建{type}智能体",
|
||||
"agent_created_successfully": "智能体创建成功",
|
||||
"agent_updated_successfully": "智能体更新成功",
|
||||
"agent_deleted_successfully": "智能体删除成功",
|
||||
"delete_agent": "删除智能体",
|
||||
"delete_agent_confirmation": "此操作无法撤销。这将永久删除智能体 \"{name}\" 并从服务器上删除其所有数据。",
|
||||
"no_agents_found": "未找到{type}智能体",
|
||||
"create_one_now": "立即创建",
|
||||
"configure_agent_description": "配置 AI 智能体的个性和功能。",
|
||||
"agent_name": "智能体名称",
|
||||
"agent_name_placeholder": "例如:支持助手",
|
||||
"agent_type": "智能体类型",
|
||||
"agent_type_chat": "对话",
|
||||
"agent_type_autofill": "自动填充",
|
||||
"agent_type_embedding": "嵌入",
|
||||
"agent_avatar": "智能体头像",
|
||||
"preset_avatar_option": "预设头像选项",
|
||||
"current_custom_avatar": "当前自定义头像",
|
||||
"thinking_level": "思考级别",
|
||||
"agent_soul": "智能体灵魂(个性)",
|
||||
"agent_soul_placeholder": "描述智能体的个性、语调和行为...",
|
||||
"enabled": "已启用",
|
||||
"disabled": "已禁用",
|
||||
"no_skills_available": "暂无可用技能。",
|
||||
"name_is_required": "名称为必填项",
|
||||
"provider_is_required": "提供商为必填项",
|
||||
"model_is_required": "模型为必填项",
|
||||
"chat_agent": "对话智能体",
|
||||
"chat_agents": "对话智能体",
|
||||
"embedding_agent": "嵌入智能体",
|
||||
"skills_count_value": "{count} 个技能",
|
||||
"autofill_agent": "自动填充智能体",
|
||||
"ai_provider": "AI 提供商",
|
||||
"no_models_configured": "暂无已配置的模型",
|
||||
"thinking_strength": "思考强度",
|
||||
"thinking_disable": "禁用",
|
||||
"standard_generation": "标准生成",
|
||||
"thinking_low": "低",
|
||||
"quick_reasoning": "快速推理",
|
||||
"thinking_medium": "中",
|
||||
"balanced_thought": "平衡思考",
|
||||
"thinking_high": "高",
|
||||
"deep_reasoning": "深度推理",
|
||||
"thinking_level_description": "控制复杂任务的推理深度。",
|
||||
"select_type": "选择类型",
|
||||
|
||||
"agent_sandbox": "智能体沙箱",
|
||||
"agent_sandbox_settings": "智能体沙箱设置",
|
||||
"sandbox_description": "配置 AI 智能体的安全和网络限制。",
|
||||
"sandbox_settings_updated": "沙箱设置已更新",
|
||||
"failed_to_update_sandbox_settings": "更新沙箱设置失败",
|
||||
"domain_already_exists": "域名已存在",
|
||||
"network_sandbox": "网络沙箱",
|
||||
"network_sandbox_description": "配置沙箱智能体的允许域名。默认情况下,仅允许必要域名。",
|
||||
"add_domain": "添加域名",
|
||||
"allowed_domains": "允许的域名",
|
||||
"no_custom_domains_allowed": "没有自定义允许域名",
|
||||
"pending_domain_approvals": "待审核域名",
|
||||
"pending_domains_description": "这些域名在智能体执行期间被阻止。您可以批准它们以允许将来的网络请求,或从此列表中删除它们。",
|
||||
"no_pending_domains": "没有待审核的域名",
|
||||
"filesystem_restriction": "文件系统限制",
|
||||
"filesystem_restriction_description": "智能体仅限于在 .pi 和 /tmp 文件夹内读写。这些设置目前出于安全考虑已硬编码。",
|
||||
|
||||
"position_and_resize": "定位和调整大小",
|
||||
"avatar_source": "头像来源",
|
||||
"saving": "保存中",
|
||||
|
||||
"auth_tagline": "一个工作区,管理所有创意资产。",
|
||||
"auth_description": "上传并索引您的文件,使用自定义元数据模式丰富它们,直接在媒体上绘制标注,并收集即时反馈——这一切都在一个为创作者打造的现代工作区中完成。",
|
||||
"auth_feature_uploads": "即时资产上传 & 高保真媒体播放器",
|
||||
"auth_feature_metadata": "自定义元数据模式 & 画布标注审阅",
|
||||
"auth_feature_teams": "无缝团队工作区 & 安全分享",
|
||||
"auth_community_cta": "加入我们的开发者和设计师社区。",
|
||||
|
||||
"versions": "版本",
|
||||
"manage_versions": "管理版本...",
|
||||
"show_left_sidebar": "显示左侧边栏",
|
||||
"hide_left_sidebar": "隐藏左侧边栏",
|
||||
"show_right_sidebar": "显示右侧边栏",
|
||||
"hide_right_sidebar": "隐藏右侧边栏",
|
||||
"card_view": "卡片视图",
|
||||
"list_view": "列表视图",
|
||||
"deleted": "已删除",
|
||||
"failed_to_delete": "删除失败",
|
||||
"renamed_to": "已重命名为",
|
||||
"failed_to_rename": "重命名失败",
|
||||
"move_to_trash": "移至回收站",
|
||||
"delete_permanently": "永久删除",
|
||||
|
||||
"open_navigation_menu": "打开导航菜单",
|
||||
|
||||
"preview_unavailable": "无法预览",
|
||||
"download_original_file": "下载原始文件",
|
||||
"zoom_out": "缩小",
|
||||
"zoom_in": "放大",
|
||||
"fit": "适应",
|
||||
"copy_image_to_clipboard": "复制优化图片到剪贴板",
|
||||
"download_original_image": "下载原始图片",
|
||||
|
||||
"no_item_selected": "未选择项目",
|
||||
"select_file_to_view_details": "选择一个文件以查看其详情和评论。",
|
||||
"enlarged_view": "放大视图",
|
||||
"comments": "评论",
|
||||
"fields": "字段",
|
||||
|
||||
"folder_tree_assets": "资产",
|
||||
"share_links": "分享链接",
|
||||
"all_collections_count": "所有收藏集 ({count})",
|
||||
"all_share_links_count": "所有分享链接 ({count})",
|
||||
"rename_collection": "重命名收藏集",
|
||||
"rename_share_link": "重命名分享链接",
|
||||
"rename_folder": "重命名文件夹",
|
||||
"enter_new_name": "输入新名称",
|
||||
"delete_collection_confirm": "删除收藏集?",
|
||||
"delete_share_link_confirm": "删除分享链接?",
|
||||
"delete_folder_confirm": "删除文件夹?",
|
||||
"delete_confirm_description": "确定要删除此{type}吗?此操作无法撤销。",
|
||||
"folder_created": "文件夹已创建",
|
||||
"failed_create_folder": "创建文件夹失败",
|
||||
"folder_renamed": "文件夹已重命名",
|
||||
"folder_deleted": "文件夹已删除",
|
||||
"failed_to_prepare_download_links": "准备下载链接失败",
|
||||
"starting_download_files": "正在开始下载 {count} 个文件。如果浏览器提示,请允许多个下载。",
|
||||
"some_downloads_failed": "部分下载无法启动",
|
||||
"preparing_download": "正在准备下载",
|
||||
"confirm_download": "确认下载",
|
||||
"resolving_files_wait": "正在解析所有文件和文件夹,请稍候...",
|
||||
"folder_files_download_description": "所选文件夹中的文件将被准备下载。",
|
||||
"preparing_download_links": "正在准备下载链接...",
|
||||
"download_includes_files": "此下载将包含 {count} 个文件。",
|
||||
"no_folder_structure": "无文件夹结构",
|
||||
"folder_structure_warning": "文件夹层级将被扁平化。所有嵌套文件将直接下载到您的默认下载文件夹中。",
|
||||
"start_download": "开始下载",
|
||||
"new_folder": "新建文件夹",
|
||||
"folder_name": "文件夹名称",
|
||||
|
||||
"moved_to_trash": "已移至回收站",
|
||||
"failed_move_to_trash": "移至回收站失败",
|
||||
"permanently_deleted": "已永久删除",
|
||||
"failed_delete_permanently": "永久删除失败",
|
||||
"renamed_successfully": "重命名成功",
|
||||
"moved_successfully": "移动成功",
|
||||
"failed_to_move": "移动失败",
|
||||
"copied_successfully": "复制成功",
|
||||
"failed_to_copy": "复制失败",
|
||||
"restored": "已恢复",
|
||||
"failed_to_restore": "恢复失败",
|
||||
"moving_items": "正在移动 {count} 个项目",
|
||||
|
||||
"successfully_moved_items": "成功移动了 {count} 个项目",
|
||||
"go_to_folder": "前往文件夹",
|
||||
"successfully_copied_items": "成功复制了 {count} 个项目",
|
||||
"trash_emptied_successfully": "回收站已清空",
|
||||
"error_emptying_trash": "清空回收站出错",
|
||||
"n_items": "{count} 个项目",
|
||||
"n_items_selected": "已选择 {count} 个项目",
|
||||
"n_folders_selected": "已选择 {count} 个文件夹",
|
||||
"n_files_selected": "已选择 {count} 个文件",
|
||||
"drop_files_here_to_upload": "将文件拖放到此处上传",
|
||||
"delete_asset_title": "删除资源?",
|
||||
"delete_asset_description": "已删除的项目可在 30 天内恢复,之后将被永久删除。",
|
||||
"empty_trash_title": "清空回收站?",
|
||||
"empty_trash_description": "回收站中的所有项目将从数据库和存储中永久删除。此操作无法撤销。",
|
||||
"delete_now": "立即删除",
|
||||
"loading_more": "加载更多...",
|
||||
"this_folder_is_empty": "此文件夹为空",
|
||||
"confirm_download_dialog": "确认下载",
|
||||
"selected_files_will_be_prepared": "所选文件和文件夹将被准备下载。",
|
||||
"no_folder_structure_warning": "文件夹层级将被扁平化。所有嵌套文件将直接下载到您的默认下载文件夹中。",
|
||||
"failed_to_upload_file": "文件上传失败:{name}",
|
||||
"error_message": "错误:{message}",
|
||||
"count_overflow_assets": "10000+ 资源",
|
||||
"count_overflow_folders": "10000+ 文件夹",
|
||||
|
||||
"select_source_folder": "选择来源文件夹",
|
||||
"assets": "资源",
|
||||
"filter": "筛选",
|
||||
"project_members": "项目成员",
|
||||
|
||||
"upload_file": "上传文件",
|
||||
"upload_folder": "上传文件夹",
|
||||
"move_to": "移动到",
|
||||
"copy_to": "复制到",
|
||||
"create_new_version": "创建新版本",
|
||||
|
||||
"file_card_processing": "处理中",
|
||||
"failed_to_upload": "上传失败",
|
||||
"by": "由",
|
||||
"failed_to_upload_parenthesized": "(上传失败)",
|
||||
"n_items_count": "{count} 个项目",
|
||||
"name_column": "名称",
|
||||
"size_column": "大小",
|
||||
"modified_column": "修改时间",
|
||||
"file_uploaded": "文件已上传",
|
||||
|
||||
"all_downloads_initiated": "所有下载已成功发起",
|
||||
"starting_download_of_n_files": "正在开始下载 {count} 个文件。如果浏览器提示,请允许多个下载。",
|
||||
|
||||
"enter_your_details": "输入您的信息",
|
||||
"provide_name_email_for_comment": "请提供您的姓名和邮箱以添加评论。",
|
||||
"name_placeholder": "张三",
|
||||
"email_field_placeholder": "zhangsan@example.com",
|
||||
|
||||
"select_project": "选择项目",
|
||||
"select_a_project": "选择一个项目",
|
||||
"select_folder": "选择文件夹",
|
||||
"select_project_first": "请先选择一个项目",
|
||||
"copy_comments": "复制评论",
|
||||
"move_here": "移动到此处",
|
||||
"copy_here": "复制到此处",
|
||||
|
||||
"thumbnail": "缩略图",
|
||||
|
||||
"theme": "主题",
|
||||
"light": "浅色",
|
||||
"dark": "深色",
|
||||
"system": "跟随系统",
|
||||
"log_out": "退出登录",
|
||||
"version": "版本 {version}",
|
||||
|
||||
"team_member": "团队成员",
|
||||
"project_member": "项目成员",
|
||||
"editor": "编辑者",
|
||||
"reviewer": "审阅者",
|
||||
"remove_member": "移除成员",
|
||||
"remove_member_confirmation": "确定要从此{type}中移除 {name} 吗?此操作无法撤销。",
|
||||
"member_role_updated": "成员角色已更新",
|
||||
"failed_to_update_member_role": "更新成员角色失败",
|
||||
"member_removed": "成员已移除",
|
||||
"failed_to_remove_member": "移除成员失败",
|
||||
"failed_to_generate_invite_link": "生成邀请链接失败",
|
||||
"invite_link_copied": "邀请链接已复制到剪贴板",
|
||||
"add_team_member_to_project": "将团队成员添加到项目",
|
||||
"added_member_successfully": "已成功添加 {name}",
|
||||
"failed_to_add_member": "添加 {name} 失败",
|
||||
"invite_new_member": "邀请新成员",
|
||||
"generate_link": "生成链接",
|
||||
"members": "成员",
|
||||
|
||||
"essentials": "基本信息",
|
||||
"team_attributes": "团队属性",
|
||||
"custom_fields": "自定义字段",
|
||||
"field_created_successfully": "字段创建成功",
|
||||
"field_updated_successfully": "字段更新成功",
|
||||
"field_deleted_successfully": "字段删除成功",
|
||||
"confirm_delete_field": "确定要删除此字段吗?",
|
||||
"field_name": "字段名称",
|
||||
"field_name_placeholder": "例如:状态",
|
||||
"field_type": "字段类型",
|
||||
"select_field_type": "选择字段类型",
|
||||
"description_optional_placeholder": "描述(可选)",
|
||||
"ai_autofill": "AI 自动填充",
|
||||
"select_field_to_edit": "选择一个字段以编辑选项",
|
||||
"type_label": "类型:",
|
||||
"options": "选项",
|
||||
"new_option": "新选项",
|
||||
"add_option": "添加选项",
|
||||
"delete_field": "删除字段",
|
||||
"manage_fields": "管理字段",
|
||||
"groups": "分组",
|
||||
"no_fields_found": "未找到字段",
|
||||
"new_field": "新建字段",
|
||||
"new_field_placeholder": "新字段",
|
||||
"search_fields_placeholder": "搜索字段",
|
||||
"visible_count": "({count} 个可见)",
|
||||
"option_name_placeholder": "选项名称",
|
||||
"unknown_field_type": "未知字段类型",
|
||||
|
||||
"settings_updated": "设置已更新",
|
||||
"failed_update_settings": "更新设置失败",
|
||||
|
||||
"unknown_user": "未知用户",
|
||||
"unknown_asset": "未知资源",
|
||||
"unknown_project": "未知项目",
|
||||
"unknown_team": "未知团队",
|
||||
"notification_commented_on": "{creator} 评论了 {asset}",
|
||||
"notification_replied_to": "{creator} 回复了 {asset} 上的评论",
|
||||
"notification_mentioned_you": "{creator} 在 {asset} 中提及了你",
|
||||
"notification_uploaded": "{creator} 将 {asset} 上传到 {project}",
|
||||
"notification_status_updated": "{creator} 更新了 {asset} 的状态",
|
||||
"notification_joined_team": "{user} 加入了 {team}",
|
||||
"notification_joined_project": "{user} 加入了 {project}",
|
||||
"notification_generic": "来自 {creator} 的新通知",
|
||||
"all": "全部",
|
||||
"unread": "未读",
|
||||
"mark_all_as_read": "全部标记为已读",
|
||||
"no_notifications": "暂无通知",
|
||||
|
||||
"unknown_date": "未知日期",
|
||||
"today": "今天",
|
||||
"yesterday": "昨天",
|
||||
"untitled_upload": "未命名上传",
|
||||
"uploading_status": "上传中",
|
||||
"no_uploads_yet": "暂无上传",
|
||||
"no_uploads_hint": "在项目视图中上传文件以在此处跟踪进度。",
|
||||
|
||||
"no_content": "无内容。",
|
||||
"enter_some_text": "输入一些文字...",
|
||||
|
||||
"pick_a_date": "选择日期",
|
||||
"twenty_four_hours": "24 小时",
|
||||
"one_week": "1 周",
|
||||
"two_weeks": "2 周",
|
||||
|
||||
"filters": "筛选条件",
|
||||
"filter_where": "条件",
|
||||
"filter_and": "且",
|
||||
"select_field": "选择字段",
|
||||
"operator": "运算符",
|
||||
"add_condition": "+ 添加条件",
|
||||
"operator_is": "是",
|
||||
"operator_is_not": "不是",
|
||||
"operator_contains": "包含",
|
||||
"operator_does_not_contain": "不包含",
|
||||
"operator_is_empty": "为空",
|
||||
"operator_is_not_empty": "不为空",
|
||||
"operator_is_any_of": "是其中之一",
|
||||
"operator_is_none_of": "不在其中",
|
||||
"operator_has_any_of": "含有其中之一",
|
||||
"operator_has_all_of": "含有全部",
|
||||
"operator_is_exactly": "完全匹配",
|
||||
"operator_has_none_of": "不含有其中任何",
|
||||
"operator_is_within": "在范围内",
|
||||
"operator_is_before": "在之前",
|
||||
"operator_is_after": "在之后",
|
||||
"operator_is_on_or_before": "在当天或之前",
|
||||
"operator_is_on_or_after": "在当天或之后",
|
||||
"select_options": "选择选项...",
|
||||
"select_option": "选择选项",
|
||||
"date_today": "今天",
|
||||
"date_yesterday": "昨天",
|
||||
"date_tomorrow": "明天",
|
||||
"date_one_week_ago": "一周前",
|
||||
"date_one_week_from_now": "一周后",
|
||||
"date_one_month_ago": "一个月前",
|
||||
"date_one_month_from_now": "一个月后",
|
||||
"date_type": "日期类型",
|
||||
"exact_date": "精确日期...",
|
||||
"toggle_checked": "已选中",
|
||||
"toggle_unchecked": "未选中",
|
||||
"enter_a_value": "输入一个值",
|
||||
"field_created_at": "创建时间",
|
||||
"field_updated_at": "更新时间",
|
||||
"field_size": "大小",
|
||||
|
||||
"search_dialog_title": "搜索",
|
||||
"search_by_content_placeholder": "按内容搜索记录...",
|
||||
"search_by_name_placeholder": "按名称搜索记录...",
|
||||
"search_button": "搜索",
|
||||
"semantic_search": "语义搜索",
|
||||
"semantic_search_requires_embedding": "* 语义搜索需要启用嵌入智能体。",
|
||||
"active_filters": "个激活",
|
||||
"search_results": "搜索结果",
|
||||
"semantic_search_slow": "使用媒体智能的语义搜索可能较慢...",
|
||||
"querying_database": "正在查询数据库...",
|
||||
"ready_to_search": "准备搜索",
|
||||
"type_query_instruction": "在上方输入查询内容并点击搜索按钮以显示结果。",
|
||||
"semantic_search_note": "语义搜索结果将按与搜索查询文本的相关性排序,但不会严格筛选。如果需要精确筛选,请添加筛选条件来控制。",
|
||||
"search_failed": "搜索失败",
|
||||
"enable_embedding_agent_hint": "请在团队设置中创建并启用嵌入智能体以使用语义搜索。",
|
||||
"no_records_matched": "没有记录匹配您的条件",
|
||||
"try_adjusting_spelling": "请尝试调整拼写或移除筛选条件。",
|
||||
"folder": "文件夹",
|
||||
"size_prefix": "大小:",
|
||||
"match_found_at": "在以下位置找到匹配",
|
||||
"matched_items": "匹配了 {count} 项",
|
||||
"saving_ellipsis": "保存中...",
|
||||
"save_as_collection": "保存为收藏集",
|
||||
"apply_and_close": "应用并关闭",
|
||||
|
||||
"generating": "正在生成...",
|
||||
"autofilling_metadata": "正在自动填充元数据...",
|
||||
"generating_embeddings": "正在生成嵌入...",
|
||||
"contains_drawing_annotations": "包含绘图标注",
|
||||
"created_by_agent": "由智能体创建",
|
||||
"logs": "日志",
|
||||
"reply": "回复",
|
||||
"agent_session_logs": "智能体会话日志",
|
||||
"agent_logs_description": "智能体后台任务和工具调用的逐步执行跟踪。",
|
||||
"role_user": "用户",
|
||||
"role_agent": "智能体",
|
||||
"tool_result": "工具结果:",
|
||||
"role_thinking": "思考中",
|
||||
"calling_tool": "调用工具:",
|
||||
"tool_arguments": "参数",
|
||||
"image_object": "[图片对象]",
|
||||
"no_logs_found": "未找到此会话的日志。",
|
||||
"session_no_entries_yet": "该会话可能已初始化但尚未产生任何条目。",
|
||||
|
||||
"reply_to": "回复:",
|
||||
"reply_placeholder": "回复...",
|
||||
"message_placeholder": "发送消息...",
|
||||
"arrow": "箭头",
|
||||
"line": "线条",
|
||||
"box": "矩形",
|
||||
"freehand": "手绘",
|
||||
"disable_timestamp": "禁用时间戳",
|
||||
"enable_timestamp": "启用时间戳",
|
||||
"attach_files": "附加文件",
|
||||
"toggle_annotation": "切换标注",
|
||||
|
||||
"loop": "循环",
|
||||
"click_toggle_time_frames": "点击切换时间/帧",
|
||||
"quality": "画质",
|
||||
"media_not_available": "媒体不可用。",
|
||||
"original": "原始",
|
||||
|
||||
"collection": "收藏集",
|
||||
"share_link": "分享链接",
|
||||
|
||||
"failed_fetch_share_links": "获取分享链接失败",
|
||||
"failed_fetch_collections": "获取收藏集失败",
|
||||
"failed_create_share_link": "创建分享链接失败",
|
||||
"failed_rename_folder": "重命名文件夹失败",
|
||||
"failed_delete_folder": "删除文件夹失败",
|
||||
"failed_rename_collection": "重命名收藏集失败",
|
||||
"failed_delete_collection": "删除收藏集失败",
|
||||
"failed_rename_share_link": "重命名分享链接失败",
|
||||
"failed_delete_share_link": "删除分享链接失败",
|
||||
"failed_to_fetch_folder_children": "获取子文件夹失败",
|
||||
|
||||
"failed_update_fields_order": "更新字段排序失败",
|
||||
"failed_create_field": "创建字段失败",
|
||||
"failed_update_field": "更新字段失败",
|
||||
"failed_delete_field": "删除字段失败",
|
||||
"new_label": "新建",
|
||||
|
||||
"n_assets_singular": "{count} 个资源",
|
||||
"n_assets_plural": "{count} 个资源",
|
||||
"n_folders_singular": "{count} 个文件夹",
|
||||
"n_folders_plural": "{count} 个文件夹",
|
||||
"failed_upload_file": "上传文件失败",
|
||||
|
||||
"failed_fetch_share_link": "获取分享链接失败",
|
||||
"failed_fetch_folders": "获取文件夹失败",
|
||||
"failed_fetch_files": "获取文件失败",
|
||||
"failed_remove": "移除失败",
|
||||
"failed_update": "更新失败",
|
||||
"failed_fetch_fields": "获取字段列表失败"
|
||||
}
|
||||
@@ -86,6 +86,7 @@
|
||||
"ulid": "3.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "6.0.3",
|
||||
"@tailwindcss/postcss": "4.3.0",
|
||||
"@tailwindcss/vite": "4.3.0",
|
||||
"@tanstack/router-cli": "1.167.13",
|
||||
|
||||
Generated
+3
@@ -0,0 +1,3 @@
|
||||
# ignore everything because the directory is auto-generated by inlang paraglide-js
|
||||
# for more info visit https://paraglidejs.com
|
||||
*
|
||||
Generated
+162
@@ -0,0 +1,162 @@
|
||||
# Paraglide JS Compiled Output
|
||||
|
||||
> Auto-generated i18n message functions. Import `messages.js` to use translated strings.
|
||||
|
||||
Compiled from: `/Users/yiling/Projects/shumai/packages/webui/project.inlang`
|
||||
|
||||
|
||||
## What is this folder?
|
||||
|
||||
This folder contains compiled [Paraglide JS](https://github.com/opral/paraglide-js) output. Paraglide JS compiles your translation messages into tree-shakeable JavaScript functions.
|
||||
|
||||
## At a glance
|
||||
|
||||
Purpose:
|
||||
- This folder stores compiled i18n message functions.
|
||||
- Source translations live outside this folder in your inlang project.
|
||||
|
||||
Safe to import:
|
||||
- `messages.js` — all message functions
|
||||
- `runtime.js` — locale utilities
|
||||
- `server.js` — server-side middleware
|
||||
|
||||
Do not edit:
|
||||
- All files in this folder are auto-generated.
|
||||
- Changes will be overwritten on next compilation.
|
||||
|
||||
```
|
||||
paraglide/
|
||||
├── messages.js # Message exports (import this)
|
||||
├── messages/ # Individual message functions
|
||||
├── runtime.js # Locale detection & configuration
|
||||
├── registry.js # Formatting utilities (plural, number, datetime, relativetime)
|
||||
├── server.js # Server-side middleware
|
||||
└── .gitignore # Marks folder as generated
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
import * as m from "./paraglide/messages.js";
|
||||
|
||||
// Messages are functions that return localized strings
|
||||
m.hello_world(); // "Hello, World!" (in current locale)
|
||||
m.greeting({ name: "Sam" }); // "Hello, Sam!"
|
||||
|
||||
// Override locale per-call
|
||||
m.hello_world({}, { locale: "de" }); // "Hallo, Welt!"
|
||||
m.greeting({ name: "Sam" }, { locale: "de" }); // "Hallo, Sam!"
|
||||
```
|
||||
|
||||
## Runtime API
|
||||
|
||||
```js
|
||||
import { getLocale, getTextDirection, setLocale, locales, baseLocale } from "./paraglide/runtime.js";
|
||||
|
||||
getLocale(); // Current locale, e.g., "en"
|
||||
getTextDirection(); // "ltr" | "rtl" for current locale
|
||||
setLocale("de"); // Set locale
|
||||
locales; // Available locales, e.g., ["en", "de", "fr"]
|
||||
baseLocale; // Default locale, e.g., "en"
|
||||
```
|
||||
|
||||
## Strategy
|
||||
|
||||
The strategy determines how the current locale is detected and persisted:
|
||||
|
||||
- **Cookie**: Stores locale preference in a cookie.
|
||||
- **URL**: Derives locale from URL patterns (e.g., `/en/about`, `en.example.com`).
|
||||
- **GlobalVariable**: Uses a global variable (client-side only).
|
||||
- **BaseLocale**: Always returns the base locale.
|
||||
|
||||
Strategies can be combined. The order defines precedence:
|
||||
|
||||
```js
|
||||
await compile({
|
||||
project: "./project.inlang",
|
||||
outdir: "./src/paraglide",
|
||||
strategy: ["url", "cookie", "baseLocale"],
|
||||
});
|
||||
```
|
||||
|
||||
See the [strategy documentation](https://paraglidejs.com/strategy) for details.
|
||||
|
||||
## Markup (Rich Text)
|
||||
|
||||
Messages can contain markup tags for bold, links, and other inline elements. Translators control where tags appear; developers control how they render.
|
||||
|
||||
Important:
|
||||
- Tag names are app-defined. There is no built-in list of HTML tags.
|
||||
- `{#b}...{/b}` does not automatically render as `<b>...</b>`.
|
||||
- Renderers/snippets are looked up by the same tag name used in the message.
|
||||
|
||||
### Message syntax
|
||||
|
||||
```json
|
||||
{
|
||||
"cta": "{#link to=|/docs| rel=$relationship @track}Read the docs{/link}",
|
||||
"welcome": "{#b}Hi {name}{/b}{#icon/}"
|
||||
}
|
||||
```
|
||||
|
||||
- `{#tagName}` opens a tag, `{/tagName}` closes it.
|
||||
- `{#tagName/}` creates a standalone tag.
|
||||
- Options: `to=|/docs|` or `rel=$relationship` (accessed via `options.*`).
|
||||
- Attributes: `@track` or `@variant=|hero|` (accessed via `attributes.*`).
|
||||
|
||||
This is the default inlang message syntax. Paraglide's message format is plugin-based — you can use [ICU MessageFormat 1](https://inlang.com/m/p7c8m1d2/plugin-inlang-icu-messageformat-1), [i18next](https://inlang.com/m/3i8bor92/plugin-inlang-i18next), or other [plugins](https://inlang.com/c/plugins) instead.
|
||||
|
||||
### Rendering markup
|
||||
|
||||
Calling the message function still returns **plain text** (markup stripped):
|
||||
|
||||
```js
|
||||
m.cta({ relationship: "noopener" }); // "Read the docs"
|
||||
```
|
||||
|
||||
To render markup, use the framework adapter or the low-level `parts()` API:
|
||||
|
||||
```js
|
||||
const parts = m.cta.parts({ relationship: "noopener" });
|
||||
// [
|
||||
// { type: "markup-start", name: "link", options: { to: "/docs", rel: "noopener" }, attributes: { track: true } },
|
||||
// { type: "text", value: "Read the docs" },
|
||||
// { type: "markup-end", name: "link" }
|
||||
// ]
|
||||
```
|
||||
|
||||
Framework adapters provide a `<ParaglideMessage>` component that accepts markup renderers:
|
||||
|
||||
- `@inlang/paraglide-js-react`
|
||||
- `@inlang/paraglide-js-vue`
|
||||
- `@inlang/paraglide-js-svelte`
|
||||
- `@inlang/paraglide-js-solid`
|
||||
|
||||
```jsx
|
||||
import { ParaglideMessage } from "@inlang/paraglide-js-react"; // or -vue, -svelte, -solid
|
||||
|
||||
<ParaglideMessage
|
||||
message={m.welcome}
|
||||
inputs={{ name: "Ada" }}
|
||||
markup={{
|
||||
b: ({ children }) => <b>{children}</b>,
|
||||
icon: () => <span aria-hidden="true" className="icon-wave" />,
|
||||
}}
|
||||
/>
|
||||
```
|
||||
|
||||
The available renderer/snippet names come from the message itself. You can inspect them through `message.parts()`, and TypeScript uses the same names to type-check your markup renderers.
|
||||
|
||||
See the [markup documentation](https://paraglidejs.com/markup) for details.
|
||||
|
||||
## Key concepts
|
||||
|
||||
- **Tree-shakeable**: Each message is a function, enabling [up to 70% smaller i18n bundle sizes](https://paraglidejs.com/benchmark) than traditional i18n libraries.
|
||||
- **Typesafe**: Full TypeScript/JSDoc support with autocomplete.
|
||||
- **Variants**: Messages can have variants for pluralization, gender, etc.
|
||||
- **Fallbacks**: Missing translations fall back to the base locale.
|
||||
|
||||
## Links
|
||||
|
||||
- [Paraglide JS Documentation](https://paraglidejs.com)
|
||||
- [Source Repository](https://github.com/opral/paraglide-js)
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
export * from "./messages/_index.js";
|
||||
export * as m from "./messages/_index.js";
|
||||
Generated
+4
@@ -0,0 +1,4 @@
|
||||
/* eslint-disable */
|
||||
export * from './messages/_index.js'
|
||||
// enabling auto-import by exposing all messages as m
|
||||
export * as m from './messages/_index.js'
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type _DeleteInputs = {};
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Delete" |
|
||||
*
|
||||
* @param {_DeleteInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
declare const _delete: ((inputs?: _DeleteInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<_DeleteInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export { _delete as "delete" };
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} _DeleteInputs */
|
||||
|
||||
const en__delete = /** @type {(inputs: _DeleteInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Delete`)
|
||||
};
|
||||
|
||||
const zh__delete = /** @type {(inputs: _DeleteInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`删除`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Delete" |
|
||||
*
|
||||
* @param {_DeleteInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
const _delete = /** @type {((inputs?: _DeleteInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<_DeleteInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en__delete(inputs)
|
||||
return zh__delete(inputs)
|
||||
});
|
||||
export { _delete as "delete" }
|
||||
+746
@@ -0,0 +1,746 @@
|
||||
export * from "./dashboard.js";
|
||||
export * from "./notifications.js";
|
||||
export * from "./uploads.js";
|
||||
export * from "./language.js";
|
||||
export * from "./personal_info.js";
|
||||
export * from "./language_settings.js";
|
||||
export * from "./select_preferred_language.js";
|
||||
export * from "./settings.js";
|
||||
export * from "./welcome_back.js";
|
||||
export * from "./create_account.js";
|
||||
export * from "./select_a_team.js";
|
||||
export * from "./projects.js";
|
||||
export * from "./select_asset_to_view_details.js";
|
||||
export * from "./all_collections.js";
|
||||
export * from "./file_not_found.js";
|
||||
export * from "./recently_deleted_notice.js";
|
||||
export * from "./all_share_links.js";
|
||||
export * from "./link_visibility.js";
|
||||
export * from "./password_protected.js";
|
||||
export * from "./login.js";
|
||||
export * from "./login_subtitle.js";
|
||||
export * from "./email_address.js";
|
||||
export * from "./email_placeholder.js";
|
||||
export * from "./password.js";
|
||||
export * from "./password_placeholder.js";
|
||||
export * from "./logging_in.js";
|
||||
export * from "./invalid_credentials.js";
|
||||
export * from "./invalid_email_address.js";
|
||||
export * from "./password_is_required.js";
|
||||
export * from "./no_account_prompt.js";
|
||||
export * from "./sign_up.js";
|
||||
export * from "./demo_access.js";
|
||||
export * from "./demo_access_instructions.js";
|
||||
export * from "./signup_subtitle.js";
|
||||
export * from "./signup_failed.js";
|
||||
export * from "./password_min_length.js";
|
||||
export * from "./creating_account.js";
|
||||
export * from "./already_have_account.js";
|
||||
export * from "./login_here.js";
|
||||
export * from "./registration_disabled.js";
|
||||
export * from "./registration_disabled_description.js";
|
||||
export * from "./first_user_notice.js";
|
||||
export * from "./password_min_placeholder.js";
|
||||
export * from "./invite_join_message.js";
|
||||
export * from "./cancel.js";
|
||||
export * from "./create.js";
|
||||
export * from "./save.js";
|
||||
export * from "./save_changes.js";
|
||||
export * from "./_delete.js";
|
||||
export * from "./edit.js";
|
||||
export * from "./remove.js";
|
||||
export * from "./rename.js";
|
||||
export * from "./confirm.js";
|
||||
export * from "./close.js";
|
||||
export * from "./loading.js";
|
||||
export * from "./search.js";
|
||||
export * from "./copy.js";
|
||||
export * from "./copied.js";
|
||||
export * from "./download.js";
|
||||
export * from "./upload.js";
|
||||
export * from "./back.js";
|
||||
export * from "./share.js";
|
||||
export * from "./add.js";
|
||||
export * from "./done.js";
|
||||
export * from "./error.js";
|
||||
export * from "./unknown.js";
|
||||
export * from "./yes.js";
|
||||
export * from "./no.js";
|
||||
export * from "./name.js";
|
||||
export * from "./email.js";
|
||||
export * from "./type.js";
|
||||
export * from "./size.js";
|
||||
export * from "./description.js";
|
||||
export * from "./preview.js";
|
||||
export * from "./restore.js";
|
||||
export * from "./reset.js";
|
||||
export * from "./apply.js";
|
||||
export * from "./install.js";
|
||||
export * from "./generate.js";
|
||||
export * from "./approve.js";
|
||||
export * from "./test.js";
|
||||
export * from "./or.js";
|
||||
export * from "./_new.js";
|
||||
export * from "./select_team_description.js";
|
||||
export * from "./create_team.js";
|
||||
export * from "./all_projects.js";
|
||||
export * from "./create_project.js";
|
||||
export * from "./no_projects_yet.js";
|
||||
export * from "./project_created.js";
|
||||
export * from "./failed_create_project.js";
|
||||
export * from "./project_settings.js";
|
||||
export * from "./create_new_project.js";
|
||||
export * from "./configure_new_project_description.js";
|
||||
export * from "./manage_project_description.js";
|
||||
export * from "./project_name.js";
|
||||
export * from "./project_name_placeholder.js";
|
||||
export * from "./project_name_hint.js";
|
||||
export * from "./project_cover.js";
|
||||
export * from "./remove_cover.js";
|
||||
export * from "./uploading.js";
|
||||
export * from "./cover_preview.js";
|
||||
export * from "./upload_image.js";
|
||||
export * from "./upload_cover.js";
|
||||
export * from "./upload_cover_hint.js";
|
||||
export * from "./project_preferences.js";
|
||||
export * from "./activity_notifications.js";
|
||||
export * from "./activity_notifications_description.js";
|
||||
export * from "./processing.js";
|
||||
export * from "./project_updated.js";
|
||||
export * from "./failed_update_project.js";
|
||||
export * from "./project_notification_updated.js";
|
||||
export * from "./failed_update_project_notification.js";
|
||||
export * from "./notification.js";
|
||||
export * from "./are_you_sure.js";
|
||||
export * from "./delete_project_warning.js";
|
||||
export * from "./type_delete_to_confirm.js";
|
||||
export * from "./delete_placeholder.js";
|
||||
export * from "./deleting.js";
|
||||
export * from "./team_members.js";
|
||||
export * from "./updated_ago.js";
|
||||
export * from "./all_files.js";
|
||||
export * from "./recently_deleted.js";
|
||||
export * from "./collections.js";
|
||||
export * from "./shares.js";
|
||||
export * from "./no_collections_yet.js";
|
||||
export * from "./collection_name.js";
|
||||
export * from "./creator.js";
|
||||
export * from "./created_date.js";
|
||||
export * from "./collection_created.js";
|
||||
export * from "./failed_create_collection.js";
|
||||
export * from "./failed_save_collection.js";
|
||||
export * from "./loading_collection.js";
|
||||
export * from "./untitled_collection.js";
|
||||
export * from "./collection_saved.js";
|
||||
export * from "./collection_renamed.js";
|
||||
export * from "./collection_deleted.js";
|
||||
export * from "./no_share_links_yet.js";
|
||||
export * from "./share_link_created.js";
|
||||
export * from "./share_link_status_updated.js";
|
||||
export * from "./link_copied.js";
|
||||
export * from "./public_link.js";
|
||||
export * from "./active.js";
|
||||
export * from "./click_to_copy_link.js";
|
||||
export * from "./create_share_link.js";
|
||||
export * from "./share_link_renamed.js";
|
||||
export * from "./share_link_deleted.js";
|
||||
export * from "./share_settings.js";
|
||||
export * from "./share_link_disabled.js";
|
||||
export * from "./share_link_expired.js";
|
||||
export * from "./enter_password.js";
|
||||
export * from "./share_link_password_protected.js";
|
||||
export * from "./access_share.js";
|
||||
export * from "./incorrect_password.js";
|
||||
export * from "./share_expired.js";
|
||||
export * from "./share_disabled.js";
|
||||
export * from "./add_to_share_links.js";
|
||||
export * from "./added_to_share_link.js";
|
||||
export * from "./remove_from_share.js";
|
||||
export * from "./removed_from_share.js";
|
||||
export * from "./open_share_link.js";
|
||||
export * from "./copy_link.js";
|
||||
export * from "./view.js";
|
||||
export * from "./security.js";
|
||||
export * from "./expiration_date.js";
|
||||
export * from "./appearance.js";
|
||||
export * from "./grid.js";
|
||||
export * from "./list.js";
|
||||
export * from "./field.js";
|
||||
export * from "./sort_by.js";
|
||||
export * from "./sorted_by.js";
|
||||
export * from "./sorted_by_label.js";
|
||||
export * from "./order.js";
|
||||
export * from "./custom.js";
|
||||
export * from "./date_created.js";
|
||||
export * from "./sort_a_to_z.js";
|
||||
export * from "./sort_z_to_a.js";
|
||||
export * from "./sort_oldest_to_newest.js";
|
||||
export * from "./sort_newest_to_oldest.js";
|
||||
export * from "./sort_smallest_to_largest.js";
|
||||
export * from "./sort_largest_to_smallest.js";
|
||||
export * from "./ascending.js";
|
||||
export * from "./descending.js";
|
||||
export * from "./sort_name.js";
|
||||
export * from "./sort_date_created.js";
|
||||
export * from "./sort_date_modified.js";
|
||||
export * from "./sort_size.js";
|
||||
export * from "./sort_custom.js";
|
||||
export * from "./sort_created.js";
|
||||
export * from "./sort_updated.js";
|
||||
export * from "./general.js";
|
||||
export * from "./general_settings.js";
|
||||
export * from "./general_settings_description.js";
|
||||
export * from "./personal_info_description.js";
|
||||
export * from "./avatar.js";
|
||||
export * from "./change.js";
|
||||
export * from "./enter_your_name.js";
|
||||
export * from "./email_managed_by_auth.js";
|
||||
export * from "./select_language.js";
|
||||
export * from "./english.js";
|
||||
export * from "./chinese.js";
|
||||
export * from "./language_updated.js";
|
||||
export * from "./failed_update_language.js";
|
||||
export * from "./avatar_updated.js";
|
||||
export * from "./failed_update_avatar.js";
|
||||
export * from "./avatar_removed.js";
|
||||
export * from "./failed_remove_avatar.js";
|
||||
export * from "./profile_updated.js";
|
||||
export * from "./failed_update_profile.js";
|
||||
export * from "./failed_load_settings.js";
|
||||
export * from "./media_processing.js";
|
||||
export * from "./media_processing_description.js";
|
||||
export * from "./transcode_settings.js";
|
||||
export * from "./transcode_description.js";
|
||||
export * from "./transcode_strategy_note.js";
|
||||
export * from "./video_strategy.js";
|
||||
export * from "./best_match.js";
|
||||
export * from "./best_match_description.js";
|
||||
export * from "./all_resolutions.js";
|
||||
export * from "./all_resolutions_description.js";
|
||||
export * from "./notification_settings.js";
|
||||
export * from "./notifications_description.js";
|
||||
export * from "./notification_settings_updated.js";
|
||||
export * from "./failed_to_update_notification_settings.js";
|
||||
export * from "./comments_and_replies.js";
|
||||
export * from "./comments_notification_description.js";
|
||||
export * from "./general_comments.js";
|
||||
export * from "./when_someone_comments.js";
|
||||
export * from "./comment_replies.js";
|
||||
export * from "./when_someone_replies.js";
|
||||
export * from "./at_mentions.js";
|
||||
export * from "./when_someone_mentions.js";
|
||||
export * from "./assets_and_statuses.js";
|
||||
export * from "./assets_notification_description.js";
|
||||
export * from "./your_uploads.js";
|
||||
export * from "./when_you_upload_assets.js";
|
||||
export * from "./other_uploads.js";
|
||||
export * from "./when_other_users_upload_assets.js";
|
||||
export * from "./status_updates.js";
|
||||
export * from "./when_someone_changes_status.js";
|
||||
export * from "./api_tokens.js";
|
||||
export * from "./api_tokens_description.js";
|
||||
export * from "./developer_settings.js";
|
||||
export * from "./developer_description.js";
|
||||
export * from "./token_name.js";
|
||||
export * from "./token_name_placeholder.js";
|
||||
export * from "./token.js";
|
||||
export * from "./created_at.js";
|
||||
export * from "./actions.js";
|
||||
export * from "./no_api_tokens_found.js";
|
||||
export * from "./api_token_generated_successfully.js";
|
||||
export * from "./failed_to_generate_token.js";
|
||||
export * from "./api_token_revoked_successfully.js";
|
||||
export * from "./failed_to_revoke_token.js";
|
||||
export * from "./copied_to_clipboard.js";
|
||||
export * from "./copied_api_token_to_clipboard.js";
|
||||
export * from "./ai.js";
|
||||
export * from "./providers.js";
|
||||
export * from "./providers_description.js";
|
||||
export * from "./configured_ai_providers.js";
|
||||
export * from "./add_provider.js";
|
||||
export * from "./search_providers_placeholder.js";
|
||||
export * from "./built_in.js";
|
||||
export * from "./models_count.js";
|
||||
export * from "./n_models_count.js";
|
||||
export * from "./no_providers_configured.js";
|
||||
export * from "./add_first_provider.js";
|
||||
export * from "./no_matches_found.js";
|
||||
export * from "./try_adjusting_search.js";
|
||||
export * from "./clear_search.js";
|
||||
export * from "./add_new_provider.js";
|
||||
export * from "./provider_created_successfully.js";
|
||||
export * from "./provider_updated_successfully.js";
|
||||
export * from "./provider_deleted_successfully.js";
|
||||
export * from "./are_you_absolutely_sure.js";
|
||||
export * from "./delete_provider_confirmation.js";
|
||||
export * from "./configure_provider_description.js";
|
||||
export * from "./provider_name.js";
|
||||
export * from "./provider_name_placeholder.js";
|
||||
export * from "./provider_name_is_required.js";
|
||||
export * from "./provider_name_must_be_unique.js";
|
||||
export * from "./global_api_protocol.js";
|
||||
export * from "./select_api_protocol.js";
|
||||
export * from "./base_url_optional.js";
|
||||
export * from "./override_default_endpoint.js";
|
||||
export * from "./api_key.js";
|
||||
export * from "./api_key_placeholder.js";
|
||||
export * from "./api_key_description.js";
|
||||
export * from "./models_configuration.js";
|
||||
export * from "./add_model.js";
|
||||
export * from "./model_id.js";
|
||||
export * from "./display_name_optional.js";
|
||||
export * from "./reasoning_support.js";
|
||||
export * from "./context_window_tokens.js";
|
||||
export * from "./max_output_tokens.js";
|
||||
export * from "./input_cost_1m.js";
|
||||
export * from "./output_cost_1m.js";
|
||||
export * from "./save_configuration.js";
|
||||
export * from "./at_least_one_model_required.js";
|
||||
export * from "./provider.js";
|
||||
export * from "./model.js";
|
||||
export * from "./select_provider.js";
|
||||
export * from "./select_model.js";
|
||||
export * from "./skills.js";
|
||||
export * from "./skills_description.js";
|
||||
export * from "./skills_management.js";
|
||||
export * from "./skills_management_description.js";
|
||||
export * from "./add_skill.js";
|
||||
export * from "./no_skills_installed.js";
|
||||
export * from "./add_skill_to_get_started.js";
|
||||
export * from "./delete_skill_confirmation.js";
|
||||
export * from "./no_description_provided.js";
|
||||
export * from "./updated_date.js";
|
||||
export * from "./installed.js";
|
||||
export * from "./override_existing_skill.js";
|
||||
export * from "./failed_to_install_skill.js";
|
||||
export * from "./an_unknown_error_occurred.js";
|
||||
export * from "./need_project_to_upload_skills.js";
|
||||
export * from "./only_zip_files_supported.js";
|
||||
export * from "./add_new_skill.js";
|
||||
export * from "./import_skill_description.js";
|
||||
export * from "./package_upload.js";
|
||||
export * from "./select_zip_file.js";
|
||||
export * from "./packages_must_contain_skill_md.js";
|
||||
export * from "./processing_package.js";
|
||||
export * from "./github_repository_url.js";
|
||||
export * from "./github_url_example.js";
|
||||
export * from "./configure_skill.js";
|
||||
export * from "./manage_env_vars_description.js";
|
||||
export * from "./no_env_vars_found.js";
|
||||
export * from "./variable_name.js";
|
||||
export * from "./default_value.js";
|
||||
export * from "./optional_default_value_placeholder.js";
|
||||
export * from "./env_var_empty_note.js";
|
||||
export * from "./add_variable.js";
|
||||
export * from "./skills_count.js";
|
||||
export * from "./agents.js";
|
||||
export * from "./agents_description.js";
|
||||
export * from "./ai_agents.js";
|
||||
export * from "./ai_providers.js";
|
||||
export * from "./create_agent.js";
|
||||
export * from "./edit_item.js";
|
||||
export * from "./create_type_agent.js";
|
||||
export * from "./agent_created_successfully.js";
|
||||
export * from "./agent_updated_successfully.js";
|
||||
export * from "./agent_deleted_successfully.js";
|
||||
export * from "./delete_agent.js";
|
||||
export * from "./delete_agent_confirmation.js";
|
||||
export * from "./no_agents_found.js";
|
||||
export * from "./create_one_now.js";
|
||||
export * from "./configure_agent_description.js";
|
||||
export * from "./agent_name.js";
|
||||
export * from "./agent_name_placeholder.js";
|
||||
export * from "./agent_type.js";
|
||||
export * from "./agent_type_chat.js";
|
||||
export * from "./agent_type_autofill.js";
|
||||
export * from "./agent_type_embedding.js";
|
||||
export * from "./agent_avatar.js";
|
||||
export * from "./preset_avatar_option.js";
|
||||
export * from "./current_custom_avatar.js";
|
||||
export * from "./thinking_level.js";
|
||||
export * from "./agent_soul.js";
|
||||
export * from "./agent_soul_placeholder.js";
|
||||
export * from "./enabled.js";
|
||||
export * from "./disabled.js";
|
||||
export * from "./no_skills_available.js";
|
||||
export * from "./name_is_required.js";
|
||||
export * from "./provider_is_required.js";
|
||||
export * from "./model_is_required.js";
|
||||
export * from "./chat_agent.js";
|
||||
export * from "./chat_agents.js";
|
||||
export * from "./embedding_agent.js";
|
||||
export * from "./skills_count_value.js";
|
||||
export * from "./autofill_agent.js";
|
||||
export * from "./ai_provider.js";
|
||||
export * from "./no_models_configured.js";
|
||||
export * from "./thinking_strength.js";
|
||||
export * from "./thinking_disable.js";
|
||||
export * from "./standard_generation.js";
|
||||
export * from "./thinking_low.js";
|
||||
export * from "./quick_reasoning.js";
|
||||
export * from "./thinking_medium.js";
|
||||
export * from "./balanced_thought.js";
|
||||
export * from "./thinking_high.js";
|
||||
export * from "./deep_reasoning.js";
|
||||
export * from "./thinking_level_description.js";
|
||||
export * from "./select_type.js";
|
||||
export * from "./agent_sandbox.js";
|
||||
export * from "./agent_sandbox_settings.js";
|
||||
export * from "./sandbox_description.js";
|
||||
export * from "./sandbox_settings_updated.js";
|
||||
export * from "./failed_to_update_sandbox_settings.js";
|
||||
export * from "./domain_already_exists.js";
|
||||
export * from "./network_sandbox.js";
|
||||
export * from "./network_sandbox_description.js";
|
||||
export * from "./add_domain.js";
|
||||
export * from "./allowed_domains.js";
|
||||
export * from "./no_custom_domains_allowed.js";
|
||||
export * from "./pending_domain_approvals.js";
|
||||
export * from "./pending_domains_description.js";
|
||||
export * from "./no_pending_domains.js";
|
||||
export * from "./filesystem_restriction.js";
|
||||
export * from "./filesystem_restriction_description.js";
|
||||
export * from "./position_and_resize.js";
|
||||
export * from "./avatar_source.js";
|
||||
export * from "./saving.js";
|
||||
export * from "./auth_tagline.js";
|
||||
export * from "./auth_description.js";
|
||||
export * from "./auth_feature_uploads.js";
|
||||
export * from "./auth_feature_metadata.js";
|
||||
export * from "./auth_feature_teams.js";
|
||||
export * from "./auth_community_cta.js";
|
||||
export * from "./versions.js";
|
||||
export * from "./manage_versions.js";
|
||||
export * from "./show_left_sidebar.js";
|
||||
export * from "./hide_left_sidebar.js";
|
||||
export * from "./show_right_sidebar.js";
|
||||
export * from "./hide_right_sidebar.js";
|
||||
export * from "./card_view.js";
|
||||
export * from "./list_view.js";
|
||||
export * from "./deleted.js";
|
||||
export * from "./failed_to_delete.js";
|
||||
export * from "./renamed_to.js";
|
||||
export * from "./failed_to_rename.js";
|
||||
export * from "./move_to_trash.js";
|
||||
export * from "./delete_permanently.js";
|
||||
export * from "./open_navigation_menu.js";
|
||||
export * from "./preview_unavailable.js";
|
||||
export * from "./download_original_file.js";
|
||||
export * from "./zoom_out.js";
|
||||
export * from "./zoom_in.js";
|
||||
export * from "./fit.js";
|
||||
export * from "./copy_image_to_clipboard.js";
|
||||
export * from "./download_original_image.js";
|
||||
export * from "./no_item_selected.js";
|
||||
export * from "./select_file_to_view_details.js";
|
||||
export * from "./enlarged_view.js";
|
||||
export * from "./comments.js";
|
||||
export * from "./fields.js";
|
||||
export * from "./folder_tree_assets.js";
|
||||
export * from "./share_links.js";
|
||||
export * from "./all_collections_count.js";
|
||||
export * from "./all_share_links_count.js";
|
||||
export * from "./rename_collection.js";
|
||||
export * from "./rename_share_link.js";
|
||||
export * from "./rename_folder.js";
|
||||
export * from "./enter_new_name.js";
|
||||
export * from "./delete_collection_confirm.js";
|
||||
export * from "./delete_share_link_confirm.js";
|
||||
export * from "./delete_folder_confirm.js";
|
||||
export * from "./delete_confirm_description.js";
|
||||
export * from "./folder_created.js";
|
||||
export * from "./failed_create_folder.js";
|
||||
export * from "./folder_renamed.js";
|
||||
export * from "./folder_deleted.js";
|
||||
export * from "./failed_to_prepare_download_links.js";
|
||||
export * from "./starting_download_files.js";
|
||||
export * from "./some_downloads_failed.js";
|
||||
export * from "./preparing_download.js";
|
||||
export * from "./confirm_download.js";
|
||||
export * from "./resolving_files_wait.js";
|
||||
export * from "./folder_files_download_description.js";
|
||||
export * from "./preparing_download_links.js";
|
||||
export * from "./download_includes_files.js";
|
||||
export * from "./no_folder_structure.js";
|
||||
export * from "./folder_structure_warning.js";
|
||||
export * from "./start_download.js";
|
||||
export * from "./new_folder.js";
|
||||
export * from "./folder_name.js";
|
||||
export * from "./moved_to_trash.js";
|
||||
export * from "./failed_move_to_trash.js";
|
||||
export * from "./permanently_deleted.js";
|
||||
export * from "./failed_delete_permanently.js";
|
||||
export * from "./renamed_successfully.js";
|
||||
export * from "./moved_successfully.js";
|
||||
export * from "./failed_to_move.js";
|
||||
export * from "./copied_successfully.js";
|
||||
export * from "./failed_to_copy.js";
|
||||
export * from "./restored.js";
|
||||
export * from "./failed_to_restore.js";
|
||||
export * from "./moving_items.js";
|
||||
export * from "./successfully_moved_items.js";
|
||||
export * from "./go_to_folder.js";
|
||||
export * from "./successfully_copied_items.js";
|
||||
export * from "./trash_emptied_successfully.js";
|
||||
export * from "./error_emptying_trash.js";
|
||||
export * from "./n_items.js";
|
||||
export * from "./n_items_selected.js";
|
||||
export * from "./n_folders_selected.js";
|
||||
export * from "./n_files_selected.js";
|
||||
export * from "./drop_files_here_to_upload.js";
|
||||
export * from "./delete_asset_title.js";
|
||||
export * from "./delete_asset_description.js";
|
||||
export * from "./empty_trash_title.js";
|
||||
export * from "./empty_trash_description.js";
|
||||
export * from "./delete_now.js";
|
||||
export * from "./loading_more.js";
|
||||
export * from "./this_folder_is_empty.js";
|
||||
export * from "./confirm_download_dialog.js";
|
||||
export * from "./selected_files_will_be_prepared.js";
|
||||
export * from "./no_folder_structure_warning.js";
|
||||
export * from "./failed_to_upload_file.js";
|
||||
export * from "./error_message.js";
|
||||
export * from "./count_overflow_assets.js";
|
||||
export * from "./count_overflow_folders.js";
|
||||
export * from "./select_source_folder.js";
|
||||
export * from "./assets.js";
|
||||
export * from "./filter.js";
|
||||
export * from "./project_members.js";
|
||||
export * from "./upload_file.js";
|
||||
export * from "./upload_folder.js";
|
||||
export * from "./move_to.js";
|
||||
export * from "./copy_to.js";
|
||||
export * from "./create_new_version.js";
|
||||
export * from "./file_card_processing.js";
|
||||
export * from "./failed_to_upload.js";
|
||||
export * from "./by.js";
|
||||
export * from "./failed_to_upload_parenthesized.js";
|
||||
export * from "./n_items_count.js";
|
||||
export * from "./name_column.js";
|
||||
export * from "./size_column.js";
|
||||
export * from "./modified_column.js";
|
||||
export * from "./file_uploaded.js";
|
||||
export * from "./all_downloads_initiated.js";
|
||||
export * from "./starting_download_of_n_files.js";
|
||||
export * from "./enter_your_details.js";
|
||||
export * from "./provide_name_email_for_comment.js";
|
||||
export * from "./name_placeholder.js";
|
||||
export * from "./email_field_placeholder.js";
|
||||
export * from "./select_project.js";
|
||||
export * from "./select_a_project.js";
|
||||
export * from "./select_folder.js";
|
||||
export * from "./select_project_first.js";
|
||||
export * from "./copy_comments.js";
|
||||
export * from "./move_here.js";
|
||||
export * from "./copy_here.js";
|
||||
export * from "./thumbnail.js";
|
||||
export * from "./theme.js";
|
||||
export * from "./light.js";
|
||||
export * from "./dark.js";
|
||||
export * from "./system.js";
|
||||
export * from "./log_out.js";
|
||||
export * from "./version.js";
|
||||
export * from "./team_member.js";
|
||||
export * from "./project_member.js";
|
||||
export * from "./editor.js";
|
||||
export * from "./reviewer.js";
|
||||
export * from "./remove_member.js";
|
||||
export * from "./remove_member_confirmation.js";
|
||||
export * from "./member_role_updated.js";
|
||||
export * from "./failed_to_update_member_role.js";
|
||||
export * from "./member_removed.js";
|
||||
export * from "./failed_to_remove_member.js";
|
||||
export * from "./failed_to_generate_invite_link.js";
|
||||
export * from "./invite_link_copied.js";
|
||||
export * from "./add_team_member_to_project.js";
|
||||
export * from "./added_member_successfully.js";
|
||||
export * from "./failed_to_add_member.js";
|
||||
export * from "./invite_new_member.js";
|
||||
export * from "./generate_link.js";
|
||||
export * from "./members.js";
|
||||
export * from "./essentials.js";
|
||||
export * from "./team_attributes.js";
|
||||
export * from "./custom_fields.js";
|
||||
export * from "./field_created_successfully.js";
|
||||
export * from "./field_updated_successfully.js";
|
||||
export * from "./field_deleted_successfully.js";
|
||||
export * from "./confirm_delete_field.js";
|
||||
export * from "./field_name.js";
|
||||
export * from "./field_name_placeholder.js";
|
||||
export * from "./field_type.js";
|
||||
export * from "./select_field_type.js";
|
||||
export * from "./description_optional_placeholder.js";
|
||||
export * from "./ai_autofill.js";
|
||||
export * from "./select_field_to_edit.js";
|
||||
export * from "./type_label.js";
|
||||
export * from "./options.js";
|
||||
export * from "./new_option.js";
|
||||
export * from "./add_option.js";
|
||||
export * from "./delete_field.js";
|
||||
export * from "./manage_fields.js";
|
||||
export * from "./groups.js";
|
||||
export * from "./no_fields_found.js";
|
||||
export * from "./new_field.js";
|
||||
export * from "./new_field_placeholder.js";
|
||||
export * from "./search_fields_placeholder.js";
|
||||
export * from "./visible_count.js";
|
||||
export * from "./option_name_placeholder.js";
|
||||
export * from "./unknown_field_type.js";
|
||||
export * from "./settings_updated.js";
|
||||
export * from "./failed_update_settings.js";
|
||||
export * from "./unknown_user.js";
|
||||
export * from "./unknown_asset.js";
|
||||
export * from "./unknown_project.js";
|
||||
export * from "./unknown_team.js";
|
||||
export * from "./notification_commented_on.js";
|
||||
export * from "./notification_replied_to.js";
|
||||
export * from "./notification_mentioned_you.js";
|
||||
export * from "./notification_uploaded.js";
|
||||
export * from "./notification_status_updated.js";
|
||||
export * from "./notification_joined_team.js";
|
||||
export * from "./notification_joined_project.js";
|
||||
export * from "./notification_generic.js";
|
||||
export * from "./all.js";
|
||||
export * from "./unread.js";
|
||||
export * from "./mark_all_as_read.js";
|
||||
export * from "./no_notifications.js";
|
||||
export * from "./unknown_date.js";
|
||||
export * from "./today.js";
|
||||
export * from "./yesterday.js";
|
||||
export * from "./untitled_upload.js";
|
||||
export * from "./uploading_status.js";
|
||||
export * from "./no_uploads_yet.js";
|
||||
export * from "./no_uploads_hint.js";
|
||||
export * from "./no_content.js";
|
||||
export * from "./enter_some_text.js";
|
||||
export * from "./pick_a_date.js";
|
||||
export * from "./twenty_four_hours.js";
|
||||
export * from "./one_week.js";
|
||||
export * from "./two_weeks.js";
|
||||
export * from "./filters.js";
|
||||
export * from "./filter_where.js";
|
||||
export * from "./filter_and.js";
|
||||
export * from "./select_field.js";
|
||||
export * from "./operator.js";
|
||||
export * from "./add_condition.js";
|
||||
export * from "./operator_is.js";
|
||||
export * from "./operator_is_not.js";
|
||||
export * from "./operator_contains.js";
|
||||
export * from "./operator_does_not_contain.js";
|
||||
export * from "./operator_is_empty.js";
|
||||
export * from "./operator_is_not_empty.js";
|
||||
export * from "./operator_is_any_of.js";
|
||||
export * from "./operator_is_none_of.js";
|
||||
export * from "./operator_has_any_of.js";
|
||||
export * from "./operator_has_all_of.js";
|
||||
export * from "./operator_is_exactly.js";
|
||||
export * from "./operator_has_none_of.js";
|
||||
export * from "./operator_is_within.js";
|
||||
export * from "./operator_is_before.js";
|
||||
export * from "./operator_is_after.js";
|
||||
export * from "./operator_is_on_or_before.js";
|
||||
export * from "./operator_is_on_or_after.js";
|
||||
export * from "./select_options.js";
|
||||
export * from "./select_option.js";
|
||||
export * from "./date_today.js";
|
||||
export * from "./date_yesterday.js";
|
||||
export * from "./date_tomorrow.js";
|
||||
export * from "./date_one_week_ago.js";
|
||||
export * from "./date_one_week_from_now.js";
|
||||
export * from "./date_one_month_ago.js";
|
||||
export * from "./date_one_month_from_now.js";
|
||||
export * from "./date_type.js";
|
||||
export * from "./exact_date.js";
|
||||
export * from "./toggle_checked.js";
|
||||
export * from "./toggle_unchecked.js";
|
||||
export * from "./enter_a_value.js";
|
||||
export * from "./field_created_at.js";
|
||||
export * from "./field_updated_at.js";
|
||||
export * from "./field_size.js";
|
||||
export * from "./search_dialog_title.js";
|
||||
export * from "./search_by_content_placeholder.js";
|
||||
export * from "./search_by_name_placeholder.js";
|
||||
export * from "./search_button.js";
|
||||
export * from "./semantic_search.js";
|
||||
export * from "./semantic_search_requires_embedding.js";
|
||||
export * from "./active_filters.js";
|
||||
export * from "./search_results.js";
|
||||
export * from "./semantic_search_slow.js";
|
||||
export * from "./querying_database.js";
|
||||
export * from "./ready_to_search.js";
|
||||
export * from "./type_query_instruction.js";
|
||||
export * from "./semantic_search_note.js";
|
||||
export * from "./search_failed.js";
|
||||
export * from "./enable_embedding_agent_hint.js";
|
||||
export * from "./no_records_matched.js";
|
||||
export * from "./try_adjusting_spelling.js";
|
||||
export * from "./folder.js";
|
||||
export * from "./size_prefix.js";
|
||||
export * from "./match_found_at.js";
|
||||
export * from "./matched_items.js";
|
||||
export * from "./saving_ellipsis.js";
|
||||
export * from "./save_as_collection.js";
|
||||
export * from "./apply_and_close.js";
|
||||
export * from "./generating.js";
|
||||
export * from "./autofilling_metadata.js";
|
||||
export * from "./generating_embeddings.js";
|
||||
export * from "./contains_drawing_annotations.js";
|
||||
export * from "./created_by_agent.js";
|
||||
export * from "./logs.js";
|
||||
export * from "./reply.js";
|
||||
export * from "./agent_session_logs.js";
|
||||
export * from "./agent_logs_description.js";
|
||||
export * from "./role_user.js";
|
||||
export * from "./role_agent.js";
|
||||
export * from "./tool_result.js";
|
||||
export * from "./role_thinking.js";
|
||||
export * from "./calling_tool.js";
|
||||
export * from "./tool_arguments.js";
|
||||
export * from "./image_object.js";
|
||||
export * from "./no_logs_found.js";
|
||||
export * from "./session_no_entries_yet.js";
|
||||
export * from "./reply_to.js";
|
||||
export * from "./reply_placeholder.js";
|
||||
export * from "./message_placeholder.js";
|
||||
export * from "./arrow.js";
|
||||
export * from "./line.js";
|
||||
export * from "./box.js";
|
||||
export * from "./freehand.js";
|
||||
export * from "./disable_timestamp.js";
|
||||
export * from "./enable_timestamp.js";
|
||||
export * from "./attach_files.js";
|
||||
export * from "./toggle_annotation.js";
|
||||
export * from "./loop.js";
|
||||
export * from "./click_toggle_time_frames.js";
|
||||
export * from "./quality.js";
|
||||
export * from "./media_not_available.js";
|
||||
export * from "./original.js";
|
||||
export * from "./collection.js";
|
||||
export * from "./share_link.js";
|
||||
export * from "./failed_fetch_share_links.js";
|
||||
export * from "./failed_fetch_collections.js";
|
||||
export * from "./failed_create_share_link.js";
|
||||
export * from "./failed_rename_folder.js";
|
||||
export * from "./failed_delete_folder.js";
|
||||
export * from "./failed_rename_collection.js";
|
||||
export * from "./failed_delete_collection.js";
|
||||
export * from "./failed_rename_share_link.js";
|
||||
export * from "./failed_delete_share_link.js";
|
||||
export * from "./failed_to_fetch_folder_children.js";
|
||||
export * from "./failed_update_fields_order.js";
|
||||
export * from "./failed_create_field.js";
|
||||
export * from "./failed_update_field.js";
|
||||
export * from "./failed_delete_field.js";
|
||||
export * from "./new_label.js";
|
||||
export * from "./n_assets_singular.js";
|
||||
export * from "./n_assets_plural.js";
|
||||
export * from "./n_folders_singular.js";
|
||||
export * from "./n_folders_plural.js";
|
||||
export * from "./failed_upload_file.js";
|
||||
export * from "./failed_fetch_share_link.js";
|
||||
export * from "./failed_fetch_folders.js";
|
||||
export * from "./failed_fetch_files.js";
|
||||
export * from "./failed_remove.js";
|
||||
export * from "./failed_update.js";
|
||||
export * from "./failed_fetch_fields.js";
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
+747
@@ -0,0 +1,747 @@
|
||||
/* eslint-disable */
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
export * from './dashboard.js'
|
||||
export * from './notifications.js'
|
||||
export * from './uploads.js'
|
||||
export * from './language.js'
|
||||
export * from './personal_info.js'
|
||||
export * from './language_settings.js'
|
||||
export * from './select_preferred_language.js'
|
||||
export * from './settings.js'
|
||||
export * from './welcome_back.js'
|
||||
export * from './create_account.js'
|
||||
export * from './select_a_team.js'
|
||||
export * from './projects.js'
|
||||
export * from './select_asset_to_view_details.js'
|
||||
export * from './all_collections.js'
|
||||
export * from './file_not_found.js'
|
||||
export * from './recently_deleted_notice.js'
|
||||
export * from './all_share_links.js'
|
||||
export * from './link_visibility.js'
|
||||
export * from './password_protected.js'
|
||||
export * from './login.js'
|
||||
export * from './login_subtitle.js'
|
||||
export * from './email_address.js'
|
||||
export * from './email_placeholder.js'
|
||||
export * from './password.js'
|
||||
export * from './password_placeholder.js'
|
||||
export * from './logging_in.js'
|
||||
export * from './invalid_credentials.js'
|
||||
export * from './invalid_email_address.js'
|
||||
export * from './password_is_required.js'
|
||||
export * from './no_account_prompt.js'
|
||||
export * from './sign_up.js'
|
||||
export * from './demo_access.js'
|
||||
export * from './demo_access_instructions.js'
|
||||
export * from './signup_subtitle.js'
|
||||
export * from './signup_failed.js'
|
||||
export * from './password_min_length.js'
|
||||
export * from './creating_account.js'
|
||||
export * from './already_have_account.js'
|
||||
export * from './login_here.js'
|
||||
export * from './registration_disabled.js'
|
||||
export * from './registration_disabled_description.js'
|
||||
export * from './first_user_notice.js'
|
||||
export * from './password_min_placeholder.js'
|
||||
export * from './invite_join_message.js'
|
||||
export * from './cancel.js'
|
||||
export * from './create.js'
|
||||
export * from './save.js'
|
||||
export * from './save_changes.js'
|
||||
export * from './_delete.js'
|
||||
export * from './edit.js'
|
||||
export * from './remove.js'
|
||||
export * from './rename.js'
|
||||
export * from './confirm.js'
|
||||
export * from './close.js'
|
||||
export * from './loading.js'
|
||||
export * from './search.js'
|
||||
export * from './copy.js'
|
||||
export * from './copied.js'
|
||||
export * from './download.js'
|
||||
export * from './upload.js'
|
||||
export * from './back.js'
|
||||
export * from './share.js'
|
||||
export * from './add.js'
|
||||
export * from './done.js'
|
||||
export * from './error.js'
|
||||
export * from './unknown.js'
|
||||
export * from './yes.js'
|
||||
export * from './no.js'
|
||||
export * from './name.js'
|
||||
export * from './email.js'
|
||||
export * from './type.js'
|
||||
export * from './size.js'
|
||||
export * from './description.js'
|
||||
export * from './preview.js'
|
||||
export * from './restore.js'
|
||||
export * from './reset.js'
|
||||
export * from './apply.js'
|
||||
export * from './install.js'
|
||||
export * from './generate.js'
|
||||
export * from './approve.js'
|
||||
export * from './test.js'
|
||||
export * from './or.js'
|
||||
export * from './_new.js'
|
||||
export * from './select_team_description.js'
|
||||
export * from './create_team.js'
|
||||
export * from './all_projects.js'
|
||||
export * from './create_project.js'
|
||||
export * from './no_projects_yet.js'
|
||||
export * from './project_created.js'
|
||||
export * from './failed_create_project.js'
|
||||
export * from './project_settings.js'
|
||||
export * from './create_new_project.js'
|
||||
export * from './configure_new_project_description.js'
|
||||
export * from './manage_project_description.js'
|
||||
export * from './project_name.js'
|
||||
export * from './project_name_placeholder.js'
|
||||
export * from './project_name_hint.js'
|
||||
export * from './project_cover.js'
|
||||
export * from './remove_cover.js'
|
||||
export * from './uploading.js'
|
||||
export * from './cover_preview.js'
|
||||
export * from './upload_image.js'
|
||||
export * from './upload_cover.js'
|
||||
export * from './upload_cover_hint.js'
|
||||
export * from './project_preferences.js'
|
||||
export * from './activity_notifications.js'
|
||||
export * from './activity_notifications_description.js'
|
||||
export * from './processing.js'
|
||||
export * from './project_updated.js'
|
||||
export * from './failed_update_project.js'
|
||||
export * from './project_notification_updated.js'
|
||||
export * from './failed_update_project_notification.js'
|
||||
export * from './notification.js'
|
||||
export * from './are_you_sure.js'
|
||||
export * from './delete_project_warning.js'
|
||||
export * from './type_delete_to_confirm.js'
|
||||
export * from './delete_placeholder.js'
|
||||
export * from './deleting.js'
|
||||
export * from './team_members.js'
|
||||
export * from './updated_ago.js'
|
||||
export * from './all_files.js'
|
||||
export * from './recently_deleted.js'
|
||||
export * from './collections.js'
|
||||
export * from './shares.js'
|
||||
export * from './no_collections_yet.js'
|
||||
export * from './collection_name.js'
|
||||
export * from './creator.js'
|
||||
export * from './created_date.js'
|
||||
export * from './collection_created.js'
|
||||
export * from './failed_create_collection.js'
|
||||
export * from './failed_save_collection.js'
|
||||
export * from './loading_collection.js'
|
||||
export * from './untitled_collection.js'
|
||||
export * from './collection_saved.js'
|
||||
export * from './collection_renamed.js'
|
||||
export * from './collection_deleted.js'
|
||||
export * from './no_share_links_yet.js'
|
||||
export * from './share_link_created.js'
|
||||
export * from './share_link_status_updated.js'
|
||||
export * from './link_copied.js'
|
||||
export * from './public_link.js'
|
||||
export * from './active.js'
|
||||
export * from './click_to_copy_link.js'
|
||||
export * from './create_share_link.js'
|
||||
export * from './share_link_renamed.js'
|
||||
export * from './share_link_deleted.js'
|
||||
export * from './share_settings.js'
|
||||
export * from './share_link_disabled.js'
|
||||
export * from './share_link_expired.js'
|
||||
export * from './enter_password.js'
|
||||
export * from './share_link_password_protected.js'
|
||||
export * from './access_share.js'
|
||||
export * from './incorrect_password.js'
|
||||
export * from './share_expired.js'
|
||||
export * from './share_disabled.js'
|
||||
export * from './add_to_share_links.js'
|
||||
export * from './added_to_share_link.js'
|
||||
export * from './remove_from_share.js'
|
||||
export * from './removed_from_share.js'
|
||||
export * from './open_share_link.js'
|
||||
export * from './copy_link.js'
|
||||
export * from './view.js'
|
||||
export * from './security.js'
|
||||
export * from './expiration_date.js'
|
||||
export * from './appearance.js'
|
||||
export * from './grid.js'
|
||||
export * from './list.js'
|
||||
export * from './field.js'
|
||||
export * from './sort_by.js'
|
||||
export * from './sorted_by.js'
|
||||
export * from './sorted_by_label.js'
|
||||
export * from './order.js'
|
||||
export * from './custom.js'
|
||||
export * from './date_created.js'
|
||||
export * from './sort_a_to_z.js'
|
||||
export * from './sort_z_to_a.js'
|
||||
export * from './sort_oldest_to_newest.js'
|
||||
export * from './sort_newest_to_oldest.js'
|
||||
export * from './sort_smallest_to_largest.js'
|
||||
export * from './sort_largest_to_smallest.js'
|
||||
export * from './ascending.js'
|
||||
export * from './descending.js'
|
||||
export * from './sort_name.js'
|
||||
export * from './sort_date_created.js'
|
||||
export * from './sort_date_modified.js'
|
||||
export * from './sort_size.js'
|
||||
export * from './sort_custom.js'
|
||||
export * from './sort_created.js'
|
||||
export * from './sort_updated.js'
|
||||
export * from './general.js'
|
||||
export * from './general_settings.js'
|
||||
export * from './general_settings_description.js'
|
||||
export * from './personal_info_description.js'
|
||||
export * from './avatar.js'
|
||||
export * from './change.js'
|
||||
export * from './enter_your_name.js'
|
||||
export * from './email_managed_by_auth.js'
|
||||
export * from './select_language.js'
|
||||
export * from './english.js'
|
||||
export * from './chinese.js'
|
||||
export * from './language_updated.js'
|
||||
export * from './failed_update_language.js'
|
||||
export * from './avatar_updated.js'
|
||||
export * from './failed_update_avatar.js'
|
||||
export * from './avatar_removed.js'
|
||||
export * from './failed_remove_avatar.js'
|
||||
export * from './profile_updated.js'
|
||||
export * from './failed_update_profile.js'
|
||||
export * from './failed_load_settings.js'
|
||||
export * from './media_processing.js'
|
||||
export * from './media_processing_description.js'
|
||||
export * from './transcode_settings.js'
|
||||
export * from './transcode_description.js'
|
||||
export * from './transcode_strategy_note.js'
|
||||
export * from './video_strategy.js'
|
||||
export * from './best_match.js'
|
||||
export * from './best_match_description.js'
|
||||
export * from './all_resolutions.js'
|
||||
export * from './all_resolutions_description.js'
|
||||
export * from './notification_settings.js'
|
||||
export * from './notifications_description.js'
|
||||
export * from './notification_settings_updated.js'
|
||||
export * from './failed_to_update_notification_settings.js'
|
||||
export * from './comments_and_replies.js'
|
||||
export * from './comments_notification_description.js'
|
||||
export * from './general_comments.js'
|
||||
export * from './when_someone_comments.js'
|
||||
export * from './comment_replies.js'
|
||||
export * from './when_someone_replies.js'
|
||||
export * from './at_mentions.js'
|
||||
export * from './when_someone_mentions.js'
|
||||
export * from './assets_and_statuses.js'
|
||||
export * from './assets_notification_description.js'
|
||||
export * from './your_uploads.js'
|
||||
export * from './when_you_upload_assets.js'
|
||||
export * from './other_uploads.js'
|
||||
export * from './when_other_users_upload_assets.js'
|
||||
export * from './status_updates.js'
|
||||
export * from './when_someone_changes_status.js'
|
||||
export * from './api_tokens.js'
|
||||
export * from './api_tokens_description.js'
|
||||
export * from './developer_settings.js'
|
||||
export * from './developer_description.js'
|
||||
export * from './token_name.js'
|
||||
export * from './token_name_placeholder.js'
|
||||
export * from './token.js'
|
||||
export * from './created_at.js'
|
||||
export * from './actions.js'
|
||||
export * from './no_api_tokens_found.js'
|
||||
export * from './api_token_generated_successfully.js'
|
||||
export * from './failed_to_generate_token.js'
|
||||
export * from './api_token_revoked_successfully.js'
|
||||
export * from './failed_to_revoke_token.js'
|
||||
export * from './copied_to_clipboard.js'
|
||||
export * from './copied_api_token_to_clipboard.js'
|
||||
export * from './ai.js'
|
||||
export * from './providers.js'
|
||||
export * from './providers_description.js'
|
||||
export * from './configured_ai_providers.js'
|
||||
export * from './add_provider.js'
|
||||
export * from './search_providers_placeholder.js'
|
||||
export * from './built_in.js'
|
||||
export * from './models_count.js'
|
||||
export * from './n_models_count.js'
|
||||
export * from './no_providers_configured.js'
|
||||
export * from './add_first_provider.js'
|
||||
export * from './no_matches_found.js'
|
||||
export * from './try_adjusting_search.js'
|
||||
export * from './clear_search.js'
|
||||
export * from './add_new_provider.js'
|
||||
export * from './provider_created_successfully.js'
|
||||
export * from './provider_updated_successfully.js'
|
||||
export * from './provider_deleted_successfully.js'
|
||||
export * from './are_you_absolutely_sure.js'
|
||||
export * from './delete_provider_confirmation.js'
|
||||
export * from './configure_provider_description.js'
|
||||
export * from './provider_name.js'
|
||||
export * from './provider_name_placeholder.js'
|
||||
export * from './provider_name_is_required.js'
|
||||
export * from './provider_name_must_be_unique.js'
|
||||
export * from './global_api_protocol.js'
|
||||
export * from './select_api_protocol.js'
|
||||
export * from './base_url_optional.js'
|
||||
export * from './override_default_endpoint.js'
|
||||
export * from './api_key.js'
|
||||
export * from './api_key_placeholder.js'
|
||||
export * from './api_key_description.js'
|
||||
export * from './models_configuration.js'
|
||||
export * from './add_model.js'
|
||||
export * from './model_id.js'
|
||||
export * from './display_name_optional.js'
|
||||
export * from './reasoning_support.js'
|
||||
export * from './context_window_tokens.js'
|
||||
export * from './max_output_tokens.js'
|
||||
export * from './input_cost_1m.js'
|
||||
export * from './output_cost_1m.js'
|
||||
export * from './save_configuration.js'
|
||||
export * from './at_least_one_model_required.js'
|
||||
export * from './provider.js'
|
||||
export * from './model.js'
|
||||
export * from './select_provider.js'
|
||||
export * from './select_model.js'
|
||||
export * from './skills.js'
|
||||
export * from './skills_description.js'
|
||||
export * from './skills_management.js'
|
||||
export * from './skills_management_description.js'
|
||||
export * from './add_skill.js'
|
||||
export * from './no_skills_installed.js'
|
||||
export * from './add_skill_to_get_started.js'
|
||||
export * from './delete_skill_confirmation.js'
|
||||
export * from './no_description_provided.js'
|
||||
export * from './updated_date.js'
|
||||
export * from './installed.js'
|
||||
export * from './override_existing_skill.js'
|
||||
export * from './failed_to_install_skill.js'
|
||||
export * from './an_unknown_error_occurred.js'
|
||||
export * from './need_project_to_upload_skills.js'
|
||||
export * from './only_zip_files_supported.js'
|
||||
export * from './add_new_skill.js'
|
||||
export * from './import_skill_description.js'
|
||||
export * from './package_upload.js'
|
||||
export * from './select_zip_file.js'
|
||||
export * from './packages_must_contain_skill_md.js'
|
||||
export * from './processing_package.js'
|
||||
export * from './github_repository_url.js'
|
||||
export * from './github_url_example.js'
|
||||
export * from './configure_skill.js'
|
||||
export * from './manage_env_vars_description.js'
|
||||
export * from './no_env_vars_found.js'
|
||||
export * from './variable_name.js'
|
||||
export * from './default_value.js'
|
||||
export * from './optional_default_value_placeholder.js'
|
||||
export * from './env_var_empty_note.js'
|
||||
export * from './add_variable.js'
|
||||
export * from './skills_count.js'
|
||||
export * from './agents.js'
|
||||
export * from './agents_description.js'
|
||||
export * from './ai_agents.js'
|
||||
export * from './ai_providers.js'
|
||||
export * from './create_agent.js'
|
||||
export * from './edit_item.js'
|
||||
export * from './create_type_agent.js'
|
||||
export * from './agent_created_successfully.js'
|
||||
export * from './agent_updated_successfully.js'
|
||||
export * from './agent_deleted_successfully.js'
|
||||
export * from './delete_agent.js'
|
||||
export * from './delete_agent_confirmation.js'
|
||||
export * from './no_agents_found.js'
|
||||
export * from './create_one_now.js'
|
||||
export * from './configure_agent_description.js'
|
||||
export * from './agent_name.js'
|
||||
export * from './agent_name_placeholder.js'
|
||||
export * from './agent_type.js'
|
||||
export * from './agent_type_chat.js'
|
||||
export * from './agent_type_autofill.js'
|
||||
export * from './agent_type_embedding.js'
|
||||
export * from './agent_avatar.js'
|
||||
export * from './preset_avatar_option.js'
|
||||
export * from './current_custom_avatar.js'
|
||||
export * from './thinking_level.js'
|
||||
export * from './agent_soul.js'
|
||||
export * from './agent_soul_placeholder.js'
|
||||
export * from './enabled.js'
|
||||
export * from './disabled.js'
|
||||
export * from './no_skills_available.js'
|
||||
export * from './name_is_required.js'
|
||||
export * from './provider_is_required.js'
|
||||
export * from './model_is_required.js'
|
||||
export * from './chat_agent.js'
|
||||
export * from './chat_agents.js'
|
||||
export * from './embedding_agent.js'
|
||||
export * from './skills_count_value.js'
|
||||
export * from './autofill_agent.js'
|
||||
export * from './ai_provider.js'
|
||||
export * from './no_models_configured.js'
|
||||
export * from './thinking_strength.js'
|
||||
export * from './thinking_disable.js'
|
||||
export * from './standard_generation.js'
|
||||
export * from './thinking_low.js'
|
||||
export * from './quick_reasoning.js'
|
||||
export * from './thinking_medium.js'
|
||||
export * from './balanced_thought.js'
|
||||
export * from './thinking_high.js'
|
||||
export * from './deep_reasoning.js'
|
||||
export * from './thinking_level_description.js'
|
||||
export * from './select_type.js'
|
||||
export * from './agent_sandbox.js'
|
||||
export * from './agent_sandbox_settings.js'
|
||||
export * from './sandbox_description.js'
|
||||
export * from './sandbox_settings_updated.js'
|
||||
export * from './failed_to_update_sandbox_settings.js'
|
||||
export * from './domain_already_exists.js'
|
||||
export * from './network_sandbox.js'
|
||||
export * from './network_sandbox_description.js'
|
||||
export * from './add_domain.js'
|
||||
export * from './allowed_domains.js'
|
||||
export * from './no_custom_domains_allowed.js'
|
||||
export * from './pending_domain_approvals.js'
|
||||
export * from './pending_domains_description.js'
|
||||
export * from './no_pending_domains.js'
|
||||
export * from './filesystem_restriction.js'
|
||||
export * from './filesystem_restriction_description.js'
|
||||
export * from './position_and_resize.js'
|
||||
export * from './avatar_source.js'
|
||||
export * from './saving.js'
|
||||
export * from './auth_tagline.js'
|
||||
export * from './auth_description.js'
|
||||
export * from './auth_feature_uploads.js'
|
||||
export * from './auth_feature_metadata.js'
|
||||
export * from './auth_feature_teams.js'
|
||||
export * from './auth_community_cta.js'
|
||||
export * from './versions.js'
|
||||
export * from './manage_versions.js'
|
||||
export * from './show_left_sidebar.js'
|
||||
export * from './hide_left_sidebar.js'
|
||||
export * from './show_right_sidebar.js'
|
||||
export * from './hide_right_sidebar.js'
|
||||
export * from './card_view.js'
|
||||
export * from './list_view.js'
|
||||
export * from './deleted.js'
|
||||
export * from './failed_to_delete.js'
|
||||
export * from './renamed_to.js'
|
||||
export * from './failed_to_rename.js'
|
||||
export * from './move_to_trash.js'
|
||||
export * from './delete_permanently.js'
|
||||
export * from './open_navigation_menu.js'
|
||||
export * from './preview_unavailable.js'
|
||||
export * from './download_original_file.js'
|
||||
export * from './zoom_out.js'
|
||||
export * from './zoom_in.js'
|
||||
export * from './fit.js'
|
||||
export * from './copy_image_to_clipboard.js'
|
||||
export * from './download_original_image.js'
|
||||
export * from './no_item_selected.js'
|
||||
export * from './select_file_to_view_details.js'
|
||||
export * from './enlarged_view.js'
|
||||
export * from './comments.js'
|
||||
export * from './fields.js'
|
||||
export * from './folder_tree_assets.js'
|
||||
export * from './share_links.js'
|
||||
export * from './all_collections_count.js'
|
||||
export * from './all_share_links_count.js'
|
||||
export * from './rename_collection.js'
|
||||
export * from './rename_share_link.js'
|
||||
export * from './rename_folder.js'
|
||||
export * from './enter_new_name.js'
|
||||
export * from './delete_collection_confirm.js'
|
||||
export * from './delete_share_link_confirm.js'
|
||||
export * from './delete_folder_confirm.js'
|
||||
export * from './delete_confirm_description.js'
|
||||
export * from './folder_created.js'
|
||||
export * from './failed_create_folder.js'
|
||||
export * from './folder_renamed.js'
|
||||
export * from './folder_deleted.js'
|
||||
export * from './failed_to_prepare_download_links.js'
|
||||
export * from './starting_download_files.js'
|
||||
export * from './some_downloads_failed.js'
|
||||
export * from './preparing_download.js'
|
||||
export * from './confirm_download.js'
|
||||
export * from './resolving_files_wait.js'
|
||||
export * from './folder_files_download_description.js'
|
||||
export * from './preparing_download_links.js'
|
||||
export * from './download_includes_files.js'
|
||||
export * from './no_folder_structure.js'
|
||||
export * from './folder_structure_warning.js'
|
||||
export * from './start_download.js'
|
||||
export * from './new_folder.js'
|
||||
export * from './folder_name.js'
|
||||
export * from './moved_to_trash.js'
|
||||
export * from './failed_move_to_trash.js'
|
||||
export * from './permanently_deleted.js'
|
||||
export * from './failed_delete_permanently.js'
|
||||
export * from './renamed_successfully.js'
|
||||
export * from './moved_successfully.js'
|
||||
export * from './failed_to_move.js'
|
||||
export * from './copied_successfully.js'
|
||||
export * from './failed_to_copy.js'
|
||||
export * from './restored.js'
|
||||
export * from './failed_to_restore.js'
|
||||
export * from './moving_items.js'
|
||||
export * from './successfully_moved_items.js'
|
||||
export * from './go_to_folder.js'
|
||||
export * from './successfully_copied_items.js'
|
||||
export * from './trash_emptied_successfully.js'
|
||||
export * from './error_emptying_trash.js'
|
||||
export * from './n_items.js'
|
||||
export * from './n_items_selected.js'
|
||||
export * from './n_folders_selected.js'
|
||||
export * from './n_files_selected.js'
|
||||
export * from './drop_files_here_to_upload.js'
|
||||
export * from './delete_asset_title.js'
|
||||
export * from './delete_asset_description.js'
|
||||
export * from './empty_trash_title.js'
|
||||
export * from './empty_trash_description.js'
|
||||
export * from './delete_now.js'
|
||||
export * from './loading_more.js'
|
||||
export * from './this_folder_is_empty.js'
|
||||
export * from './confirm_download_dialog.js'
|
||||
export * from './selected_files_will_be_prepared.js'
|
||||
export * from './no_folder_structure_warning.js'
|
||||
export * from './failed_to_upload_file.js'
|
||||
export * from './error_message.js'
|
||||
export * from './count_overflow_assets.js'
|
||||
export * from './count_overflow_folders.js'
|
||||
export * from './select_source_folder.js'
|
||||
export * from './assets.js'
|
||||
export * from './filter.js'
|
||||
export * from './project_members.js'
|
||||
export * from './upload_file.js'
|
||||
export * from './upload_folder.js'
|
||||
export * from './move_to.js'
|
||||
export * from './copy_to.js'
|
||||
export * from './create_new_version.js'
|
||||
export * from './file_card_processing.js'
|
||||
export * from './failed_to_upload.js'
|
||||
export * from './by.js'
|
||||
export * from './failed_to_upload_parenthesized.js'
|
||||
export * from './n_items_count.js'
|
||||
export * from './name_column.js'
|
||||
export * from './size_column.js'
|
||||
export * from './modified_column.js'
|
||||
export * from './file_uploaded.js'
|
||||
export * from './all_downloads_initiated.js'
|
||||
export * from './starting_download_of_n_files.js'
|
||||
export * from './enter_your_details.js'
|
||||
export * from './provide_name_email_for_comment.js'
|
||||
export * from './name_placeholder.js'
|
||||
export * from './email_field_placeholder.js'
|
||||
export * from './select_project.js'
|
||||
export * from './select_a_project.js'
|
||||
export * from './select_folder.js'
|
||||
export * from './select_project_first.js'
|
||||
export * from './copy_comments.js'
|
||||
export * from './move_here.js'
|
||||
export * from './copy_here.js'
|
||||
export * from './thumbnail.js'
|
||||
export * from './theme.js'
|
||||
export * from './light.js'
|
||||
export * from './dark.js'
|
||||
export * from './system.js'
|
||||
export * from './log_out.js'
|
||||
export * from './version.js'
|
||||
export * from './team_member.js'
|
||||
export * from './project_member.js'
|
||||
export * from './editor.js'
|
||||
export * from './reviewer.js'
|
||||
export * from './remove_member.js'
|
||||
export * from './remove_member_confirmation.js'
|
||||
export * from './member_role_updated.js'
|
||||
export * from './failed_to_update_member_role.js'
|
||||
export * from './member_removed.js'
|
||||
export * from './failed_to_remove_member.js'
|
||||
export * from './failed_to_generate_invite_link.js'
|
||||
export * from './invite_link_copied.js'
|
||||
export * from './add_team_member_to_project.js'
|
||||
export * from './added_member_successfully.js'
|
||||
export * from './failed_to_add_member.js'
|
||||
export * from './invite_new_member.js'
|
||||
export * from './generate_link.js'
|
||||
export * from './members.js'
|
||||
export * from './essentials.js'
|
||||
export * from './team_attributes.js'
|
||||
export * from './custom_fields.js'
|
||||
export * from './field_created_successfully.js'
|
||||
export * from './field_updated_successfully.js'
|
||||
export * from './field_deleted_successfully.js'
|
||||
export * from './confirm_delete_field.js'
|
||||
export * from './field_name.js'
|
||||
export * from './field_name_placeholder.js'
|
||||
export * from './field_type.js'
|
||||
export * from './select_field_type.js'
|
||||
export * from './description_optional_placeholder.js'
|
||||
export * from './ai_autofill.js'
|
||||
export * from './select_field_to_edit.js'
|
||||
export * from './type_label.js'
|
||||
export * from './options.js'
|
||||
export * from './new_option.js'
|
||||
export * from './add_option.js'
|
||||
export * from './delete_field.js'
|
||||
export * from './manage_fields.js'
|
||||
export * from './groups.js'
|
||||
export * from './no_fields_found.js'
|
||||
export * from './new_field.js'
|
||||
export * from './new_field_placeholder.js'
|
||||
export * from './search_fields_placeholder.js'
|
||||
export * from './visible_count.js'
|
||||
export * from './option_name_placeholder.js'
|
||||
export * from './unknown_field_type.js'
|
||||
export * from './settings_updated.js'
|
||||
export * from './failed_update_settings.js'
|
||||
export * from './unknown_user.js'
|
||||
export * from './unknown_asset.js'
|
||||
export * from './unknown_project.js'
|
||||
export * from './unknown_team.js'
|
||||
export * from './notification_commented_on.js'
|
||||
export * from './notification_replied_to.js'
|
||||
export * from './notification_mentioned_you.js'
|
||||
export * from './notification_uploaded.js'
|
||||
export * from './notification_status_updated.js'
|
||||
export * from './notification_joined_team.js'
|
||||
export * from './notification_joined_project.js'
|
||||
export * from './notification_generic.js'
|
||||
export * from './all.js'
|
||||
export * from './unread.js'
|
||||
export * from './mark_all_as_read.js'
|
||||
export * from './no_notifications.js'
|
||||
export * from './unknown_date.js'
|
||||
export * from './today.js'
|
||||
export * from './yesterday.js'
|
||||
export * from './untitled_upload.js'
|
||||
export * from './uploading_status.js'
|
||||
export * from './no_uploads_yet.js'
|
||||
export * from './no_uploads_hint.js'
|
||||
export * from './no_content.js'
|
||||
export * from './enter_some_text.js'
|
||||
export * from './pick_a_date.js'
|
||||
export * from './twenty_four_hours.js'
|
||||
export * from './one_week.js'
|
||||
export * from './two_weeks.js'
|
||||
export * from './filters.js'
|
||||
export * from './filter_where.js'
|
||||
export * from './filter_and.js'
|
||||
export * from './select_field.js'
|
||||
export * from './operator.js'
|
||||
export * from './add_condition.js'
|
||||
export * from './operator_is.js'
|
||||
export * from './operator_is_not.js'
|
||||
export * from './operator_contains.js'
|
||||
export * from './operator_does_not_contain.js'
|
||||
export * from './operator_is_empty.js'
|
||||
export * from './operator_is_not_empty.js'
|
||||
export * from './operator_is_any_of.js'
|
||||
export * from './operator_is_none_of.js'
|
||||
export * from './operator_has_any_of.js'
|
||||
export * from './operator_has_all_of.js'
|
||||
export * from './operator_is_exactly.js'
|
||||
export * from './operator_has_none_of.js'
|
||||
export * from './operator_is_within.js'
|
||||
export * from './operator_is_before.js'
|
||||
export * from './operator_is_after.js'
|
||||
export * from './operator_is_on_or_before.js'
|
||||
export * from './operator_is_on_or_after.js'
|
||||
export * from './select_options.js'
|
||||
export * from './select_option.js'
|
||||
export * from './date_today.js'
|
||||
export * from './date_yesterday.js'
|
||||
export * from './date_tomorrow.js'
|
||||
export * from './date_one_week_ago.js'
|
||||
export * from './date_one_week_from_now.js'
|
||||
export * from './date_one_month_ago.js'
|
||||
export * from './date_one_month_from_now.js'
|
||||
export * from './date_type.js'
|
||||
export * from './exact_date.js'
|
||||
export * from './toggle_checked.js'
|
||||
export * from './toggle_unchecked.js'
|
||||
export * from './enter_a_value.js'
|
||||
export * from './field_created_at.js'
|
||||
export * from './field_updated_at.js'
|
||||
export * from './field_size.js'
|
||||
export * from './search_dialog_title.js'
|
||||
export * from './search_by_content_placeholder.js'
|
||||
export * from './search_by_name_placeholder.js'
|
||||
export * from './search_button.js'
|
||||
export * from './semantic_search.js'
|
||||
export * from './semantic_search_requires_embedding.js'
|
||||
export * from './active_filters.js'
|
||||
export * from './search_results.js'
|
||||
export * from './semantic_search_slow.js'
|
||||
export * from './querying_database.js'
|
||||
export * from './ready_to_search.js'
|
||||
export * from './type_query_instruction.js'
|
||||
export * from './semantic_search_note.js'
|
||||
export * from './search_failed.js'
|
||||
export * from './enable_embedding_agent_hint.js'
|
||||
export * from './no_records_matched.js'
|
||||
export * from './try_adjusting_spelling.js'
|
||||
export * from './folder.js'
|
||||
export * from './size_prefix.js'
|
||||
export * from './match_found_at.js'
|
||||
export * from './matched_items.js'
|
||||
export * from './saving_ellipsis.js'
|
||||
export * from './save_as_collection.js'
|
||||
export * from './apply_and_close.js'
|
||||
export * from './generating.js'
|
||||
export * from './autofilling_metadata.js'
|
||||
export * from './generating_embeddings.js'
|
||||
export * from './contains_drawing_annotations.js'
|
||||
export * from './created_by_agent.js'
|
||||
export * from './logs.js'
|
||||
export * from './reply.js'
|
||||
export * from './agent_session_logs.js'
|
||||
export * from './agent_logs_description.js'
|
||||
export * from './role_user.js'
|
||||
export * from './role_agent.js'
|
||||
export * from './tool_result.js'
|
||||
export * from './role_thinking.js'
|
||||
export * from './calling_tool.js'
|
||||
export * from './tool_arguments.js'
|
||||
export * from './image_object.js'
|
||||
export * from './no_logs_found.js'
|
||||
export * from './session_no_entries_yet.js'
|
||||
export * from './reply_to.js'
|
||||
export * from './reply_placeholder.js'
|
||||
export * from './message_placeholder.js'
|
||||
export * from './arrow.js'
|
||||
export * from './line.js'
|
||||
export * from './box.js'
|
||||
export * from './freehand.js'
|
||||
export * from './disable_timestamp.js'
|
||||
export * from './enable_timestamp.js'
|
||||
export * from './attach_files.js'
|
||||
export * from './toggle_annotation.js'
|
||||
export * from './loop.js'
|
||||
export * from './click_toggle_time_frames.js'
|
||||
export * from './quality.js'
|
||||
export * from './media_not_available.js'
|
||||
export * from './original.js'
|
||||
export * from './collection.js'
|
||||
export * from './share_link.js'
|
||||
export * from './failed_fetch_share_links.js'
|
||||
export * from './failed_fetch_collections.js'
|
||||
export * from './failed_create_share_link.js'
|
||||
export * from './failed_rename_folder.js'
|
||||
export * from './failed_delete_folder.js'
|
||||
export * from './failed_rename_collection.js'
|
||||
export * from './failed_delete_collection.js'
|
||||
export * from './failed_rename_share_link.js'
|
||||
export * from './failed_delete_share_link.js'
|
||||
export * from './failed_to_fetch_folder_children.js'
|
||||
export * from './failed_update_fields_order.js'
|
||||
export * from './failed_create_field.js'
|
||||
export * from './failed_update_field.js'
|
||||
export * from './failed_delete_field.js'
|
||||
export * from './new_label.js'
|
||||
export * from './n_assets_singular.js'
|
||||
export * from './n_assets_plural.js'
|
||||
export * from './n_folders_singular.js'
|
||||
export * from './n_folders_plural.js'
|
||||
export * from './failed_upload_file.js'
|
||||
export * from './failed_fetch_share_link.js'
|
||||
export * from './failed_fetch_folders.js'
|
||||
export * from './failed_fetch_files.js'
|
||||
export * from './failed_remove.js'
|
||||
export * from './failed_update.js'
|
||||
export * from './failed_fetch_fields.js'
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type _NewInputs = {};
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "New" |
|
||||
*
|
||||
* @param {_NewInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
declare const _new: ((inputs?: _NewInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<_NewInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export { _new as "new" };
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} _NewInputs */
|
||||
|
||||
const en__new = /** @type {(inputs: _NewInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`New`)
|
||||
};
|
||||
|
||||
const zh__new = /** @type {(inputs: _NewInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`新建`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "New" |
|
||||
*
|
||||
* @param {_NewInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
const _new = /** @type {((inputs?: _NewInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<_NewInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en__new(inputs)
|
||||
return zh__new(inputs)
|
||||
});
|
||||
export { _new as "new" }
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Access Share" |
|
||||
*
|
||||
* @param {Access_ShareInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const access_share: ((inputs?: Access_ShareInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Access_ShareInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Access_ShareInputs = {};
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Access_ShareInputs */
|
||||
|
||||
const en_access_share = /** @type {(inputs: Access_ShareInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Access Share`)
|
||||
};
|
||||
|
||||
const zh_access_share = /** @type {(inputs: Access_ShareInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`访问分享`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Access Share" |
|
||||
*
|
||||
* @param {Access_ShareInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const access_share = /** @type {((inputs?: Access_ShareInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Access_ShareInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_access_share(inputs)
|
||||
return zh_access_share(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Actions" |
|
||||
*
|
||||
* @param {ActionsInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const actions: ((inputs?: ActionsInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<ActionsInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type ActionsInputs = {};
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} ActionsInputs */
|
||||
|
||||
const en_actions = /** @type {(inputs: ActionsInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Actions`)
|
||||
};
|
||||
|
||||
const zh_actions = /** @type {(inputs: ActionsInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`操作`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Actions" |
|
||||
*
|
||||
* @param {ActionsInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const actions = /** @type {((inputs?: ActionsInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<ActionsInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_actions(inputs)
|
||||
return zh_actions(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Active" |
|
||||
*
|
||||
* @param {ActiveInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const active: ((inputs?: ActiveInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<ActiveInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type ActiveInputs = {};
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} ActiveInputs */
|
||||
|
||||
const en_active = /** @type {(inputs: ActiveInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Active`)
|
||||
};
|
||||
|
||||
const zh_active = /** @type {(inputs: ActiveInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`启用`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Active" |
|
||||
*
|
||||
* @param {ActiveInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const active = /** @type {((inputs?: ActiveInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<ActiveInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_active(inputs)
|
||||
return zh_active(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "active" |
|
||||
*
|
||||
* @param {Active_FiltersInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const active_filters: ((inputs?: Active_FiltersInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Active_FiltersInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Active_FiltersInputs = {};
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Active_FiltersInputs */
|
||||
|
||||
const en_active_filters = /** @type {(inputs: Active_FiltersInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`active`)
|
||||
};
|
||||
|
||||
const zh_active_filters = /** @type {(inputs: Active_FiltersInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`个激活`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "active" |
|
||||
*
|
||||
* @param {Active_FiltersInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const active_filters = /** @type {((inputs?: Active_FiltersInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Active_FiltersInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_active_filters(inputs)
|
||||
return zh_active_filters(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Activity Notifications" |
|
||||
*
|
||||
* @param {Activity_NotificationsInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const activity_notifications: ((inputs?: Activity_NotificationsInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Activity_NotificationsInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Activity_NotificationsInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Activity_NotificationsInputs */
|
||||
|
||||
const en_activity_notifications = /** @type {(inputs: Activity_NotificationsInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Activity Notifications`)
|
||||
};
|
||||
|
||||
const zh_activity_notifications = /** @type {(inputs: Activity_NotificationsInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`活动通知`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Activity Notifications" |
|
||||
*
|
||||
* @param {Activity_NotificationsInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const activity_notifications = /** @type {((inputs?: Activity_NotificationsInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Activity_NotificationsInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_activity_notifications(inputs)
|
||||
return zh_activity_notifications(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Receive in-app updates for comments, uploads, and automated background analysis tasks inside this project." |
|
||||
*
|
||||
* @param {Activity_Notifications_DescriptionInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const activity_notifications_description: ((inputs?: Activity_Notifications_DescriptionInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Activity_Notifications_DescriptionInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Activity_Notifications_DescriptionInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Activity_Notifications_DescriptionInputs */
|
||||
|
||||
const en_activity_notifications_description = /** @type {(inputs: Activity_Notifications_DescriptionInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Receive in-app updates for comments, uploads, and automated background analysis tasks inside this project.`)
|
||||
};
|
||||
|
||||
const zh_activity_notifications_description = /** @type {(inputs: Activity_Notifications_DescriptionInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`接收此项目中评论、上传及自动后台分析任务的应用内通知。`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Receive in-app updates for comments, uploads, and automated background analysis tasks inside this project." |
|
||||
*
|
||||
* @param {Activity_Notifications_DescriptionInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const activity_notifications_description = /** @type {((inputs?: Activity_Notifications_DescriptionInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Activity_Notifications_DescriptionInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_activity_notifications_description(inputs)
|
||||
return zh_activity_notifications_description(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Add" |
|
||||
*
|
||||
* @param {AddInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const add: ((inputs?: AddInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<AddInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type AddInputs = {};
|
||||
Generated
+29
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} AddInputs */
|
||||
|
||||
const en_add = /** @type {(inputs: AddInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Add`)
|
||||
};
|
||||
|
||||
const zh_add = /** @type {(inputs: AddInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`添加`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Add" |
|
||||
*
|
||||
* @param {AddInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const add = /** @type {((inputs?: AddInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<AddInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_add(inputs)
|
||||
return zh_add(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "+ Add condition" |
|
||||
*
|
||||
* @param {Add_ConditionInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const add_condition: ((inputs?: Add_ConditionInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Add_ConditionInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Add_ConditionInputs = {};
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Add_ConditionInputs */
|
||||
|
||||
const en_add_condition = /** @type {(inputs: Add_ConditionInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`+ Add condition`)
|
||||
};
|
||||
|
||||
const zh_add_condition = /** @type {(inputs: Add_ConditionInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`+ 添加条件`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "+ Add condition" |
|
||||
*
|
||||
* @param {Add_ConditionInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const add_condition = /** @type {((inputs?: Add_ConditionInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Add_ConditionInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_add_condition(inputs)
|
||||
return zh_add_condition(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Add Domain" |
|
||||
*
|
||||
* @param {Add_DomainInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const add_domain: ((inputs?: Add_DomainInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Add_DomainInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Add_DomainInputs = {};
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Add_DomainInputs */
|
||||
|
||||
const en_add_domain = /** @type {(inputs: Add_DomainInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Add Domain`)
|
||||
};
|
||||
|
||||
const zh_add_domain = /** @type {(inputs: Add_DomainInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`添加域名`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Add Domain" |
|
||||
*
|
||||
* @param {Add_DomainInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const add_domain = /** @type {((inputs?: Add_DomainInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Add_DomainInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_add_domain(inputs)
|
||||
return zh_add_domain(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Add your first AI provider to get started." |
|
||||
*
|
||||
* @param {Add_First_ProviderInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const add_first_provider: ((inputs?: Add_First_ProviderInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Add_First_ProviderInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Add_First_ProviderInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Add_First_ProviderInputs */
|
||||
|
||||
const en_add_first_provider = /** @type {(inputs: Add_First_ProviderInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Add your first AI provider to get started.`)
|
||||
};
|
||||
|
||||
const zh_add_first_provider = /** @type {(inputs: Add_First_ProviderInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`添加您的第一个 AI 提供商以开始使用。`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Add your first AI provider to get started." |
|
||||
*
|
||||
* @param {Add_First_ProviderInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const add_first_provider = /** @type {((inputs?: Add_First_ProviderInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Add_First_ProviderInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_add_first_provider(inputs)
|
||||
return zh_add_first_provider(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Add Model" |
|
||||
*
|
||||
* @param {Add_ModelInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const add_model: ((inputs?: Add_ModelInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Add_ModelInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Add_ModelInputs = {};
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Add_ModelInputs */
|
||||
|
||||
const en_add_model = /** @type {(inputs: Add_ModelInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Add Model`)
|
||||
};
|
||||
|
||||
const zh_add_model = /** @type {(inputs: Add_ModelInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`添加模型`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Add Model" |
|
||||
*
|
||||
* @param {Add_ModelInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const add_model = /** @type {((inputs?: Add_ModelInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Add_ModelInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_add_model(inputs)
|
||||
return zh_add_model(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Add New Provider" |
|
||||
*
|
||||
* @param {Add_New_ProviderInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const add_new_provider: ((inputs?: Add_New_ProviderInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Add_New_ProviderInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Add_New_ProviderInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Add_New_ProviderInputs */
|
||||
|
||||
const en_add_new_provider = /** @type {(inputs: Add_New_ProviderInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Add New Provider`)
|
||||
};
|
||||
|
||||
const zh_add_new_provider = /** @type {(inputs: Add_New_ProviderInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`添加新提供商`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Add New Provider" |
|
||||
*
|
||||
* @param {Add_New_ProviderInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const add_new_provider = /** @type {((inputs?: Add_New_ProviderInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Add_New_ProviderInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_add_new_provider(inputs)
|
||||
return zh_add_new_provider(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Add New Skill" |
|
||||
*
|
||||
* @param {Add_New_SkillInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const add_new_skill: ((inputs?: Add_New_SkillInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Add_New_SkillInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Add_New_SkillInputs = {};
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Add_New_SkillInputs */
|
||||
|
||||
const en_add_new_skill = /** @type {(inputs: Add_New_SkillInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Add New Skill`)
|
||||
};
|
||||
|
||||
const zh_add_new_skill = /** @type {(inputs: Add_New_SkillInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`添加新技能`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Add New Skill" |
|
||||
*
|
||||
* @param {Add_New_SkillInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const add_new_skill = /** @type {((inputs?: Add_New_SkillInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Add_New_SkillInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_add_new_skill(inputs)
|
||||
return zh_add_new_skill(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Add option" |
|
||||
*
|
||||
* @param {Add_OptionInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const add_option: ((inputs?: Add_OptionInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Add_OptionInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Add_OptionInputs = {};
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Add_OptionInputs */
|
||||
|
||||
const en_add_option = /** @type {(inputs: Add_OptionInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Add option`)
|
||||
};
|
||||
|
||||
const zh_add_option = /** @type {(inputs: Add_OptionInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`添加选项`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Add option" |
|
||||
*
|
||||
* @param {Add_OptionInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const add_option = /** @type {((inputs?: Add_OptionInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Add_OptionInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_add_option(inputs)
|
||||
return zh_add_option(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Add Provider" |
|
||||
*
|
||||
* @param {Add_ProviderInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const add_provider: ((inputs?: Add_ProviderInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Add_ProviderInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Add_ProviderInputs = {};
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Add_ProviderInputs */
|
||||
|
||||
const en_add_provider = /** @type {(inputs: Add_ProviderInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Add Provider`)
|
||||
};
|
||||
|
||||
const zh_add_provider = /** @type {(inputs: Add_ProviderInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`添加提供商`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Add Provider" |
|
||||
*
|
||||
* @param {Add_ProviderInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const add_provider = /** @type {((inputs?: Add_ProviderInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Add_ProviderInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_add_provider(inputs)
|
||||
return zh_add_provider(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Add Skill" |
|
||||
*
|
||||
* @param {Add_SkillInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const add_skill: ((inputs?: Add_SkillInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Add_SkillInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Add_SkillInputs = {};
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Add_SkillInputs */
|
||||
|
||||
const en_add_skill = /** @type {(inputs: Add_SkillInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Add Skill`)
|
||||
};
|
||||
|
||||
const zh_add_skill = /** @type {(inputs: Add_SkillInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`添加技能`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Add Skill" |
|
||||
*
|
||||
* @param {Add_SkillInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const add_skill = /** @type {((inputs?: Add_SkillInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Add_SkillInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_add_skill(inputs)
|
||||
return zh_add_skill(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Add a skill via GitHub URL or upload a ZIP file to get started." |
|
||||
*
|
||||
* @param {Add_Skill_To_Get_StartedInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const add_skill_to_get_started: ((inputs?: Add_Skill_To_Get_StartedInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Add_Skill_To_Get_StartedInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Add_Skill_To_Get_StartedInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Add_Skill_To_Get_StartedInputs */
|
||||
|
||||
const en_add_skill_to_get_started = /** @type {(inputs: Add_Skill_To_Get_StartedInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Add a skill via GitHub URL or upload a ZIP file to get started.`)
|
||||
};
|
||||
|
||||
const zh_add_skill_to_get_started = /** @type {(inputs: Add_Skill_To_Get_StartedInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`通过 GitHub URL 添加技能或上传 ZIP 文件以开始使用。`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Add a skill via GitHub URL or upload a ZIP file to get started." |
|
||||
*
|
||||
* @param {Add_Skill_To_Get_StartedInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const add_skill_to_get_started = /** @type {((inputs?: Add_Skill_To_Get_StartedInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Add_Skill_To_Get_StartedInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_add_skill_to_get_started(inputs)
|
||||
return zh_add_skill_to_get_started(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Add Team Member to Project" |
|
||||
*
|
||||
* @param {Add_Team_Member_To_ProjectInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const add_team_member_to_project: ((inputs?: Add_Team_Member_To_ProjectInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Add_Team_Member_To_ProjectInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Add_Team_Member_To_ProjectInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Add_Team_Member_To_ProjectInputs */
|
||||
|
||||
const en_add_team_member_to_project = /** @type {(inputs: Add_Team_Member_To_ProjectInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Add Team Member to Project`)
|
||||
};
|
||||
|
||||
const zh_add_team_member_to_project = /** @type {(inputs: Add_Team_Member_To_ProjectInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`将团队成员添加到项目`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Add Team Member to Project" |
|
||||
*
|
||||
* @param {Add_Team_Member_To_ProjectInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const add_team_member_to_project = /** @type {((inputs?: Add_Team_Member_To_ProjectInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Add_Team_Member_To_ProjectInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_add_team_member_to_project(inputs)
|
||||
return zh_add_team_member_to_project(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Add to Share Links" |
|
||||
*
|
||||
* @param {Add_To_Share_LinksInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const add_to_share_links: ((inputs?: Add_To_Share_LinksInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Add_To_Share_LinksInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Add_To_Share_LinksInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Add_To_Share_LinksInputs */
|
||||
|
||||
const en_add_to_share_links = /** @type {(inputs: Add_To_Share_LinksInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Add to Share Links`)
|
||||
};
|
||||
|
||||
const zh_add_to_share_links = /** @type {(inputs: Add_To_Share_LinksInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`添加到分享链接`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Add to Share Links" |
|
||||
*
|
||||
* @param {Add_To_Share_LinksInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const add_to_share_links = /** @type {((inputs?: Add_To_Share_LinksInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Add_To_Share_LinksInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_add_to_share_links(inputs)
|
||||
return zh_add_to_share_links(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Add Variable" |
|
||||
*
|
||||
* @param {Add_VariableInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const add_variable: ((inputs?: Add_VariableInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Add_VariableInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Add_VariableInputs = {};
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Add_VariableInputs */
|
||||
|
||||
const en_add_variable = /** @type {(inputs: Add_VariableInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Add Variable`)
|
||||
};
|
||||
|
||||
const zh_add_variable = /** @type {(inputs: Add_VariableInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`添加变量`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Add Variable" |
|
||||
*
|
||||
* @param {Add_VariableInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const add_variable = /** @type {((inputs?: Add_VariableInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Add_VariableInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_add_variable(inputs)
|
||||
return zh_add_variable(inputs)
|
||||
});
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Added {name} successfully" |
|
||||
*
|
||||
* @param {Added_Member_SuccessfullyInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const added_member_successfully: ((inputs: Added_Member_SuccessfullyInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Added_Member_SuccessfullyInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Added_Member_SuccessfullyInputs = {
|
||||
name: NonNullable<unknown>;
|
||||
};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{ name: NonNullable<unknown> }} Added_Member_SuccessfullyInputs */
|
||||
|
||||
const en_added_member_successfully = /** @type {(inputs: Added_Member_SuccessfullyInputs) => LocalizedString} */ (i) => {
|
||||
return /** @type {LocalizedString} */ (`Added ${i?.name} successfully`)
|
||||
};
|
||||
|
||||
const zh_added_member_successfully = /** @type {(inputs: Added_Member_SuccessfullyInputs) => LocalizedString} */ (i) => {
|
||||
return /** @type {LocalizedString} */ (`已成功添加 ${i?.name}`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Added {name} successfully" |
|
||||
*
|
||||
* @param {Added_Member_SuccessfullyInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const added_member_successfully = /** @type {((inputs: Added_Member_SuccessfullyInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Added_Member_SuccessfullyInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_added_member_successfully(inputs)
|
||||
return zh_added_member_successfully(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Added to share link" |
|
||||
*
|
||||
* @param {Added_To_Share_LinkInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const added_to_share_link: ((inputs?: Added_To_Share_LinkInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Added_To_Share_LinkInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Added_To_Share_LinkInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Added_To_Share_LinkInputs */
|
||||
|
||||
const en_added_to_share_link = /** @type {(inputs: Added_To_Share_LinkInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Added to share link`)
|
||||
};
|
||||
|
||||
const zh_added_to_share_link = /** @type {(inputs: Added_To_Share_LinkInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`已添加到分享链接`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Added to share link" |
|
||||
*
|
||||
* @param {Added_To_Share_LinkInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const added_to_share_link = /** @type {((inputs?: Added_To_Share_LinkInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Added_To_Share_LinkInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_added_to_share_link(inputs)
|
||||
return zh_added_to_share_link(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Agent Avatar" |
|
||||
*
|
||||
* @param {Agent_AvatarInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const agent_avatar: ((inputs?: Agent_AvatarInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Agent_AvatarInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Agent_AvatarInputs = {};
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Agent_AvatarInputs */
|
||||
|
||||
const en_agent_avatar = /** @type {(inputs: Agent_AvatarInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Agent Avatar`)
|
||||
};
|
||||
|
||||
const zh_agent_avatar = /** @type {(inputs: Agent_AvatarInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`智能体头像`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Agent Avatar" |
|
||||
*
|
||||
* @param {Agent_AvatarInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const agent_avatar = /** @type {((inputs?: Agent_AvatarInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Agent_AvatarInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_agent_avatar(inputs)
|
||||
return zh_agent_avatar(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Agent created successfully" |
|
||||
*
|
||||
* @param {Agent_Created_SuccessfullyInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const agent_created_successfully: ((inputs?: Agent_Created_SuccessfullyInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Agent_Created_SuccessfullyInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Agent_Created_SuccessfullyInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Agent_Created_SuccessfullyInputs */
|
||||
|
||||
const en_agent_created_successfully = /** @type {(inputs: Agent_Created_SuccessfullyInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Agent created successfully`)
|
||||
};
|
||||
|
||||
const zh_agent_created_successfully = /** @type {(inputs: Agent_Created_SuccessfullyInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`智能体创建成功`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Agent created successfully" |
|
||||
*
|
||||
* @param {Agent_Created_SuccessfullyInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const agent_created_successfully = /** @type {((inputs?: Agent_Created_SuccessfullyInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Agent_Created_SuccessfullyInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_agent_created_successfully(inputs)
|
||||
return zh_agent_created_successfully(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Agent deleted successfully" |
|
||||
*
|
||||
* @param {Agent_Deleted_SuccessfullyInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const agent_deleted_successfully: ((inputs?: Agent_Deleted_SuccessfullyInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Agent_Deleted_SuccessfullyInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Agent_Deleted_SuccessfullyInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Agent_Deleted_SuccessfullyInputs */
|
||||
|
||||
const en_agent_deleted_successfully = /** @type {(inputs: Agent_Deleted_SuccessfullyInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Agent deleted successfully`)
|
||||
};
|
||||
|
||||
const zh_agent_deleted_successfully = /** @type {(inputs: Agent_Deleted_SuccessfullyInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`智能体删除成功`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Agent deleted successfully" |
|
||||
*
|
||||
* @param {Agent_Deleted_SuccessfullyInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const agent_deleted_successfully = /** @type {((inputs?: Agent_Deleted_SuccessfullyInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Agent_Deleted_SuccessfullyInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_agent_deleted_successfully(inputs)
|
||||
return zh_agent_deleted_successfully(inputs)
|
||||
});
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user