From 6f028961c0a2b02c543327f266ee1f7af05a052e Mon Sep 17 00:00:00 2001
From: Axolotle
Date: Wed, 16 Dec 2020 12:16:43 +0100
Subject: [PATCH] update views using skeletons and component helpers
---
.../components/reusableForms/DomainForm.vue | 11 +-
.../components/reusableForms/PasswordForm.vue | 11 +-
app/src/i18n/locales/en.json | 6 +
app/src/views/ErrorPage.vue | 8 +-
app/src/views/Home.vue | 22 +-
app/src/views/Login.vue | 9 +-
app/src/views/PostInstall.vue | 23 +-
app/src/views/app/AppActions.vue | 45 +--
app/src/views/app/AppCatalog.vue | 329 +++++++++---------
app/src/views/app/AppConfigPanel.vue | 41 +--
app/src/views/app/AppInfo.vue | 242 ++++++-------
app/src/views/app/AppInstall.vue | 84 ++---
app/src/views/app/AppList.vue | 73 ++--
app/src/views/backup/Backup.vue | 10 +-
app/src/views/backup/BackupCreate.vue | 179 +++++-----
app/src/views/backup/BackupInfo.vue | 317 ++++++++---------
app/src/views/backup/BackupList.vue | 40 +--
app/src/views/diagnosis/Diagnosis.vue | 311 +++++++++--------
app/src/views/domain/DomainAdd.vue | 17 +-
app/src/views/domain/DomainCert.vue | 199 +++++------
app/src/views/domain/DomainDns.vue | 41 +--
app/src/views/domain/DomainInfo.vue | 85 ++---
app/src/views/domain/DomainList.vue | 24 +-
app/src/views/group/GroupCreate.vue | 12 +-
app/src/views/group/GroupList.vue | 323 ++++++++---------
app/src/views/service/ServiceInfo.vue | 221 ++++++------
app/src/views/service/ServiceList.vue | 51 ++-
app/src/views/tool/ToolAdminpw.vue | 14 +-
app/src/views/tool/ToolFirewall.vue | 271 +++++++--------
app/src/views/tool/ToolList.vue | 41 +--
app/src/views/tool/ToolLog.vue | 122 +++----
app/src/views/tool/ToolLogs.vue | 68 ++--
app/src/views/tool/ToolMigrations.vue | 143 ++++----
app/src/views/tool/ToolPower.vue | 50 +--
app/src/views/tool/ToolWebadmin.vue | 9 +-
app/src/views/update/SystemUpdate.vue | 121 +++----
app/src/views/user/UserCreate.vue | 125 +++----
app/src/views/user/UserEdit.vue | 247 +++++++------
app/src/views/user/UserInfo.vue | 184 ++++------
app/src/views/user/UserList.vue | 17 +-
40 files changed, 1843 insertions(+), 2303 deletions(-)
diff --git a/app/src/components/reusableForms/DomainForm.vue b/app/src/components/reusableForms/DomainForm.vue
index 89fa8afd..8c96f5f6 100644
--- a/app/src/components/reusableForms/DomainForm.vue
+++ b/app/src/components/reusableForms/DomainForm.vue
@@ -51,11 +51,9 @@ import { mapGetters } from 'vuex'
import { validationMixin } from 'vuelidate'
import AdressInputSelect from '@/components/AdressInputSelect'
-
import { formatFormDataValue } from '@/helpers/yunohostArguments'
import { required, domain, dynDomain } from '@/helpers/validators'
-
export default {
name: 'DomainForm',
@@ -139,12 +137,9 @@ export default {
},
created () {
- if (this.noStore) return
- this.$store.dispatch('FETCH', { uri: 'domains' }).then(() => {
- if (this.dynDnsForbiden) {
- this.selected = 'domain'
- }
- })
+ if (this.dynDnsForbiden) {
+ this.selected = 'domain'
+ }
},
mixins: [validationMixin],
diff --git a/app/src/components/reusableForms/PasswordForm.vue b/app/src/components/reusableForms/PasswordForm.vue
index fc9d060b..89ded3af 100644
--- a/app/src/components/reusableForms/PasswordForm.vue
+++ b/app/src/components/reusableForms/PasswordForm.vue
@@ -5,14 +5,19 @@
@submit.prevent="onSubmit"
>
-
+
{{ $t('good_practices_about_admin_password') }}
-
+
-
+
+
+
diff --git a/app/src/i18n/locales/en.json b/app/src/i18n/locales/en.json
index 7429c1bc..8728acf3 100644
--- a/app/src/i18n/locales/en.json
+++ b/app/src/i18n/locales/en.json
@@ -65,6 +65,7 @@
"backups_no": "No backup",
"begin": "Begin",
"both": "Both",
+ "cancel": "Cancel",
"catalog": "Catalog",
"check": "Check",
"close": "Close",
@@ -115,6 +116,7 @@
"diagnosis_explanation": "The diagnosis feature will attempt to identify common issues on the different aspects of your server to make sure everything runs smoothly. The diagnosis runs automatically twice a day and an email is sent to the administrator if issues are found. Note that some tests may not be relevant if you do not want to use some specific features (for example XMPP) or may fail if you have a complex setup. In such cases, and if you know what you are doing, it is alright to ignore the corresponding issues or warnings.",
"run_first_diagnosis": "Run initial diagnosis",
"disable": "Disable",
+ "disabled": "Disabled",
"dns": "DNS",
"domain_add": "Add domain",
"domain_add_dns_doc": "… and I have set my DNS correctly.",
@@ -124,6 +126,7 @@
"domain_default_desc": "The default domain is the connection domain where users log in.",
"domain_default_longdesc": "This is your default domain.",
"domain_delete_longdesc": "Delete this domain",
+ "domain_delete_forbidden_desc": "You cannot remove '{domain}' since it's the default domain, you need to choose another domain (or add a new one) and set it as the default domain to be able to remove this one.",
"domain_dns_config": "DNS configuration",
"domain_dns_longdesc": "View DNS configuration",
"domain_name": "Domain name",
@@ -132,6 +135,7 @@
"domains": "Domains",
"download": "Download",
"enable": "Enable",
+ "enabled": "Enabled",
"error": "Error",
"error_modify_something": "You should modify something",
"error_server_unexpected": "Unexpected server error",
@@ -149,6 +153,7 @@
"form_errors": {
"alpha": "Value must be alphabetical characters only.",
"alphalownum_": "Value must be lower-case alphanumeric and underscore characters only.",
+ "between": "Value must be between {min} and {max}.",
"domain": "Invalid domain name: Must be lower-case alphanumeric, dot and dash characters only",
"dynDomain": "Invalid domain name: Must be lower-case alphanumeric and dash characters only",
"email": "Invalid email: must be alphanumeric and _.-
characters only (e.g. someone@example.com, s0me-1@example.com)",
@@ -370,6 +375,7 @@
"unauthorized": "Unauthorized",
"unignore": "Unignore",
"uninstall": "Uninstall",
+ "unknown": "Unknown",
"unmaintained": "Unmaintained",
"unmaintained_details": "This app has not been update for quite a while and the previous maintainer has gone away or does not have time to maintain this app. Feel free to check the app repository to provide your help",
"upnp": "UPnP",
diff --git a/app/src/views/ErrorPage.vue b/app/src/views/ErrorPage.vue
index 40a0f1c0..0dad5b12 100644
--- a/app/src/views/ErrorPage.vue
+++ b/app/src/views/ErrorPage.vue
@@ -4,10 +4,10 @@
-
+
{{ $t('api_error.info') }}
-
+
"{{ error.code }}" {{ error.status }}
@@ -36,7 +36,3 @@ export default {
// FIXME add redirect if they're no error (if reload or route entered by hand)
}
-
-
diff --git a/app/src/views/Home.vue b/app/src/views/Home.vue
index 840c97bd..81855609 100644
--- a/app/src/views/Home.vue
+++ b/app/src/views/Home.vue
@@ -3,8 +3,8 @@