Implement object storage settings
This commit is contained in:
parent
e391727b81
commit
b7cb172d89
3 changed files with 87 additions and 2 deletions
|
@ -417,6 +417,8 @@ promote: "プロモート"
|
||||||
numberOfDays: "日数"
|
numberOfDays: "日数"
|
||||||
hideThisNote: "このノートを非表示"
|
hideThisNote: "このノートを非表示"
|
||||||
showFeaturedNotesInTimeline: "タイムラインにおすすめのノートを表示する"
|
showFeaturedNotesInTimeline: "タイムラインにおすすめのノートを表示する"
|
||||||
|
objectStorage: "オブジェクトストレージ"
|
||||||
|
useObjectStorage: "オブジェクトストレージを使用"
|
||||||
|
|
||||||
_ago:
|
_ago:
|
||||||
unknown: "謎"
|
unknown: "謎"
|
||||||
|
|
|
@ -61,10 +61,10 @@
|
||||||
<div class="_content">
|
<div class="_content">
|
||||||
<mk-switch v-model="enableServiceWorker">{{ $t('enableServiceworker') }}<template #desc>{{ $t('serviceworkerInfo') }}</template></mk-switch>
|
<mk-switch v-model="enableServiceWorker">{{ $t('enableServiceworker') }}<template #desc>{{ $t('serviceworkerInfo') }}</template></mk-switch>
|
||||||
<template v-if="enableServiceWorker">
|
<template v-if="enableServiceWorker">
|
||||||
<mk-horizon-group inputs class="fit-bottom">
|
<div class="_inputs">
|
||||||
<mk-input v-model="swPublicKey" :disabled="!enableServiceWorker"><template #icon><fa :icon="faKey"/></template>Public key</mk-input>
|
<mk-input v-model="swPublicKey" :disabled="!enableServiceWorker"><template #icon><fa :icon="faKey"/></template>Public key</mk-input>
|
||||||
<mk-input v-model="swPrivateKey" :disabled="!enableServiceWorker"><template #icon><fa :icon="faKey"/></template>Private key</mk-input>
|
<mk-input v-model="swPrivateKey" :disabled="!enableServiceWorker"><template #icon><fa :icon="faKey"/></template>Private key</mk-input>
|
||||||
</mk-horizon-group>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<div class="_footer">
|
<div class="_footer">
|
||||||
|
@ -97,6 +97,33 @@
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section class="_card">
|
||||||
|
<div class="_title"><fa :icon="faCloud"/> {{ $t('objectStorage') }}</div>
|
||||||
|
<div class="_content">
|
||||||
|
<mk-switch v-model="useObjectStorage">{{ $t('useObjectStorage') }}</mk-switch>
|
||||||
|
<template v-if="useObjectStorage">
|
||||||
|
<mk-input v-model="objectStorageBaseUrl" :disabled="!useObjectStorage">URL</mk-input>
|
||||||
|
<div class="_inputs">
|
||||||
|
<mk-input v-model="objectStorageBucket" :disabled="!useObjectStorage">Bucket</mk-input>
|
||||||
|
<mk-input v-model="objectStoragePrefix" :disabled="!useObjectStorage">Prefix</mk-input>
|
||||||
|
</div>
|
||||||
|
<mk-input v-model="objectStorageEndpoint" :disabled="!useObjectStorage">Endpoint</mk-input>
|
||||||
|
<div class="_inputs">
|
||||||
|
<mk-input v-model="objectStorageRegion" :disabled="!useObjectStorage">Region</mk-input>
|
||||||
|
<mk-input v-model="objectStoragePort" type="number" :disabled="!useObjectStorage">Port</mk-input>
|
||||||
|
</div>
|
||||||
|
<div class="_inputs">
|
||||||
|
<mk-input v-model="objectStorageAccessKey" :disabled="!useObjectStorage"><template #icon><fa :icon="faKey"/></template>Access key</mk-input>
|
||||||
|
<mk-input v-model="objectStorageSecretKey" :disabled="!useObjectStorage"><template #icon><fa :icon="faKey"/></template>Secret key</mk-input>
|
||||||
|
</div>
|
||||||
|
<mk-switch v-model="objectStorageUseSSL" :disabled="!useObjectStorage">SSL</mk-switch>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
<div class="_footer">
|
||||||
|
<mk-button primary @click="save(true)"><fa :icon="faSave"/> {{ $t('save') }}</mk-button>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
<section class="_card">
|
<section class="_card">
|
||||||
<div class="_title"><fa :icon="faGhost"/> {{ $t('proxyAccount') }}</div>
|
<div class="_title"><fa :icon="faGhost"/> {{ $t('proxyAccount') }}</div>
|
||||||
<div class="_content">
|
<div class="_content">
|
||||||
|
@ -213,6 +240,16 @@ export default Vue.extend({
|
||||||
enableServiceWorker: false,
|
enableServiceWorker: false,
|
||||||
swPublicKey: null,
|
swPublicKey: null,
|
||||||
swPrivateKey: null,
|
swPrivateKey: null,
|
||||||
|
useObjectStorage: false,
|
||||||
|
objectStorageBaseUrl: null,
|
||||||
|
objectStorageBucket: null,
|
||||||
|
objectStoragePrefix: null,
|
||||||
|
objectStorageEndpoint: null,
|
||||||
|
objectStorageRegion: null,
|
||||||
|
objectStoragePort: null,
|
||||||
|
objectStorageAccessKey: null,
|
||||||
|
objectStorageSecretKey: null,
|
||||||
|
objectStorageUseSSL: false,
|
||||||
enableTwitterIntegration: false,
|
enableTwitterIntegration: false,
|
||||||
twitterConsumerKey: null,
|
twitterConsumerKey: null,
|
||||||
twitterConsumerSecret: null,
|
twitterConsumerSecret: null,
|
||||||
|
@ -257,6 +294,16 @@ export default Vue.extend({
|
||||||
this.enableServiceWorker = this.meta.enableServiceWorker;
|
this.enableServiceWorker = this.meta.enableServiceWorker;
|
||||||
this.swPublicKey = this.meta.swPublickey;
|
this.swPublicKey = this.meta.swPublickey;
|
||||||
this.swPrivateKey = this.meta.swPrivateKey;
|
this.swPrivateKey = this.meta.swPrivateKey;
|
||||||
|
this.useObjectStorage = this.meta.useObjectStorage;
|
||||||
|
this.objectStorageBaseUrl = this.meta.objectStorageBaseUrl;
|
||||||
|
this.objectStorageBucket = this.meta.objectStorageBucket;
|
||||||
|
this.objectStoragePrefix = this.meta.objectStoragePrefix;
|
||||||
|
this.objectStorageEndpoint = this.meta.objectStorageEndpoint;
|
||||||
|
this.objectStorageRegion = this.meta.objectStorageRegion;
|
||||||
|
this.objectStoragePort = this.meta.objectStoragePort;
|
||||||
|
this.objectStorageAccessKey = this.meta.objectStorageAccessKey;
|
||||||
|
this.objectStorageSecretKey = this.meta.objectStorageSecretKey;
|
||||||
|
this.objectStorageUseSSL = this.meta.objectStorageUseSSL;
|
||||||
this.enableTwitterIntegration = this.meta.enableTwitterIntegration;
|
this.enableTwitterIntegration = this.meta.enableTwitterIntegration;
|
||||||
this.twitterConsumerKey = this.meta.twitterConsumerKey;
|
this.twitterConsumerKey = this.meta.twitterConsumerKey;
|
||||||
this.twitterConsumerSecret = this.meta.twitterConsumerSecret;
|
this.twitterConsumerSecret = this.meta.twitterConsumerSecret;
|
||||||
|
@ -341,6 +388,16 @@ export default Vue.extend({
|
||||||
enableServiceWorker: this.enableServiceWorker,
|
enableServiceWorker: this.enableServiceWorker,
|
||||||
swPublicKey: this.swPublicKey,
|
swPublicKey: this.swPublicKey,
|
||||||
swPrivateKey: this.swPrivateKey,
|
swPrivateKey: this.swPrivateKey,
|
||||||
|
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,
|
||||||
enableTwitterIntegration: this.enableTwitterIntegration,
|
enableTwitterIntegration: this.enableTwitterIntegration,
|
||||||
twitterConsumerKey: this.twitterConsumerKey,
|
twitterConsumerKey: this.twitterConsumerKey,
|
||||||
twitterConsumerSecret: this.twitterConsumerSecret,
|
twitterConsumerSecret: this.twitterConsumerSecret,
|
||||||
|
|
|
@ -248,6 +248,32 @@ hr {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
._inputs {
|
||||||
|
display: flex;
|
||||||
|
margin: 32px 0;
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
> * {
|
||||||
|
flex: 1;
|
||||||
|
margin: 0 !important;
|
||||||
|
|
||||||
|
&:not(:first-child) {
|
||||||
|
margin-left: 8px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:not(:last-child) {
|
||||||
|
margin-right: 8px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
._shadow {
|
._shadow {
|
||||||
box-shadow: 0 8px 32px var(--shadow);
|
box-shadow: 0 8px 32px var(--shadow);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue