feat(files): API tokens in Settings, the Hub folder in Files, a notice before a token runs out

Settings gains an API tokens tab: a row per token (name and prefix; each
folder with its rights; last use and expiry, "expires soon" marked),
revoked from its menu behind a confirm. A new token is the Hub exchange in
one click, or folders and rights picked per folder (no Write where an
upload cannot land); expiry 30/90 days, 1 year or never (warned). The
token shows once in the same dialog, with Copy and a ready curl line.

The Hub folder closes the Sources in the Files rail, takes uploads and
moved-in files. A token about to run out warns its user once, a week
before (the Files GC's sixth pass); the notice opens the tokens tab.
This commit is contained in:
2026-10-14 23:33:34 +02:00
parent 4f58d15d3f
commit db56f25387
39 changed files with 1759 additions and 26 deletions
+51 -1
View File
@@ -5,7 +5,8 @@
"notifications": "Notifications",
"account": "Account",
"diagnostics": "Diagnostics",
"downloads": "Downloads"
"downloads": "Downloads",
"tokens": "API tokens"
},
"plexSync": {
"title": "Plex watch sync",
@@ -235,5 +236,54 @@
"downloads": {
"formats": "Download formats",
"formatsIntro": "The choices the download dialog offers. The built-in ones are fixed; duplicate one to make your own."
},
"tokens": {
"intro": "A token gives one machine a key to the folders you pick in your Files library — and to nothing else.",
"new": "New token",
"empty": "No tokens yet. Make one for your hub or for a script of yours.",
"rowMenu": "Token actions",
"expiring": "Expires soon",
"expired": "Expired",
"lastUsed": "Last used",
"neverUsed": "Never used",
"expiresOn": "Expires {{date}}",
"expiredOn": "Expired {{date}}",
"neverExpires": "Never expires",
"revoke": "Revoke…",
"revokeTitle": "Revoke “{{name}}”?",
"revokeBody": "The machine that uses it loses access at its next request. This is final: a new token has to be made in its place.",
"revokeAction": "Revoke",
"rights": {
"list": "List",
"read": "Read",
"write": "Write",
"delete": "Delete"
},
"newTitle": "New API token",
"kind": "Kind of token",
"hubTitle": "Hub exchange",
"hubText": "One shared Hub folder; the token may do anything in it.",
"hubName": "Hub exchange",
"customTitle": "Custom",
"customText": "You pick the folders and the rights.",
"name": "Name",
"folders": "Folders and rights",
"noFolders": "You have no folders yet.",
"expiry": "Expires",
"expiryOption": {
"30": "30 days",
"90": "90 days",
"365": "1 year",
"never": "Never"
},
"neverWarning": "A token that never expires opens its folders until you revoke it.",
"create": "Create",
"madeTitle": "Your token is ready",
"once": "This is the only time you see it: only its fingerprint is kept. If you lose it, make a new one.",
"token": "Token",
"tryIt": "Try it (curl)",
"copy": "Copy",
"copied": "Copied",
"done": "Done"
}
}