From 454632d785cbf031f54a9dc63a20af0d92302e0d Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 20 Dec 2018 04:08:13 +0900 Subject: Resolve #3687 --- src/client/app/admin/views/instance.vue | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'src/client/app/admin') diff --git a/src/client/app/admin/views/instance.vue b/src/client/app/admin/views/instance.vue index b34aa03e3a..5a29da0345 100644 --- a/src/client/app/admin/views/instance.vue +++ b/src/client/app/admin/views/instance.vue @@ -57,6 +57,15 @@ {{ $t('smtp-secure') }}{{ $t('smtp-secure-info') }} +
+
{{ $t('serviceworker-config') }}
+ {{ $t('enable-serviceworker') }}{{ $t('serviceworker-info') }} + {{ $t('vapid-info') }}
npm i web-push -g
web-push generate-vapid-keys
+ + {{ $t('vapid-publickey') }} + {{ $t('vapid-privatekey') }} + +
summaly Proxy
URL @@ -126,7 +135,7 @@ import Vue from 'vue'; import i18n from '../../i18n'; import { url, host } from '../../config'; import { toUnicode } from 'punycode'; -import { faHeadset, faShieldAlt, faGhost, faUserPlus } from '@fortawesome/free-solid-svg-icons'; +import { faHeadset, faShieldAlt, faGhost, faUserPlus, faBolt } from '@fortawesome/free-solid-svg-icons'; import { faEnvelope as farEnvelope } from '@fortawesome/free-regular-svg-icons'; export default Vue.extend({ @@ -174,7 +183,10 @@ export default Vue.extend({ smtpPort: null, smtpUser: null, smtpPass: null, - faHeadset, faShieldAlt, faGhost, faUserPlus, farEnvelope + enableServiceWorker: false, + swPublicKey: null, + swPrivateKey: null, + faHeadset, faShieldAlt, faGhost, faUserPlus, farEnvelope, faBolt }; }, @@ -217,6 +229,9 @@ export default Vue.extend({ this.smtpPort = meta.smtpPort; this.smtpUser = meta.smtpUser; this.smtpPass = meta.smtpPass; + this.enableServiceWorker = meta.enableServiceWorker; + this.swPublicKey = meta.swPublickey; + this.swPrivateKey = meta.swPrivateKey; }); }, @@ -270,7 +285,10 @@ export default Vue.extend({ smtpHost: this.smtpHost, smtpPort: parseInt(this.smtpPort, 10), smtpUser: this.smtpUser, - smtpPass: this.smtpPass + smtpPass: this.smtpPass, + enableServiceWorker: this.enableServiceWorker, + swPublicKey: this.swPublicKey, + swPrivateKey: this.swPrivateKey }).then(() => { this.$root.dialog({ type: 'success', -- cgit v1.2.3-freya