diff --git a/src/api/emojiPacks.js b/src/api/emojiPacks.js index 62d0406c..55fd1182 100644 --- a/src/api/emojiPacks.js +++ b/src/api/emojiPacks.js @@ -71,7 +71,7 @@ export async function downloadFrom(host, instance, packName, as, token) { export async function fetchPack(packName, page, pageSize, host, token) { return await request({ baseURL: baseName(host), - url: `/api/pleroma/emoji/packs/${packName}&page=${page}&page_size=${pageSize}`, + url: `/api/pleroma/emoji/packs/${packName}?page=${page}&page_size=${pageSize}`, method: 'get', headers: authHeaders(token) }) diff --git a/src/store/modules/emojiPacks.js b/src/store/modules/emojiPacks.js index eeb3c099..4d378508 100644 --- a/src/store/modules/emojiPacks.js +++ b/src/store/modules/emojiPacks.js @@ -20,10 +20,13 @@ import Vue from 'vue' const emojiPacks = { state: { activeCollapseItems: [], + currentFilesPage: 1, currentPage: 1, + filesPageSize: 30, + localPackFilesCount: 0, localPacks: {}, localPacksCount: 0, - pageSize: 20, + pageSize: 50, remoteInstance: '', remotePacks: {} }, @@ -32,10 +35,10 @@ const emojiPacks = { state.activeCollapseItems = items }, SET_FILES_COUNT: (state, count) => { - state.localPacksCount = count + state.localPackFilesCount = count }, SET_FILES_PAGE: (state, page) => { - state.currentPage = page + state.currentFilesPage = page }, SET_LOCAL_PACKS: (state, packs) => { state.localPacks = packs @@ -131,7 +134,7 @@ const emojiPacks = { commit('SET_PAGE', page) }, async FetchSinglePack({ getters, commit, state }, { name, page }) { - const { data } = await fetchPack(name, page, state.pageSize, getters.authHost, getters.token) + const { data } = await fetchPack(name, page, state.filesPageSize, getters.authHost, getters.token) const { files, files_count } = data commit('SET_PACK_FILES', { name, files }) commit('SET_FILES_COUNT', files_count) diff --git a/src/views/emojiPacks/components/LocalEmojiPack.vue b/src/views/emojiPacks/components/LocalEmojiPack.vue index 13033503..3da48712 100644 --- a/src/views/emojiPacks/components/LocalEmojiPack.vue +++ b/src/views/emojiPacks/components/LocalEmojiPack.vue @@ -54,6 +54,16 @@ :is-local="isLocal" /> {{ $t('emoji.emptyPack') }} +