fix emoji tab
This commit is contained in:
parent
0d9709825f
commit
7999f2d34b
3 changed files with 11 additions and 9 deletions
|
|
@ -159,7 +159,7 @@ import {
|
||||||
addNewEmojiFile,
|
addNewEmojiFile,
|
||||||
deleteEmojiFile,
|
deleteEmojiFile,
|
||||||
updateEmojiFile,
|
updateEmojiFile,
|
||||||
} from 'src/services/api/api.service.js'
|
} from 'src/services/api/admin.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|
|
||||||
|
|
@ -548,11 +548,15 @@ export const useAdminSettingsStore = defineStore('adminSettings', {
|
||||||
importEmojiFromFS() {
|
importEmojiFromFS() {
|
||||||
return importEmojiFromFS({ credentials: useCredentialsStore().current })
|
return importEmojiFromFS({ credentials: useCredentialsStore().current })
|
||||||
},
|
},
|
||||||
listEmojiPacks() {
|
listEmojiPacks(params) {
|
||||||
return listEmojiPacks({ credentials: useCredentialsStore().current })
|
return listEmojiPacks({
|
||||||
|
...params,
|
||||||
|
credentials: useCredentialsStore().current
|
||||||
|
})
|
||||||
},
|
},
|
||||||
listRemoteEmojiPacks() {
|
listRemoteEmojiPacks(params) {
|
||||||
return listRemoteEmojiPacks({
|
return listRemoteEmojiPacks({
|
||||||
|
...params,
|
||||||
credentials: useCredentialsStore().current,
|
credentials: useCredentialsStore().current,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -188,8 +188,8 @@ export const useEmojiStore = defineStore('emoji', {
|
||||||
this.adminPacksLocalLoading = true
|
this.adminPacksLocalLoading = true
|
||||||
this.adminPacksLocal = await this.getAdminPacks(
|
this.adminPacksLocal = await this.getAdminPacks(
|
||||||
useInstanceStore().server,
|
useInstanceStore().server,
|
||||||
() =>
|
(params) => listEmojiPacks({
|
||||||
listEmojiPacks({
|
...params,
|
||||||
credentials: useCredentialsStore().current,
|
credentials: useCredentialsStore().current,
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
|
@ -208,7 +208,6 @@ export const useEmojiStore = defineStore('emoji', {
|
||||||
page: 1,
|
page: 1,
|
||||||
pageSize: 0,
|
pageSize: 0,
|
||||||
})
|
})
|
||||||
.then((data) => data.json())
|
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
if (data.error !== undefined) {
|
if (data.error !== undefined) {
|
||||||
return Promise.reject(data.error)
|
return Promise.reject(data.error)
|
||||||
|
|
@ -223,7 +222,6 @@ export const useEmojiStore = defineStore('emoji', {
|
||||||
page: i,
|
page: i,
|
||||||
pageSize,
|
pageSize,
|
||||||
})
|
})
|
||||||
.then((data) => data.json())
|
|
||||||
.then((pageData) => {
|
.then((pageData) => {
|
||||||
if (pageData.error !== undefined) {
|
if (pageData.error !== undefined) {
|
||||||
return Promise.reject(pageData.error)
|
return Promise.reject(pageData.error)
|
||||||
|
|
@ -249,7 +247,7 @@ export const useEmojiStore = defineStore('emoji', {
|
||||||
}, {})
|
}, {})
|
||||||
})
|
})
|
||||||
.catch((data) => {
|
.catch((data) => {
|
||||||
this.displayError(data)
|
console.error(data)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue