Add favicons and welcome messages settings on Instance tab

This commit is contained in:
Angelina Filippova 2020-07-31 23:29:16 +03:00
parent b60cd76350
commit c12d3c0451
2 changed files with 22 additions and 2 deletions

View file

@ -8,6 +8,10 @@
<setting :setting-group="adminToken" :data="adminTokenData"/>
</el-form>
<el-divider v-if="adminToken" class="divider thick-line"/>
<el-form :model="welcomeData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="welcome" :data="welcomeData"/>
</el-form>
<el-divider v-if="welcome" class="divider thick-line"/>
<el-form :model="scheduledActivityData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="scheduledActivity" :data="scheduledActivityData"/>
</el-form>
@ -20,6 +24,10 @@
<setting :setting-group="pleromaUser" :data="pleromaUserData"/>
</el-form>
<el-divider v-if="pleromaUser" class="divider thick-line"/>
<el-form :model="faviconsData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="favicons" :data="faviconsData"/>
</el-form>
<el-divider v-if="favicons" class="divider thick-line"/>
<el-form :model="uriSchemesData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="uriSchemes" :data="uriSchemesData"/>
</el-form>
@ -27,7 +35,7 @@
<el-form :model="feedData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="feed" :data="feedData"/>
</el-form>
<el-divider v-if="uriSchemes" class="divider thick-line"/>
<el-divider v-if="feed" class="divider thick-line"/>
<el-form :model="streamerData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="streamer" :data="streamerData"/>
</el-form>
@ -58,6 +66,12 @@ export default {
adminTokenData() {
return _.get(this.settings.settings, [':pleroma', ':admin_token']) || {}
},
favicons() {
return this.settings.description.find(setting => setting.key === ':instances_favicons')
},
faviconsData() {
return _.get(this.settings.settings, [':pleroma', ':instances_favicons']) || {}
},
feed() {
return this.settings.description.find(setting => setting.key === ':feed')
},
@ -123,6 +137,12 @@ export default {
},
uriSchemesData() {
return _.get(this.settings.settings, [':pleroma', ':uri_schemes']) || {}
},
welcome() {
return this.settings.description.find(setting => setting.key === ':welcome')
},
welcomeData() {
return _.get(this.settings.settings, [':pleroma', ':welcome']) || {}
}
},
methods: {

View file

@ -30,7 +30,7 @@ export const tabs = description => {
},
'instance': {
label: 'settings.instance',
settings: [':admin_token', ':instance', ':manifest', 'Pleroma.User', 'Pleroma.ScheduledActivity', ':uri_schemes', ':feed', ':streamer']
settings: [':admin_token', ':instance', ':instances_favicons', ':welcome', ':manifest', 'Pleroma.User', 'Pleroma.ScheduledActivity', ':uri_schemes', ':feed', ':streamer']
},
'job-queue': {
label: 'settings.jobQueue',