From f1957c7d91b27ac67acfdab1d84386cf699141c3 Mon Sep 17 00:00:00 2001
From: angel
Date: Sun, 25 Jan 2026 02:48:33 +0000
Subject: [PATCH] feat: add default theme option and fix toast z-index, add
error styling to start screen inputs
---
.env.local | 2 +-
.github/workflows/release.yml | 12 +++---
app/components/start-screen.tsx | 66 ++++++---------------------------
3 files changed, 18 insertions(+), 62 deletions(-)
diff --git a/.env.local b/.env.local
index f063de8..50e8ac4 100644
--- a/.env.local
+++ b/.env.local
@@ -1 +1 @@
-NEXT_PUBLIC_COMMIT_SHA=4721c05
+NEXT_PUBLIC_COMMIT_SHA=88c31c5
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index e345433..cad1ba6 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -82,9 +82,9 @@ jobs:
type=gha,mode=max,scope=deps-only
- # - name: Docker Hub Description
- # uses: peter-evans/dockerhub-description@v4
- # with:
- # username: ${{ vars.DOCKERHUB_USERNAME }}
- # password: ${{ secrets.DOCKERHUB_TOKEN }}
- # repository: sillyangel/mice
+ - name: Docker Hub Description
+ uses: peter-evans/dockerhub-description@v4
+ with:
+ username: sillyangel
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
+ repository: sillyangel/mice
diff --git a/app/components/start-screen.tsx b/app/components/start-screen.tsx
index 00ff390..979751b 100644
--- a/app/components/start-screen.tsx
+++ b/app/components/start-screen.tsx
@@ -36,6 +36,7 @@ export function LoginForm({
});
const [isTesting, setIsTesting] = useState(false);
+ const [hasError, setHasError] = useState(false);
// Settings for step 2
const [scrobblingEnabled, setScrobblingEnabled] = useState(() => {
@@ -45,21 +46,7 @@ export function LoginForm({
return true;
});
- // Sidebar shortcuts setting - default to 'playlists'
- const [sidebarShortcuts, setSidebarShortcuts] = useState(() => {
- if (typeof window !== 'undefined') {
- const saved = localStorage.getItem('sidebar-layout-settings');
- if (saved) {
- try {
- const parsed = JSON.parse(saved);
- return parsed.shortcuts || 'playlists';
- } catch (e) {
- return 'playlists';
- }
- }
- }
- return 'playlists';
- });
+ // New settings - removed sidebar and standalone lastfm options
// Check if Navidrome is configured via environment variables
const hasEnvConfig = React.useMemo(() => {
@@ -133,6 +120,7 @@ export function LoginForm({
e.preventDefault();
if (!formData.serverUrl || !formData.username || !formData.password) {
+ setHasError(true);
toast({
title: "Missing Information",
description: "Please fill in all fields before proceeding.",
@@ -142,6 +130,7 @@ export function LoginForm({
}
setIsTesting(true);
+ setHasError(false);
try {
// Strip trailing slash from server URL before testing
const cleanServerUrl = formData.serverUrl.replace(/\/+$/, '');
@@ -168,6 +157,7 @@ export function LoginForm({
// Move to settings step
setStep('settings');
} else {
+ setHasError(true);
toast({
title: "Connection Failed",
description: "Could not connect to the server. Please check your settings.",
@@ -175,6 +165,7 @@ export function LoginForm({
});
}
} catch (error) {
+ setHasError(true);
toast({
title: "Connection Error",
description: "An error occurred while testing the connection.",
@@ -189,23 +180,6 @@ export function LoginForm({
// Save all settings
localStorage.setItem('lastfm-scrobbling-enabled', scrobblingEnabled.toString());
- // Save sidebar settings with default items
- const defaultItems = [
- {"id":"home","label":"Home","visible":true,"icon":"home","href":"/"},
- {"id":"queue","label":"Queue","visible":true,"icon":"queue","href":"/queue"},
- {"id":"artists","label":"Artists","visible":true,"icon":"artists","href":"/library/artists"},
- {"id":"albums","label":"Albums","visible":true,"icon":"albums","href":"/library/albums"},
- {"id":"playlists","label":"Playlists","visible":true,"icon":"playlists","href":"/library/playlists"},
- {"id":"favorites","label":"Favorites","visible":true,"icon":"favorites","href":"/favorites"},
- {"id":"settings","label":"Settings","visible":true,"icon":"settings","href":"/settings"}
- ];
-
- localStorage.setItem('sidebar-layout-settings', JSON.stringify({
- items: defaultItems,
- shortcuts: sidebarShortcuts,
- showIcons: true
- }));
-
// Mark onboarding as complete
localStorage.setItem('onboarding-completed', '1.1.0');
@@ -286,11 +260,12 @@ export function LoginForm({
Theme
-
+
+ Default
Blue
Violet
Red
@@ -327,28 +302,6 @@ export function LoginForm({
- {/* Sidebar Shortcuts Selection */}
-
-
Sidebar Shortcuts
-
-
-
-
-
- Playlists Only
- Playlists + Artists
- None
-
-
-
- {sidebarShortcuts === 'playlists'
- ? "Show only playlist shortcuts in the sidebar"
- : sidebarShortcuts === 'both'
- ? "Show both playlist and artist shortcuts in the sidebar"
- : "Hide all shortcuts from the sidebar"}
-
-
-
@@ -402,6 +355,7 @@ export function LoginForm({
placeholder="https://your-navidrome-server.com"
value={formData.serverUrl}
onChange={(e) => handleInputChange('serverUrl', e.target.value)}
+ className={hasError ? "border-destructive focus-visible:ring-destructive" : ""}
required
/>
@@ -416,6 +370,7 @@ export function LoginForm({
placeholder="your-username"
value={formData.username}
onChange={(e) => handleInputChange('username', e.target.value)}
+ className={hasError ? "border-destructive focus-visible:ring-destructive" : ""}
required
/>
@@ -429,6 +384,7 @@ export function LoginForm({
type="password"
value={formData.password}
onChange={(e) => handleInputChange('password', e.target.value)}
+ className={hasError ? "border-destructive focus-visible:ring-destructive" : ""}
required
/>