From 786ad0ff82e32c7731a1046f2dd9599bc309d71a Mon Sep 17 00:00:00 2001 From: DecDuck Date: Fri, 1 Aug 2025 10:38:53 +1000 Subject: [PATCH 1/4] Translations update from Weblate (#107) * Translated using Weblate (English (Australia)) Currently translated at 1.6% (6 of 375 strings) Translation: Drop/Drop Translate-URL: http://translate.droposs.org/projects/drop/drop/en_AU/ * Translated using Weblate (English (en_PIRATE)) Currently translated at 99.4% (373 of 375 strings) Translation: Drop/Drop Translate-URL: http://translate.droposs.org/projects/drop/drop/en_PIRATE/ * Translated using Weblate (English (en_PIRATE)) Currently translated at 99.4% (373 of 375 strings) Translation: Drop/Drop Translate-URL: http://translate.droposs.org/projects/drop/drop/en_PIRATE/ * Translated using Weblate (English (en_PIRATE)) Currently translated at 100.0% (375 of 375 strings) Translation: Drop/Drop Translate-URL: http://translate.droposs.org/projects/drop/drop/en_PIRATE/ --------- Co-authored-by: Weblate Translation Memory --- i18n/locales/en_au.json | 18 ++++++++++++++++++ i18n/locales/en_pirate.json | 27 +++++++++++++++++++++++++-- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/i18n/locales/en_au.json b/i18n/locales/en_au.json index 27d8b005..4965c94d 100644 --- a/i18n/locales/en_au.json +++ b/i18n/locales/en_au.json @@ -1,5 +1,23 @@ { "setup": { "welcome": "G'day." + }, + "account": { + "devices": { + "subheader": "Manage the devices authorised to access your Drop account." + } + }, + "auth": { + "callback": { + "authClient": "Authorise client?", + "authorize": "Authorise", + "authorizedClient": "Drop has successfully authorised the client. You may now close this window." + } + }, + "library": { + "collection": { + "subheader": "Add a new collection to organise your games" + }, + "subheader": "Organise your games into collections for easy access, and access all your games." } } diff --git a/i18n/locales/en_pirate.json b/i18n/locales/en_pirate.json index 36001dec..e93be77d 100644 --- a/i18n/locales/en_pirate.json +++ b/i18n/locales/en_pirate.json @@ -109,6 +109,25 @@ "listItemPlaceholder": "list item, eh?" }, "errors": { + "admin": { + "user": { + "delete": { + "desc": "Couldn't make {0} walk the plank!", + "title": "Couldn't make 'em walk the plank" + } + } + }, + "auth": { + "disabled": "Ya' angered the Cap'n, give him a holler!", + "invalidInvite": "Boarding pass no longer valid, ya scallywag!", + "invalidPassState": "Cap'n's rolled snake eyes, see how he's doin'.", + "invalidUserOrPass": "Are ya lying to me about your username and password, ya dog?", + "inviteIdRequired": "Ya need to include the ID for your boarding pass, matey!", + "method": { + "signinDisabled": "No entrance through these parts, arr!" + }, + "usernameTaken": "We already have a scallywag with that 'ere name of yours." + }, "backHome": "{arrow} Back to yer safe harbor", "game": { "banner": { @@ -203,7 +222,8 @@ "discord": "Discord, argh!", "github": "GitHub, savvy?" }, - "topSellers": "Top Plunderers" + "topSellers": "Top Plunderers", + "version": "Drop {version} {gitRef}" }, "header": { "admin": { @@ -401,7 +421,8 @@ "cleanupSessionsDescription": "Cleans up expired sessions to save space and keep ye safe, ye dog!", "cleanupSessionsName": "Clean up sessions." }, - "viewTask": "View {arrow}" + "viewTask": "View {arrow}", + "weeklyScheduledTitle": "Weekly chores" } }, "title": "Drop", @@ -439,6 +460,8 @@ "title": "Passage" }, "authoptionsHeader": "Passage Options", + "delete": "Scuttle!", + "deleteUser": "Make {0} walk the plank!", "description": "Manage the crew on yer Drop vessel, and set yer passage methods, savvy?", "displayNameHeader": "Scallywag Name", "emailHeader": "Salty Mail", From b72e1ef7a45ea16bee1da6271daae70966fcc522 Mon Sep 17 00:00:00 2001 From: DecDuck Date: Fri, 1 Aug 2025 13:11:56 +1000 Subject: [PATCH 2/4] Code-based authorization for Drop clients (#145) * feat: code-based authorization * fix: final touches * fix: require session on code fetch endpoint * feat: better error handling * refactor: move auth send to client handler * fix: lint --- assets/tailwindcss.css | 9 ++ components/UserHeader/UserWidget.vue | 5 + i18n/locales/en_us.json | 4 + .../{[id]/callback.vue => authorize/[id].vue} | 79 ++++++---- pages/client/code/index.vue | 135 ++++++++++++++++++ .../api/v1/client/auth/callback/index.post.ts | 10 +- server/api/v1/client/auth/code/index.get.ts | 21 +++ server/api/v1/client/auth/code/index.post.ts | 35 +++++ server/api/v1/client/auth/code/ws.get.ts | 25 ++++ .../client/auth/{callback => }/index.get.ts | 12 +- server/api/v1/client/auth/initiate.post.ts | 33 ++--- server/internal/clients/handler.ts | 77 +++++++++- server/internal/tasks/index.ts | 1 + 13 files changed, 395 insertions(+), 51 deletions(-) rename pages/client/{[id]/callback.vue => authorize/[id].vue} (78%) create mode 100644 pages/client/code/index.vue create mode 100644 server/api/v1/client/auth/code/index.get.ts create mode 100644 server/api/v1/client/auth/code/index.post.ts create mode 100644 server/api/v1/client/auth/code/ws.get.ts rename server/api/v1/client/auth/{callback => }/index.get.ts (71%) diff --git a/assets/tailwindcss.css b/assets/tailwindcss.css index 5c2596be..97cf5d42 100644 --- a/assets/tailwindcss.css +++ b/assets/tailwindcss.css @@ -2,3 +2,12 @@ @plugin "@tailwindcss/typography"; @plugin "@tailwindcss/forms"; @config "../tailwind.config.js"; + +@layer base { + input[type="number"]::-webkit-outer-spin-button, + input[type="number"]::-webkit-inner-spin-button, + input[type="number"] { + -webkit-appearance: none; + -moz-appearance: textfield !important; + } +} diff --git a/components/UserHeader/UserWidget.vue b/components/UserHeader/UserWidget.vue index 35e238d9..cf75bba5 100644 --- a/components/UserHeader/UserWidget.vue +++ b/components/UserHeader/UserWidget.vue @@ -100,6 +100,11 @@ const navigation = computed(() => route: "/account", prefix: "", }, + { + label: "Authorize client", + route: "/client/code", + prefix: "", + }, ].filter((e) => e !== undefined), ); diff --git a/i18n/locales/en_us.json b/i18n/locales/en_us.json index 58e16c9a..84097d88 100644 --- a/i18n/locales/en_us.json +++ b/i18n/locales/en_us.json @@ -38,6 +38,10 @@ "requestedAccess": "\"{name}\" has requested access to your Drop account.", "success": "Successful!" }, + "code": { + "title": "Connect your Drop client", + "description": "Use a code to connect your Drop client if you are unable to open a web browser on your device." + }, "confirmPassword": "Confirm @:auth.password", "displayName": "Display Name", "email": "Email", diff --git a/pages/client/[id]/callback.vue b/pages/client/authorize/[id].vue similarity index 78% rename from pages/client/[id]/callback.vue rename to pages/client/authorize/[id].vue index 71277b83..a3d2a9d1 100644 --- a/pages/client/[id]/callback.vue +++ b/pages/client/authorize/[id].vue @@ -1,7 +1,7 @@