fix: settings order now matches web — Theme → Bibliothek → ABS → Discover APIs → Navidrome
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
a0d3c7a592
commit
613d5156fa
1 file changed
+47
-47
@@ -83,39 +83,29 @@ fun SettingsScreen() {
|
|||||||
// ── Save button (TOP) ────────────────────────────────────────────────
|
// ── Save button (TOP) ────────────────────────────────────────────────
|
||||||
SaveButton(vm, state.isSaving, state.savedOk, state.error)
|
SaveButton(vm, state.isSaving, state.savedOk, state.error)
|
||||||
|
|
||||||
// ── 🌐 Navidrome Server ──────────────────────────────────────────────
|
// ── 🎨 Theme ─────────────────────────────────────────────────────────
|
||||||
SectionHeader("🌐 Navidrome Server")
|
SectionHeader("🎨 Theme")
|
||||||
|
ThemePicker(currentThemeId = state.theme, onSelect = { id -> vm.onTheme(id); applyNsTheme(id) })
|
||||||
NsTextField(
|
|
||||||
value = state.serverUrl, onValueChange = vm::onServerUrl,
|
|
||||||
label = "Server URL", placeholder = "https://musik.beispiel.de",
|
|
||||||
keyboardType = KeyboardType.Uri,
|
|
||||||
)
|
|
||||||
NsTextField(
|
|
||||||
value = state.username, onValueChange = vm::onUsername,
|
|
||||||
label = "Benutzername",
|
|
||||||
)
|
|
||||||
NsTextField(
|
|
||||||
value = state.password, onValueChange = vm::onPassword,
|
|
||||||
label = "Passwort",
|
|
||||||
hint = "(unverändert lassen wenn kein Reset gewünscht)",
|
|
||||||
visualTransformation = if (showPassword) VisualTransformation.None else PasswordVisualTransformation(),
|
|
||||||
keyboardType = KeyboardType.Password,
|
|
||||||
trailingIcon = {
|
|
||||||
IconButton(onClick = { showPassword = !showPassword }) {
|
|
||||||
Icon(
|
|
||||||
if (showPassword) Icons.Default.VisibilityOff else Icons.Default.Visibility,
|
|
||||||
contentDescription = null, tint = NsOnSurface2,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
)
|
|
||||||
|
|
||||||
Spacer(Modifier.height(4.dp))
|
Spacer(Modifier.height(4.dp))
|
||||||
|
|
||||||
// ── 📊 Bibliothek ────────────────────────────────────────────────────
|
// ── 📊 Bibliothek ────────────────────────────────────────────────────
|
||||||
SectionHeader("📊 Bibliothek")
|
SectionHeader("📊 Bibliothek")
|
||||||
|
|
||||||
|
Row(verticalAlignment = Alignment.CenterVertically, modifier = Modifier.fillMaxWidth().padding(vertical = 4.dp)) {
|
||||||
|
Column(Modifier.weight(1f)) {
|
||||||
|
Text("Abspielhäufigkeit anzeigen", fontFamily = Outfit, fontWeight = FontWeight.Medium, fontSize = 14.sp, color = NsOnSurface)
|
||||||
|
Text("Zeigt Wiedergabezähler in Song-Reihen an", fontFamily = Outfit, fontSize = 12.sp, color = NsOnSurface2)
|
||||||
|
}
|
||||||
|
Switch(
|
||||||
|
checked = state.showPlayCount, onCheckedChange = vm::onShowPlayCount,
|
||||||
|
colors = SwitchDefaults.colors(
|
||||||
|
checkedThumbColor = NsBackground, checkedTrackColor = NsAccent,
|
||||||
|
uncheckedThumbColor = NsOnSurface2,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
ExposedDropdownMenuBox(expanded = scrobbleExpanded, onExpandedChange = { scrobbleExpanded = it }) {
|
ExposedDropdownMenuBox(expanded = scrobbleExpanded, onExpandedChange = { scrobbleExpanded = it }) {
|
||||||
OutlinedTextField(
|
OutlinedTextField(
|
||||||
value = SCROBBLE_OPTIONS.firstOrNull { it.first == state.scrobbleMode }?.second ?: "30 Sekunden",
|
value = SCROBBLE_OPTIONS.firstOrNull { it.first == state.scrobbleMode }?.second ?: "30 Sekunden",
|
||||||
@@ -136,26 +126,6 @@ fun SettingsScreen() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Row(verticalAlignment = Alignment.CenterVertically, modifier = Modifier.fillMaxWidth().padding(vertical = 4.dp)) {
|
|
||||||
Column(Modifier.weight(1f)) {
|
|
||||||
Text("Abspielhäufigkeit anzeigen", fontFamily = Outfit, fontWeight = FontWeight.Medium, fontSize = 14.sp, color = NsOnSurface)
|
|
||||||
Text("Zeigt Wiedergabezähler in Song-Reihen an", fontFamily = Outfit, fontSize = 12.sp, color = NsOnSurface2)
|
|
||||||
}
|
|
||||||
Switch(
|
|
||||||
checked = state.showPlayCount, onCheckedChange = vm::onShowPlayCount,
|
|
||||||
colors = SwitchDefaults.colors(
|
|
||||||
checkedThumbColor = NsBackground, checkedTrackColor = NsAccent,
|
|
||||||
uncheckedThumbColor = NsOnSurface2,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
Spacer(Modifier.height(4.dp))
|
|
||||||
|
|
||||||
// ── 🎨 Theme ─────────────────────────────────────────────────────────
|
|
||||||
SectionHeader("🎨 Theme")
|
|
||||||
ThemePicker(currentThemeId = state.theme, onSelect = { id -> vm.onTheme(id); applyNsTheme(id) })
|
|
||||||
|
|
||||||
Spacer(Modifier.height(4.dp))
|
Spacer(Modifier.height(4.dp))
|
||||||
|
|
||||||
// ── 📚 Audiobookshelf ────────────────────────────────────────────────
|
// ── 📚 Audiobookshelf ────────────────────────────────────────────────
|
||||||
@@ -201,6 +171,36 @@ fun SettingsScreen() {
|
|||||||
)
|
)
|
||||||
ConnStatusRow(status = state.backendStatus, label = "Nicht konfiguriert", onTest = vm::testBackend)
|
ConnStatusRow(status = state.backendStatus, label = "Nicht konfiguriert", onTest = vm::testBackend)
|
||||||
|
|
||||||
|
Spacer(Modifier.height(4.dp))
|
||||||
|
|
||||||
|
// ── 🌐 Navidrome Server ──────────────────────────────────────────────
|
||||||
|
SectionHeader("🌐 Navidrome Server")
|
||||||
|
|
||||||
|
NsTextField(
|
||||||
|
value = state.serverUrl, onValueChange = vm::onServerUrl,
|
||||||
|
label = "Server URL", placeholder = "https://musik.beispiel.de",
|
||||||
|
keyboardType = KeyboardType.Uri,
|
||||||
|
)
|
||||||
|
NsTextField(
|
||||||
|
value = state.username, onValueChange = vm::onUsername,
|
||||||
|
label = "Benutzername",
|
||||||
|
)
|
||||||
|
NsTextField(
|
||||||
|
value = state.password, onValueChange = vm::onPassword,
|
||||||
|
label = "Passwort",
|
||||||
|
hint = "(unverändert lassen wenn kein Reset gewünscht)",
|
||||||
|
visualTransformation = if (showPassword) VisualTransformation.None else PasswordVisualTransformation(),
|
||||||
|
keyboardType = KeyboardType.Password,
|
||||||
|
trailingIcon = {
|
||||||
|
IconButton(onClick = { showPassword = !showPassword }) {
|
||||||
|
Icon(
|
||||||
|
if (showPassword) Icons.Default.VisibilityOff else Icons.Default.Visibility,
|
||||||
|
contentDescription = null, tint = NsOnSurface2,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
Spacer(Modifier.height(8.dp))
|
Spacer(Modifier.height(8.dp))
|
||||||
|
|
||||||
// ── Save button (BOTTOM) ─────────────────────────────────────────────
|
// ── Save button (BOTTOM) ─────────────────────────────────────────────
|
||||||
|
|||||||
Reference in new issue
Block a user