From 9fe81ee6f641fa6a7bbde879fbace7189f451865 Mon Sep 17 00:00:00 2001 From: Frank Stellmacher <171614930+Psychotoxical@users.noreply.github.com> Date: Sun, 26 Apr 2026 21:58:06 +0200 Subject: [PATCH] feat(login): add language picker on the login page (#328) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The language selector previously lived only in Settings, which is behind login. New users on a non-English system had no way to switch to their language before connecting to a server. Add a compact CustomSelect in the top-right of the login card. Reuses the existing settings.languageXx labels and i18n.changeLanguage flow (persists to localStorage as psysonic_language). English remains the default for first launches — already the case in i18n.ts:12. Styled to be visually quieter than the Settings variant (transparent background, smaller font) so it doesn't pull focus from the logo and form. Co-authored-by: Claude Opus 4.7 (1M context) --- src/pages/Login.tsx | 21 ++++++++++++++++++++- src/styles/components.css | 27 +++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/src/pages/Login.tsx b/src/pages/Login.tsx index 842f6b1c..0580fc11 100644 --- a/src/pages/Login.tsx +++ b/src/pages/Login.tsx @@ -1,9 +1,11 @@ import React, { useState, useEffect } from 'react'; import { useNavigate, useLocation } from 'react-router-dom'; -import { Wifi, WifiOff, Eye, EyeOff, Server } from 'lucide-react'; +import { Wifi, WifiOff, Eye, EyeOff, Server, Globe } from 'lucide-react'; import { useAuthStore } from '../store/authStore'; import { pingWithCredentials, scheduleInstantMixProbeForServer } from '../api/subsonic'; import { useTranslation } from 'react-i18next'; +import i18n from '../i18n'; +import CustomSelect from '../components/CustomSelect'; import { decodeServerMagicString, DECODED_PASSWORD_VISUAL_MASK, @@ -168,6 +170,23 @@ export default function Login() {