Update zh-cn.yaml (#194)
Address #184
build assets
Update zh-cn.yaml (#194)
Former-commit-id: 4572f93371647c0a6b53cc375ec5bb00356a37c9 [formerly e58e4793ac0ca6915b605d7b2a8a77f0aec31172] [formerly 43635f6b98f546ec0e2656d26031388aef63a902 [formerly da4fd84002]]
Former-commit-id: 15422887ad29dea63bdf861d9da8f8d28b4fbc8f [formerly 3949ffa499cf999c3f4b50ee18802c0f87a23807]
Former-commit-id: fac5ceeee3fa969239d9ef5e04ef5542a61d2761
66 lines
1.6 KiB
JavaScript
66 lines
1.6 KiB
JavaScript
import i18n from '@/i18n'
|
|
|
|
const mutations = {
|
|
closeHovers: state => {
|
|
state.show = null
|
|
state.showMessage = null
|
|
},
|
|
showHover: (state, value) => {
|
|
if (typeof value !== 'object') {
|
|
state.show = value
|
|
return
|
|
}
|
|
|
|
state.show = value.prompt
|
|
state.showMessage = value.message
|
|
state.showConfirm = value.confirm
|
|
},
|
|
showError: (state, value) => {
|
|
state.show = 'error'
|
|
state.showMessage = value
|
|
},
|
|
showSuccess: (state, value) => {
|
|
state.show = 'success'
|
|
state.showMessage = value
|
|
},
|
|
setLoading: (state, value) => { state.loading = value },
|
|
setReload: (state, value) => { state.reload = value },
|
|
setUser: (state, value) => {
|
|
i18n.locale = value.locale
|
|
state.user = value
|
|
},
|
|
setJWT: (state, value) => (state.jwt = value),
|
|
multiple: (state, value) => (state.multiple = value),
|
|
addSelected: (state, value) => (state.selected.push(value)),
|
|
addPlugin: (state, value) => {
|
|
state.plugins.push(value)
|
|
},
|
|
removeSelected: (state, value) => {
|
|
let i = state.selected.indexOf(value)
|
|
if (i === -1) return
|
|
state.selected.splice(i, 1)
|
|
},
|
|
resetSelected: (state) => {
|
|
state.selected = []
|
|
},
|
|
listingDisplay: (state, value) => {
|
|
state.req.display = value
|
|
},
|
|
updateRequest: (state, value) => {
|
|
state.req = value
|
|
},
|
|
updateClipboard: (state, value) => {
|
|
state.clipboard.key = value.key
|
|
state.clipboard.items = value.items
|
|
},
|
|
resetClipboard: (state) => {
|
|
state.clipboard.key = ''
|
|
state.clipboard.items = []
|
|
},
|
|
setSchedule: (state, value) => {
|
|
state.schedule = value
|
|
}
|
|
}
|
|
|
|
export default mutations
|