Implement pack pagination, more localization fixes
This commit is contained in:
parent
4eeb3e5f78
commit
872dffe51b
3 changed files with 47 additions and 25 deletions
|
|
@ -1812,17 +1812,17 @@ const createEmojiPack = ({ name }) => {
|
|||
return fetch(PLEROMA_EMOJI_PACK_URL(name), { method: 'POST' })
|
||||
}
|
||||
|
||||
const listEmojiPacks = () => {
|
||||
return fetch(PLEROMA_EMOJI_PACKS_URL(1, 25))
|
||||
const listEmojiPacks = ({ page, pageSize }) => {
|
||||
return fetch(PLEROMA_EMOJI_PACKS_URL(page, pageSize))
|
||||
}
|
||||
|
||||
const listRemoteEmojiPacks = ({ instance }) => {
|
||||
const listRemoteEmojiPacks = ({ instance, page, pageSize }) => {
|
||||
if (!instance.startsWith('http')) {
|
||||
instance = 'https://' + instance
|
||||
}
|
||||
|
||||
return fetch(
|
||||
PLEROMA_EMOJI_PACKS_LS_REMOTE_URL(instance, 1, 25),
|
||||
PLEROMA_EMOJI_PACKS_LS_REMOTE_URL(instance, page, pageSize),
|
||||
{
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue