Mount error & visual enhancements

Signed-off-by: FTCHD <144691102+FTCHD@users.noreply.github.com>
This commit is contained in:
FTCHD
2025-12-15 00:04:34 +07:00
parent 576fc11f2a
commit e21883a8d0
2 changed files with 17 additions and 6 deletions
+13 -6
View File
@@ -485,7 +485,9 @@ async function startupMounts() {
'[startupMounts] remote config mount point is not empty', '[startupMounts] remote config mount point is not empty',
remoteConfig.mountOnStart.mountPoint remoteConfig.mountOnStart.mountPoint
) )
continue throw new Error(
`Mount point for ${remote} is not empty, make sure ${remoteConfig.mountOnStart.mountPoint} is empty`
)
} }
const { const {
@@ -525,11 +527,16 @@ async function startupMounts() {
} catch (error) { } catch (error) {
console.error('Error mounting remote:', error) console.error('Error mounting remote:', error)
Sentry.captureException(error) Sentry.captureException(error)
await message(`Failed to mount ${remote} on startup.`, { await message(
title: 'Automount Error', error instanceof Error
kind: 'error', ? error.message
okLabel: 'Got it', : `Failed to mount ${remote} on startup.`,
}) {
title: 'Automount Error',
kind: 'error',
okLabel: 'Got it',
}
)
} }
} }
} }
+4
View File
@@ -309,6 +309,7 @@ export default function RemoteAutoMountDrawer({
/> />
<OptionsSection <OptionsSection
label="Mount Options"
optionsJson={mountOnStartMountOptionsJson} optionsJson={mountOnStartMountOptionsJson}
setOptionsJson={setMountOnStartMountOptionsJson} setOptionsJson={setMountOnStartMountOptionsJson}
globalOptions={globalFlags?.mount || {}} globalOptions={globalFlags?.mount || {}}
@@ -316,6 +317,7 @@ export default function RemoteAutoMountDrawer({
/> />
<OptionsSection <OptionsSection
label="VFS Options"
optionsJson={mountOnStartVfsOptionsJson} optionsJson={mountOnStartVfsOptionsJson}
setOptionsJson={setMountOnStartVfsOptionsJson} setOptionsJson={setMountOnStartVfsOptionsJson}
globalOptions={globalFlags?.vfs || {}} globalOptions={globalFlags?.vfs || {}}
@@ -323,6 +325,7 @@ export default function RemoteAutoMountDrawer({
/> />
<OptionsSection <OptionsSection
label="Config Options"
optionsJson={mountOnStartConfigOptionsJson} optionsJson={mountOnStartConfigOptionsJson}
setOptionsJson={setMountOnStartConfigOptionsJson} setOptionsJson={setMountOnStartConfigOptionsJson}
globalOptions={globalFlags?.main || {}} globalOptions={globalFlags?.main || {}}
@@ -330,6 +333,7 @@ export default function RemoteAutoMountDrawer({
/> />
<OptionsSection <OptionsSection
label="Filter Options"
optionsJson={mountOnStartFilterOptionsJson} optionsJson={mountOnStartFilterOptionsJson}
setOptionsJson={setMountOnStartFilterOptionsJson} setOptionsJson={setMountOnStartFilterOptionsJson}
globalOptions={globalFlags?.filter || {}} globalOptions={globalFlags?.filter || {}}