From d7ef98e68ba689490d4338a07f476e8c5effe534 Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Wed, 24 Feb 2021 00:35:31 +0300 Subject: [PATCH] Add form for installing new frontend --- src/lang/en.js | 6 ++- src/views/settings/components/Frontend.vue | 54 +++++++++++++++++++++- src/views/settings/styles/main.scss | 14 ++++++ 3 files changed, 71 insertions(+), 3 deletions(-) diff --git a/src/lang/en.js b/src/lang/en.js index 60d48a83..f193abaf 100644 --- a/src/lang/en.js +++ b/src/lang/en.js @@ -469,7 +469,11 @@ export default { setLimits: 'Set different limits for unauthenticated and authenticated users', unauthenticatedUsers: 'Unauthenticated users', authenticatedUsers: 'Authenticated users', - setLimitsForAll: 'Set limit for all users' + setLimitsForAll: 'Set limit for all users', + ref: 'Ref', + file: 'File', + buildUrl: 'Build URL', + buildDir: 'Build Directory' }, invites: { diff --git a/src/views/settings/components/Frontend.vue b/src/views/settings/components/Frontend.vue index 50cc4719..26f1e2f0 100644 --- a/src/views/settings/components/Frontend.vue +++ b/src/views/settings/components/Frontend.vue @@ -1,6 +1,6 @@ +
+ + {{ $t('settings.installAnotherFrontend') }} +
+ + + + + + + + + + + + + + + + + + {{ $t('settings.install') }} + + + @@ -71,7 +100,7 @@
- Submit + {{ $t('settings.submit') }}
@@ -85,6 +114,18 @@ import _ from 'lodash' export default { name: 'Frontend', components: { Setting }, + data() { + return { + frontendInputOpen: false, + frontendFormData: { + name: '', + ref: '', + file: '', + buildUrl: '', + buildDir: '' + } + } + }, computed: { ...mapGetters([ 'settings' @@ -122,6 +163,9 @@ export default { frontendsData() { return _.get(this.settings.settings, [':pleroma', ':frontends']) || {} }, + isDesktop() { + return this.$store.state.app.device === 'desktop' + }, isMobile() { return this.$store.state.app.device === 'mobile' }, @@ -171,6 +215,9 @@ export default { methods: { installFrontend({ name }) { this.$store.dispatch('InstallFrontend', { name }) + }, + installNewFrontend() { + }, async onSubmit() { try { @@ -182,6 +229,9 @@ export default { type: 'success', message: i18n.t('settings.success') }) + }, + toggleFrontendInput() { + this.frontendInputOpen = !this.frontendInputOpen } } } diff --git a/src/views/settings/styles/main.scss b/src/views/settings/styles/main.scss index 48c7973a..e85113be 100644 --- a/src/views/settings/styles/main.scss +++ b/src/views/settings/styles/main.scss @@ -75,6 +75,16 @@ .form-container { margin-bottom: 80px; } + .frontend-container { + margin-right: 30px; + } + .frontend-form-input { + margin-top: 15px; + } + .frontends-button-container { + width: 100%; + margin-top: 15px; + } .frontends-table { width: 100%; margin-right: 30px; @@ -130,6 +140,10 @@ width: 100%; } } + .install-frontend-button { + margin-top: 15px; + float: right; + } .keyword-container { width: 100% }