mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
add UI to set default fedi hashtags in Admin > Federation
This commit is contained in:
parent
4376061191
commit
ead2a6470d
3 changed files with 24 additions and 4 deletions
|
@ -40,6 +40,19 @@ v-container
|
|||
//- @blur='save("instance_place", instance_place)'
|
||||
//- )
|
||||
|
||||
v-combobox.mt-4(v-model='default_fedi_hashtags'
|
||||
:prepend-icon="mdiTagMultiple"
|
||||
:label="$t('admin.default_fedi_hashtags')"
|
||||
persistent-hint inset multiple
|
||||
:delimiters="[',', ';']"
|
||||
chips small-chips deletable-chips
|
||||
:hint="$t('admin.default_fedi_hashtags_help')"
|
||||
@blur='save("default_fedi_hashtags", default_fedi_hashtags)')
|
||||
template(v-slot:selection="{ item, on, attrs, selected, parent }")
|
||||
v-chip(v-bind="attrs" close :close-icon='mdiCloseCircle' @click:close='parent.selectItem(item)'
|
||||
:input-value="selected" label small) {{ item }}
|
||||
|
||||
|
||||
v-text-field.mt-4(v-model='trusted_instances_label'
|
||||
:label="$t('admin.trusted_instances_label')"
|
||||
persistent-hint inset
|
||||
|
@ -98,13 +111,13 @@ v-container
|
|||
</template>
|
||||
<script>
|
||||
import { mapActions, mapState } from 'vuex'
|
||||
import { mdiDeleteForever, mdiPlus, mdiChevronLeft, mdiChevronRight, mdiChevronDown, mdiDownload, mdiUpload } from '@mdi/js'
|
||||
import { mdiDeleteForever, mdiPlus, mdiChevronLeft, mdiChevronRight, mdiChevronDown, mdiDownload, mdiUpload, mdiTagMultiple, mdiCloseCircle } from '@mdi/js'
|
||||
|
||||
export default {
|
||||
name: 'Federation',
|
||||
data ({ $store, $options }) {
|
||||
return {
|
||||
mdiDeleteForever, mdiPlus, mdiChevronLeft, mdiChevronRight, mdiChevronDown, mdiDownload, mdiUpload,
|
||||
mdiDeleteForever, mdiPlus, mdiChevronLeft, mdiChevronRight, mdiChevronDown, mdiDownload, mdiUpload, mdiCloseCircle, mdiTagMultiple,
|
||||
instance_url: '',
|
||||
instance_name: $store.state.settings.instance_name,
|
||||
trusted_instances_label: $store.state.settings.trusted_instances_label,
|
||||
|
@ -144,6 +157,10 @@ export default {
|
|||
get () { return this.settings.enable_resources },
|
||||
set (value) { this.setSetting({ key: 'enable_resources', value }) }
|
||||
},
|
||||
default_fedi_hashtags: {
|
||||
get () { return this.settings.default_fedi_hashtags },
|
||||
set (value) { this.setSetting({ key: 'default_fedi_hashtags', value }) }
|
||||
},
|
||||
hide_boosts: {
|
||||
get () { return this.settings.hide_boosts },
|
||||
set (value) { this.setSetting({ key: 'hide_boosts', value }) }
|
||||
|
|
|
@ -347,7 +347,9 @@
|
|||
"custom_js": "Custom Javascript Code",
|
||||
"custom_css": "Custom CSS Style",
|
||||
"custom_js_help": "You can integrate some javascript code that will be loaded for each user by writing in this textarea below. You probably want to read the <a href='https://gancio.org/usage/custom_js'>documentation</a> first.",
|
||||
"custom_css_help": "You can customize some stylesheet too, read some example <a href='https://gancio.org/usage/custom_css'>here</a>."
|
||||
"custom_css_help": "You can customize some stylesheet too, read some example <a href='https://gancio.org/usage/custom_css'>here</a>.",
|
||||
"default_fedi_hashtags": "Default fediverse hashtags",
|
||||
"default_fedi_hashtags_help": "The specified tags will be added to events sent to the fediverse"
|
||||
},
|
||||
"auth": {
|
||||
"not_confirmed": "Not confirmed yet…",
|
||||
|
|
|
@ -104,7 +104,8 @@ module.exports = {
|
|||
about: settings.about,
|
||||
collection_in_home: settings.collection_in_home,
|
||||
custom_js: settings.custom_js,
|
||||
custom_css: settings.custom_css
|
||||
custom_css: settings.custom_css,
|
||||
default_fedi_hashtags: settings.default_fedi_hashtags
|
||||
}
|
||||
next()
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue