[feat] new enable_comments disable_gamification
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
<template lang="pug">
|
||||
div
|
||||
el-divider {{$t('admin.federation')}}
|
||||
el-form(inline label-width='400px')
|
||||
el-form-item(:label="$t('admin.enable_federation')")
|
||||
el-switch(v-model='enable_federation')
|
||||
el-form-item(:label="$t('admin.enable_comments')")
|
||||
el-switch(v-model='enable_comments')
|
||||
el-form-item(:label="$t('admin.disable_gamification')")
|
||||
el-switch(v-model='disable_gamification')
|
||||
</template>
|
||||
<script>
|
||||
import { mapState, mapActions } from 'vuex'
|
||||
@@ -17,6 +20,14 @@ export default {
|
||||
get () { return this.settings.enable_federation },
|
||||
set (value) { this.setSetting({ key: 'enable_federation', value }) }
|
||||
},
|
||||
enable_comments: {
|
||||
get () { return this.settings.enable_comments },
|
||||
set (value) { this.setSetting({ key: 'enable_comments', value }) }
|
||||
},
|
||||
disable_gamification: {
|
||||
get () { return this.settings.disable_gamification },
|
||||
set (value) { this.setSetting({ key: 'disable_gamification', value }) }
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -15,6 +15,7 @@ const debug = require('debug')('federation')
|
||||
* ref: https://www.w3.org/TR/activitypub/#Overview
|
||||
*/
|
||||
|
||||
router.use(cors())
|
||||
router.use((req, res, next) => {
|
||||
if(settingsController.settings.enable_federation) return next()
|
||||
debug('Federation disabled!')
|
||||
@@ -22,7 +23,6 @@ router.use((req, res, next) => {
|
||||
next(false)
|
||||
})
|
||||
|
||||
router.use(cors())
|
||||
router.use(express.json({ type: ['application/json', 'application/activity+json', 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'] }))
|
||||
|
||||
router.get('/m/:event_id', async (req, res) => {
|
||||
|
||||
@@ -14,7 +14,9 @@ export const state = () => ({
|
||||
allow_anon_event: true,
|
||||
allow_recurrent_event: true,
|
||||
recurrent_event_visible: false,
|
||||
enable_federation: false
|
||||
enable_federation: false,
|
||||
enable_comments: false,
|
||||
disable_gamification: true
|
||||
},
|
||||
in_past: false,
|
||||
filters: {
|
||||
|
||||
Reference in New Issue
Block a user