Add ability to configure http signatures and activity expiration settings

This commit is contained in:
Angelina Filippova 2019-11-21 23:07:13 +09:00
parent c7bfc3d0dd
commit f8030aef14
3 changed files with 21 additions and 2 deletions

View file

@ -8,6 +8,10 @@
<setting :setting-group="corsPlug" :data="corsPlugData"/>
</el-form>
<div class="line"/>
<el-form ref="httpSignatures" :model="httpSignaturesData" :label-width="labelWidth">
<setting :setting-group="httpSignatures" :data="httpSignaturesData"/>
</el-form>
<div class="line"/>
<el-form ref="httpSecurityData" :model="httpSecurityData" :label-width="labelWidth">
<setting :setting-group="httpSecurity" :data="httpSecurityData"/>
<el-form-item>
@ -47,6 +51,12 @@ export default {
httpSecurityData() {
return this.settings.settings.pleroma[':http_security']
},
httpSignatures() {
return this.settings.description.find(setting => setting.group === ':http_signatures')
},
httpSignaturesData() {
return this.settings.settings.http_signatures
},
isMobile() {
return this.$store.state.app.device === 'mobile'
},

View file

@ -19,7 +19,7 @@
@change="updateSetting($event, settingGroup.key, setting.key)"/>
<el-select
v-if="setting.type === 'module' || (setting.type.includes('atom') && setting.type.includes(false))"
:value="data[setting.key]"
:value="inputValue"
clearable
@change="updateSetting($event, settingGroup.key, setting.key)">
<el-option
@ -225,7 +225,7 @@ export default {
}
},
inputValue() {
if ([':esshd', ':cors_plug', ':quack'].includes(this.settingGroup.group) && this.data[this.setting.key]) {
if ([':esshd', ':cors_plug', ':quack', ':http_signatures'].includes(this.settingGroup.group) && this.data[this.setting.key]) {
return this.data[this.setting.key].value
} else if (this.settingGroup.group === ':logger' && this.setting.key === ':backends') {
return this.data.value

View file

@ -5,6 +5,9 @@
</el-form>
<el-form ref="workersData" :model="workersData" :label-width="labelWidth">
<setting :setting-group="workers" :data="workersData"/>
</el-form>
<el-form ref="activityExpiration" :model="activityExpirationData" :label-width="labelWidth">
<setting :setting-group="activityExpiration" :data="activityExpirationData"/>
<el-form-item>
<el-button type="primary" @click="onSubmit">Submit</el-button>
</el-form-item>
@ -24,6 +27,12 @@ export default {
...mapGetters([
'settings'
]),
activityExpiration() {
return this.settings.description.find(setting => setting.key === 'Pleroma.ActivityExpiration')
},
activityExpirationData() {
return this.settings.settings.pleroma['Pleroma.ActivityExpiration']
},
isMobile() {
return this.$store.state.app.device === 'mobile'
},