mirror of
https://github.com/rommapp/romm.git
synced 2026-12-04 21:02:21 +01:00
fix: show config parse error and writable warnings independently
A mounted config file can be both malformed and not writable at once. The v-else-if chain hid the not-writable warning when a parse error was present, even though edit controls stay disabled. Show both alerts independently when the file is mounted. Generated-By: PostHog Code Task-Id: 3d4f28a8-5157-4ca4-97a6-f283f5d6329e
This commit is contained in:
@@ -83,7 +83,10 @@ const tabModel = computed<string>({
|
||||
</template>
|
||||
{{ t("settings.config-file-not-mounted-desc") }}
|
||||
</RAlert>
|
||||
<RAlert v-else-if="config.CONFIG_FILE_PARSE_ERROR" type="error">
|
||||
<RAlert
|
||||
v-if="config.CONFIG_FILE_MOUNTED && config.CONFIG_FILE_PARSE_ERROR"
|
||||
type="error"
|
||||
>
|
||||
<template #title>
|
||||
{{ t("settings.config-file-parse-error-title") }}
|
||||
</template>
|
||||
@@ -93,7 +96,10 @@ const tabModel = computed<string>({
|
||||
})
|
||||
}}
|
||||
</RAlert>
|
||||
<RAlert v-else-if="!config.CONFIG_FILE_WRITABLE" type="warning">
|
||||
<RAlert
|
||||
v-if="config.CONFIG_FILE_MOUNTED && !config.CONFIG_FILE_WRITABLE"
|
||||
type="warning"
|
||||
>
|
||||
<template #title>
|
||||
{{ t("settings.config-file-not-writable-title") }}
|
||||
</template>
|
||||
|
||||
@@ -85,7 +85,7 @@ watch(
|
||||
</template>
|
||||
</v-alert>
|
||||
<v-alert
|
||||
v-else-if="config.CONFIG_FILE_PARSE_ERROR"
|
||||
v-if="config.CONFIG_FILE_MOUNTED && config.CONFIG_FILE_PARSE_ERROR"
|
||||
type="error"
|
||||
variant="tonal"
|
||||
class="my-2"
|
||||
@@ -102,7 +102,7 @@ watch(
|
||||
</template>
|
||||
</v-alert>
|
||||
<v-alert
|
||||
v-else-if="!config.CONFIG_FILE_WRITABLE"
|
||||
v-if="config.CONFIG_FILE_MOUNTED && !config.CONFIG_FILE_WRITABLE"
|
||||
type="warning"
|
||||
variant="tonal"
|
||||
class="my-2"
|
||||
|
||||
Reference in New Issue
Block a user