From 3f5b96bf629da5f736c09b10058802eed28cca18 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 16 May 2019 01:07:32 +0900 Subject: Resolve #4928 --- src/client/app/admin/views/instance.vue | 170 ++++++++++++++++++++++---------- 1 file changed, 119 insertions(+), 51 deletions(-) (limited to 'src/client') diff --git a/src/client/app/admin/views/instance.vue b/src/client/app/admin/views/instance.vue index be9e56131e..3ac4d6d721 100644 --- a/src/client/app/admin/views/instance.vue +++ b/src/client/app/admin/views/instance.vue @@ -53,6 +53,32 @@ +
+ {{ $t('use-object-storage') }} + +
{{ $t('cache-remote-files') }}
@@ -66,22 +92,11 @@
- -
- {{ $t('enable-email') }} - {{ $t('email') }} - - {{ $t('smtp-host') }} - {{ $t('smtp-port') }} - - {{ $t('smtp-auth') }} - - {{ $t('smtp-user') }} - {{ $t('smtp-pass') }} - - {{ $t('smtp-secure') }} -
-
+ +
+ + + {{ $t('save') }}
@@ -99,14 +114,22 @@ - +
- {{ $t('enable-serviceworker') }} - {{ $t('vapid-info') }}
npm i web-push -g
web-push generate-vapid-keys
- - {{ $t('vapid-publickey') }} - {{ $t('vapid-privatekey') }} - + {{ $t('enable-email') }} +
{{ $t('save') }} @@ -114,14 +137,16 @@ - -
- {{ $t('enable-recaptcha') }} - {{ $t('recaptcha-info') }} - - {{ $t('recaptcha-site-key') }} - {{ $t('recaptcha-secret-key') }} - + +
+ {{ $t('enable-serviceworker') }} +
{{ $t('save') }} @@ -129,11 +154,18 @@ - -
- - - + +
+ {{ $t('enable-recaptcha') }} + +
+
{{ $t('save') }}
@@ -143,29 +175,35 @@
{{ $t('twitter-integration-config') }}
{{ $t('enable-twitter-integration') }} - - {{ $t('twitter-integration-consumer-key') }} - {{ $t('twitter-integration-consumer-secret') }} - - {{ $t('twitter-integration-info', { url: `${url}/api/tw/cb` }) }} +
{{ $t('github-integration-config') }}
{{ $t('enable-github-integration') }} - - {{ $t('github-integration-client-id') }} - {{ $t('github-integration-client-secret') }} - - {{ $t('github-integration-info', { url: `${url}/api/gh/cb` }) }} +
{{ $t('discord-integration-config') }}
{{ $t('enable-discord-integration') }} - - {{ $t('discord-integration-client-id') }} - {{ $t('discord-integration-client-secret') }} - - {{ $t('discord-integration-info', { url: `${url}/api/dc/cb` }) }} +
{{ $t('save') }} @@ -261,6 +299,16 @@ export default Vue.extend({ swPrivateKey: null, pinnedUsers: '', hiddenTags: '', + useObjectStorage: false, + objectStorageBaseUrl: null, + objectStorageBucket: null, + objectStoragePrefix: null, + objectStorageEndpoint: null, + objectStorageRegion: null, + objectStoragePort: null, + objectStorageAccessKey: null, + objectStorageSecretKey: null, + objectStorageUseSSL: false, faHeadset, faShieldAlt, faGhost, faUserPlus, farEnvelope, faBolt, faThumbtack, faPencilAlt, faSave, faHashtag }; }, @@ -315,6 +363,16 @@ export default Vue.extend({ this.swPrivateKey = meta.swPrivateKey; this.pinnedUsers = meta.pinnedUsers.join('\n'); this.hiddenTags = meta.hiddenTags.join('\n'); + this.useObjectStorage = meta.useObjectStorage; + this.objectStorageBaseUrl = meta.objectStorageBaseUrl; + this.objectStorageBucket = meta.objectStorageBucket; + this.objectStoragePrefix = meta.objectStoragePrefix; + this.objectStorageEndpoint = meta.objectStorageEndpoint; + this.objectStorageRegion = meta.objectStorageRegion; + this.objectStoragePort = meta.objectStoragePort; + this.objectStorageAccessKey = meta.objectStorageAccessKey; + this.objectStorageSecretKey = meta.objectStorageSecretKey; + this.objectStorageUseSSL = meta.objectStorageUseSSL; }); }, @@ -382,6 +440,16 @@ export default Vue.extend({ swPrivateKey: this.swPrivateKey, pinnedUsers: this.pinnedUsers.split('\n'), hiddenTags: this.hiddenTags.split('\n'), + useObjectStorage: this.useObjectStorage, + objectStorageBaseUrl: this.objectStorageBaseUrl ? this.objectStorageBaseUrl : null, + objectStorageBucket: this.objectStorageBucket ? this.objectStorageBucket : null, + objectStoragePrefix: this.objectStoragePrefix ? this.objectStoragePrefix : null, + objectStorageEndpoint: this.objectStorageEndpoint ? this.objectStorageEndpoint : null, + objectStorageRegion: this.objectStorageRegion ? this.objectStorageRegion : null, + objectStoragePort: this.objectStoragePort ? this.objectStoragePort : null, + objectStorageAccessKey: this.objectStorageAccessKey ? this.objectStorageAccessKey : null, + objectStorageSecretKey: this.objectStorageSecretKey ? this.objectStorageSecretKey : null, + objectStorageUseSSL: this.objectStorageUseSSL, }).then(() => { this.$root.dialog({ type: 'success', -- cgit v1.2.3-freya