Merge branch 'feature/add-missing-mrf-settings' into 'develop'

Add to MRF settings and update Pleroma.Upload.Filter.Mogrify setting

See merge request pleroma/admin-fe!138
This commit is contained in:
Angelina Filippova 2020-06-25 17:01:31 +00:00
commit ed801c5430
6 changed files with 33 additions and 22 deletions

View file

@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- On Reports page add links to reported account and the author of the report
- In Notes add link to the note author's profile page
- In Moderation log add link to the actor's profile page
- Adds MRF Activity Expiration setting
### Changed
@ -22,6 +23,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Settings that can't be altered in Admin FE are removed: HTTP Signatures settings, Federation publisher modules and Oban Repo
- When rendering user's profile, statuses, reports and notes check if required properties exist
- Remove ability to moderate users that don't have valid nickname
- Displays both labels and description in the header of group of settiings
- Ability to add custom values in Pleroma.Upload.Filter.Mogrify setting
### Fixed

View file

@ -327,8 +327,7 @@ export default {
type.includes('module') ||
(type.includes('list') && type.includes('string')) ||
(type.includes('list') && type.includes('atom')) ||
(type.includes('regex') && type.includes('string')) ||
this.setting.key === ':args'
(type.includes('regex') && type.includes('string'))
)
},
renderSingleSelect(type) {

View file

@ -34,6 +34,10 @@
<setting :setting-group="mrfObjectAge" :data="mrfObjectAgeData"/>
</el-form>
<el-divider v-if="mrfObjectAge" class="divider thick-line"/>
<el-form ref="mrfActivityExpiration" :model="mrfActivityExpirationData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="mrfActivityExpiration" :data="mrfActivityExpirationData"/>
</el-form>
<el-divider v-if="mrfActivityExpiration" class="divider thick-line"/>
<el-form ref="modules" :model="modulesData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="modules" :data="modulesData"/>
</el-form>
@ -86,6 +90,12 @@ export default {
modulesData() {
return _.get(this.settings.settings, [':pleroma', ':modules']) || {}
},
mrfActivityExpiration() {
return this.settings.description.find(setting => setting.key === ':mrf_activity_expiration')
},
mrfActivityExpirationData() {
return _.get(this.settings.settings, [':pleroma', ':mrf_activity_expiration']) || {}
},
mrfSimple() {
return this.settings.description.find(setting => setting.key === ':mrf_simple')
},

View file

@ -1,7 +1,8 @@
<template>
<div v-if="!loading">
<el-form-item v-if="settingGroup.description" :data-search="settingGroup.key || settingGroup.group" class="description-container">
<span class="description" v-html="getFormattedDescription(settingGroup.description)"/>
<el-form-item v-if="settingGroup.label || settingGroup.description" :data-search="settingGroup.key || settingGroup.group" class="description-container">
<span v-if="settingGroup.label" class="setting-label">{{ settingGroup.label }}</span>
<span v-if="settingGroup.description" class="expl no-top-margin" v-html="getFormattedDescription(settingGroup.description)"/>
</el-form-item>
<div v-if="settingGroup.key === 'Pleroma.Emails.Mailer'">
<div v-for="setting in settingGroup.children.filter(setting => !setting.group)" :key="setting.key">

View file

@ -16,6 +16,8 @@
:value="data[setting.key]"
:data-search="setting.key || setting.group"
multiple
filterable
allow-create
class="input"
@change="updateSetting($event, settingGroup.group, settingGroup.key, setting.key, setting.type)">
<el-option value="strip" label="strip"/>

View file

@ -17,22 +17,11 @@
.delete-setting-button {
margin-left: 5px;
}
.description > p {
font-size: 14px;
color: #606266;
font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei";
font-weight: 700;
line-height: 20px;
margin: 0 0 14px 0;
code {
display: inline;
padding: 2px 3px;
font-size: 14px;
}
}
.description-container {
overflow-wrap: break-word;
margin-bottom: 0;
.el-form-item__content {
line-height: 20px;
}
}
.divider {
margin: 0 0 18px 0;
@ -186,6 +175,9 @@
width: 30%;
margin-right: 8px
}
.no-top-margin {
margin-top: 0;
}
.pattern-input {
width: 20%;
margin-right: 8px
@ -267,6 +259,14 @@
display: flex;
margin-bottom: 10px;
}
.setting-label {
font-size: 14px;
color: #606266;
font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei";
font-weight: 700;
line-height: 20px;
margin: 0 0 14px 0;
}
.settings-container {
max-width: 1824px;
margin: auto;
@ -500,10 +500,6 @@
.scale-input {
width: 45%;
}
.setting-label {
display: flex;
justify-content: space-between;
}
.settings-header {
width: fit-content;
display: inline-block;