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