diff --git a/src/api/emojiPacks.js b/src/api/emojiPacks.js index a2d085c8..2fba5e6b 100644 --- a/src/api/emojiPacks.js +++ b/src/api/emojiPacks.js @@ -92,10 +92,10 @@ export async function listPacks(page, pageSize, host, token) { }) } -export async function listRemotePacks(host, token, instance) { +export async function listRemotePacks(instance, page, pageSize, host, token) { return await request({ baseURL: baseName(host), - url: `/api/pleroma/emoji/packs/remote?url=${baseName(instance)}`, + url: `/api/pleroma/emoji/packs/remote?url=${baseName(instance)}&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 b01536db..13b82f92 100644 --- a/src/store/modules/emojiPacks.js +++ b/src/store/modules/emojiPacks.js @@ -208,8 +208,8 @@ const emojiPacks = { SetActiveTab({ commit }, activeTab) { commit('SET_ACTIVE_TAB', activeTab) }, - async SetRemoteEmojiPacks({ commit, getters }, { remoteInstance }) { - const { data } = await listRemotePacks(getters.authHost, getters.token, remoteInstance) + async SetRemoteEmojiPacks({ commit, getters, state }, { page, remoteInstance }) { + const { data } = await listRemotePacks(remoteInstance, page, state.pageSize, getters.authHost, getters.token) const { packs, count } = data const updatedPacks = Object.keys(packs).reduce((acc, packName) => { const { files, ...pack } = packs[packName] diff --git a/src/views/emojiPacks/index.vue b/src/views/emojiPacks/index.vue index 6b8677de..fc5770fd 100644 --- a/src/views/emojiPacks/index.vue +++ b/src/views/emojiPacks/index.vue @@ -45,7 +45,7 @@ :page-size="pageSize" hide-on-single-page layout="prev, pager, next" - @current-change="handlePageChange" + @current-change="handleLocalPageChange" /> @@ -71,6 +71,16 @@ +