diff options
author | Maksim Zakharov <m.zakharov@IBS.RU> | 2022-10-03 10:06:25 +0300 |
---|---|---|
committer | Maksim Zakharov <m.zakharov@IBS.RU> | 2022-10-03 10:06:25 +0300 |
commit | 4b82c283c2e9ce4f3a6c2d684b755aa56e61b3fb (patch) | |
tree | fe2f95d3d5a79cd22231ca34024bcd5a905d6848 | |
parent | 8be836b8d2f9aaf4ad090aab44c26dee8b649447 (diff) | |
download | webui-vue-4b82c283c2e9ce4f3a6c2d684b755aa56e61b3fb.tar.xz |
fix validation, theme
-rw-r--r-- | src/App.vue | 5 | ||||
-rw-r--r-- | src/views/_sila/Settings/TransferInfo/Smtp.vue | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/App.vue b/src/App.vue index d2878946..107e9483 100644 --- a/src/App.vue +++ b/src/App.vue @@ -27,6 +27,11 @@ export default { }, created() { document.title = this.$route.meta.title || 'Page is missing title'; + const theme = localStorage.getItem('light-theme'); + if (theme === null) { + localStorage.setItem('user-theme', 'light-theme'); + document.documentElement.className = 'light-theme'; + } }, }; </script> diff --git a/src/views/_sila/Settings/TransferInfo/Smtp.vue b/src/views/_sila/Settings/TransferInfo/Smtp.vue index 40a182d8..bb3325d0 100644 --- a/src/views/_sila/Settings/TransferInfo/Smtp.vue +++ b/src/views/_sila/Settings/TransferInfo/Smtp.vue @@ -221,13 +221,13 @@ import IconTrashcan from '@carbon/icons-vue/es/trash-can/20'; import InputPasswordToggle from '@/components/_sila/Global/InputPasswordToggle'; import { helpers, - ipAddress, maxLength, minLength, required, requiredIf, } from 'vuelidate/lib/validators'; import VuelidateMixin from '@/components/_sila/Mixins/VuelidateMixin.js'; +import { isoNtpRegex } from '@/utilities/_sila/regexConstants'; import { isoPortRegex } from '@/utilities/_sila/regexConstants'; export default { @@ -319,7 +319,7 @@ export default { }, host: { required, - ipAddress, + pattern: helpers.regex('pattern', isoNtpRegex), }, port: { required, |