From 10cd38effb48a1f131fedc74f433180c78766d71 Mon Sep 17 00:00:00 2001
From: vicrodh <103399283+vicrodh@users.noreply.github.com>
Date: Fri, 16 Jan 2026 05:03:45 -0600
Subject: [PATCH] Improve folder settings modal UX
- Make modal larger (560px width, more padding)
- Add specific warnings when user override differs from detection:
- Warning when marked as network but not detected
- Danger when marked as local but detected as network
- Detect network status when modal opens for comparison
- Add i18n strings for override warnings (en/es)
---
src/lib/components/FolderSettingsModal.svelte | 41 +++++++++++++++++--
src/lib/i18n/locales/en.json | 2 +
src/lib/i18n/locales/es.json | 4 +-
3 files changed, 43 insertions(+), 4 deletions(-)
diff --git a/src/lib/components/FolderSettingsModal.svelte b/src/lib/components/FolderSettingsModal.svelte
index f3a948735..94bc02f05 100644
--- a/src/lib/components/FolderSettingsModal.svelte
+++ b/src/lib/components/FolderSettingsModal.svelte
@@ -38,6 +38,7 @@
let pathChanged = $state(false);
let enabled = $state(true);
let isNetwork = $state(false);
+ let detectedIsNetwork = $state(false); // What the system detected
let networkFsType = $state('');
let userOverrideNetwork = $state(false);
let loading = $state(false);
@@ -73,9 +74,21 @@
loading = false;
scanning = false;
checkAccessibility();
+ detectNetworkStatus();
}
});
+ // Detect if the current path is on a network mount
+ async function detectNetworkStatus() {
+ try {
+ const info = await invoke<{ isNetwork: boolean }>('check_network_path', { path: currentPath });
+ detectedIsNetwork = info.isNetwork;
+ } catch (err) {
+ console.error('Failed to detect network status:', err);
+ detectedIsNetwork = false;
+ }
+ }
+
async function checkAccessibility() {
if (!folder) return;
@@ -293,7 +306,21 @@
{$t('library.isNetworkFolder')}
- {#if userOverrideNetwork}
+ {#if userOverrideNetwork && isNetwork !== detectedIsNetwork}
+ {#if isNetwork && !detectedIsNetwork}
+
+
+
+ {$t('library.networkOverrideMarkedNetwork')}
+
+ {:else}
+
+
+
+ {$t('library.networkOverrideMarkedLocal')}
+
+ {/if}
+ {:else if userOverrideNetwork}
{$t('library.networkOverrideHint')}
@@ -362,7 +389,7 @@
.modal {
width: 100%;
- max-width: 480px;
+ max-width: 560px;
max-height: 90vh;
overflow: hidden;
display: flex;
@@ -402,7 +429,7 @@
}
.modal-body {
- padding: 24px;
+ padding: 28px 32px;
overflow-y: auto;
}
@@ -569,6 +596,14 @@
color: var(--text-warning, #f59e0b);
}
+ .override-hint.warning {
+ color: #f59e0b;
+ }
+
+ .override-hint.danger {
+ color: #ef4444;
+ }
+
.form-group.checkbox label {
display: flex;
align-items: center;
diff --git a/src/lib/i18n/locales/en.json b/src/lib/i18n/locales/en.json
index 5a65a5ca0..2407c575c 100644
--- a/src/lib/i18n/locales/en.json
+++ b/src/lib/i18n/locales/en.json
@@ -104,6 +104,8 @@
"isNetworkFolder": "Network Folder",
"networkFolderHint": "Detected automatically. Enable if this is a network location (NAS, shared drive, etc.)",
"networkOverrideHint": "You have manually changed this setting",
+ "networkOverrideMarkedNetwork": "Marked as network folder, but not detected as one. Content will be hidden in offline mode.",
+ "networkOverrideMarkedLocal": "Marked as local, but detected as network folder. May be unavailable in offline mode.",
"networkFsType": "Filesystem Type",
"networkFsTypeHint": "Usually detected automatically. Set manually if needed.",
"lastScanned": "Last scanned",
diff --git a/src/lib/i18n/locales/es.json b/src/lib/i18n/locales/es.json
index cbe68dded..31a76fd47 100644
--- a/src/lib/i18n/locales/es.json
+++ b/src/lib/i18n/locales/es.json
@@ -103,7 +103,9 @@
"folderEnabledHint": "Las carpetas deshabilitadas no se escanearán y su contenido no aparecerá en la biblioteca",
"isNetworkFolder": "Carpeta de Red",
"networkFolderHint": "Detectado automáticamente. Activa si es una ubicación de red (NAS, disco compartido, etc.)",
- "networkOverrideHint": "Has cambiado esta configuración manualmente",
+ "networkOverrideHint": "Has cambiado esta configuracion manualmente",
+ "networkOverrideMarkedNetwork": "Marcado como carpeta de red, pero no fue detectado como tal. El contenido se ocultara en modo offline.",
+ "networkOverrideMarkedLocal": "Marcado como local, pero detectado como carpeta de red. Puede no estar disponible en modo offline.",
"networkFsType": "Tipo de Sistema de Archivos",
"networkFsTypeHint": "Generalmente se detecta automáticamente. Configura manualmente si es necesario.",
"lastScanned": "Último escaneo",