diff options
author | Surya Venkatesan <suryav@ami.com> | 2024-09-23 08:30:39 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2024-10-03 21:34:06 +0300 |
commit | f1ccca3ff6f879e7867c36bcc40e20998dbc9850 (patch) | |
tree | 8754adde08f3132c485df87c95b2c219f90e53c3 | |
parent | 4b89b043f9ce759ef4d21eca7ceb4150c18aa465 (diff) | |
download | webui-vue-f1ccca3ff6f879e7867c36bcc40e20998dbc9850.tar.xz |
Factory reset modal popup and validation issue
In vue3 i18n is not return the object value from the locale, so
unable to do the for loop in Setting list. Remove the for loop and
implement the separate list for reset bios and reset to default.
And implement the useVuelidate in the factory reset page.
Change-Id: I10833742475b90f7c5349a5b995ff04e93c306de
Signed-off-by: Surya Venkatesan <suryav@ami.com>
-rw-r--r-- | src/views/Operations/FactoryReset/FactoryResetModal.vue | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/src/views/Operations/FactoryReset/FactoryResetModal.vue b/src/views/Operations/FactoryReset/FactoryResetModal.vue index 8784d4ae..823e6dcc 100644 --- a/src/views/Operations/FactoryReset/FactoryResetModal.vue +++ b/src/views/Operations/FactoryReset/FactoryResetModal.vue @@ -9,15 +9,26 @@ <p class="mb-2"> <strong>{{ $t(`pageFactoryReset.modal.${resetType}Header`) }}</strong> </p> - <ul class="pl-3 mb-4"> - <li - v-for="(item, index) in $t( - `pageFactoryReset.modal.${resetType}SettingsList`, - )" - :key="index" - class="mt-1 mb-1" - > - {{ $t(item) }} + <ul v-if="resetType == 'resetBios'" class="pl-3 mb-4"> + <li class="mt-1 mb-1"> + {{ $t('pageFactoryReset.modal.resetBiosSettingsList.item1') }} + </li> + <li class="mt-1 mb-1"> + {{ $t('pageFactoryReset.modal.resetBiosSettingsList.item2') }} + </li> + </ul> + <ul v-else-if="resetType == 'resetToDefaults'" class="pl-3 mb-4"> + <li class="mt-1 mb-1"> + {{ $t('pageFactoryReset.modal.resetToDefaultsSettingsList.item1') }} + </li> + <li class="mt-1 mb-1"> + {{ $t('pageFactoryReset.modal.resetToDefaultsSettingsList.item2') }} + </li> + <li class="mt-1 mb-1"> + {{ $t('pageFactoryReset.modal.resetToDefaultsSettingsList.item3') }} + </li> + <li class="mt-1 mb-1"> + {{ $t('pageFactoryReset.modal.resetToDefaultsSettingsList.item4') }} </li> </ul> @@ -66,6 +77,7 @@ <script> import StatusIcon from '@/components/Global/StatusIcon'; import VuelidateMixin from '@/components/Mixins/VuelidateMixin'; +import { useVuelidate } from '@vuelidate/core'; import { useI18n } from 'vue-i18n'; export default { @@ -77,6 +89,11 @@ export default { default: null, }, }, + setup() { + return { + v$: useVuelidate(), + }; + }, data() { return { $t: useI18n().t, |