mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-20 00:42:16 +00:00
toggle emoji via spotlight
This commit is contained in:
17
resources/js/store/modules/app.js
vendored
17
resources/js/store/modules/app.js
vendored
@@ -1,5 +1,6 @@
|
||||
import i18n from '/resources/js/i18n/index'
|
||||
import axios from "axios";
|
||||
import axios from "axios"
|
||||
import Vue from "vue"
|
||||
|
||||
const defaultState = {
|
||||
isVisibleNavigationBars: localStorage.getItem('is_navigation_bars') !== 'false',
|
||||
@@ -42,6 +43,20 @@ const actions = {
|
||||
// Change preview
|
||||
commit('CHANGE_PREVIEW', previewType)
|
||||
},
|
||||
toggleEmojiType: ({commit, getters}) => {
|
||||
let newType = getters.config.defaultEmoji === 'twemoji'
|
||||
? 'applemoji'
|
||||
: 'twemoji'
|
||||
|
||||
// Update config
|
||||
commit('REPLACE_CONFIG_VALUE', {
|
||||
key: 'defaultEmoji',
|
||||
value: newType,
|
||||
})
|
||||
|
||||
// Update user settings
|
||||
Vue.prototype.$updateText('/user/settings', 'emoji_type', newType)
|
||||
},
|
||||
fileInfoToggle: (context, visibility = undefined) => {
|
||||
if (!visibility) {
|
||||
if (context.state.isVisibleSidebar) {
|
||||
|
||||
Reference in New Issue
Block a user