diff --git a/bin/svgs.js b/bin/svgs.js index 223888e..8ca2e06 100644 --- a/bin/svgs.js +++ b/bin/svgs.js @@ -21,6 +21,8 @@ module.exports = [ {id: 'fa-search', src: 'node_modules/font-awesome-svg-png/white/svg/search.svg', title: 'Search'}, {id: 'fa-comments', src: 'node_modules/font-awesome-svg-png/white/svg/comments.svg', title: 'Conversations'}, {id: 'fa-paperclip', src: 'node_modules/font-awesome-svg-png/white/svg/paperclip.svg', title: 'Paperclip'}, - {id: 'fa-thumbtack', src: 'node_modules/font-awesome-svg-png/white/svg/thumb-tack.svg', title: 'Thumbtack'}, - {id: 'fa-bars', src: 'node_modules/font-awesome-svg-png/white/svg/bars.svg', title: 'List'} + {id: 'fa-thumb-tack', src: 'node_modules/font-awesome-svg-png/white/svg/thumb-tack.svg', title: 'Thumbtack'}, + {id: 'fa-bars', src: 'node_modules/font-awesome-svg-png/white/svg/bars.svg', title: 'List'}, + {id: 'fa-volume-off', src: 'node_modules/font-awesome-svg-png/white/svg/volume-off.svg', title: 'Volume off'}, + {id: 'fa-ban', src: 'node_modules/font-awesome-svg-png/white/svg/ban.svg', title: 'Ban'}, ] diff --git a/routes/_api/blockedAndMuted.js b/routes/_api/blockedAndMuted.js new file mode 100644 index 0000000..da0b270 --- /dev/null +++ b/routes/_api/blockedAndMuted.js @@ -0,0 +1,17 @@ +import { get, paramsString } from '../_utils/ajax' + +export async function getBlockedAccounts(instanceName, accessToken, limit = 80) { + let url = `https://${instanceName}/api/v1/blocks` + url += '?' + paramsString({ limit }) + return get(url, { + 'Authorization': `Bearer ${accessToken}` + }) +} + +export async function getMutedAccounts(instanceName, accessToken, limit = 80) { + let url = `https://${instanceName}/api/v1/mutes` + url += '?' + paramsString({ limit }) + return get(url, { + 'Authorization': `Bearer ${accessToken}` + }) +} \ No newline at end of file diff --git a/routes/_api/pinnedStatuses.js b/routes/_api/pinnedStatuses.js new file mode 100644 index 0000000..e8c6854 --- /dev/null +++ b/routes/_api/pinnedStatuses.js @@ -0,0 +1,12 @@ +import { get, paramsString } from '../_utils/ajax' + +export async function getPinnedStatuses(instanceName, accessToken, accountId) { + let url = `https://${instanceName}/api/v1/accounts/${accountId}/statuses` + url += '?' + paramsString({ + limit: 40, + pinned: true + }) + return get(url, { + 'Authorization': `Bearer ${accessToken}` + }) +} \ No newline at end of file diff --git a/routes/_api/reblogsAndFavs.js b/routes/_api/reblogsAndFavs.js index f59b800..a6d1a53 100644 --- a/routes/_api/reblogsAndFavs.js +++ b/routes/_api/reblogsAndFavs.js @@ -1,7 +1,5 @@ import { get, paramsString } from '../_utils/ajax' -// TODO: paginate - export async function getReblogs(instanceName, accessToken, statusId, limit = 80) { let url = `https://${instanceName}/api/v1/statuses/${statusId}/reblogged_by` url += '?' + paramsString({ limit }) diff --git a/routes/_components/AccountsListPage.html b/routes/_components/AccountsListPage.html index 286fa87..575c641 100644 --- a/routes/_components/AccountsListPage.html +++ b/routes/_components/AccountsListPage.html @@ -13,6 +13,7 @@ .accounts-page { min-height: 60vh; padding: 20px 20px; + position: relative; } .accounts-results { list-style: none; @@ -36,11 +37,9 @@ export default { async oncreate() { let accountsFetcher = this.get('accountsFetcher') - let statusId = this.get('statusId') - let instanceName = this.store.get('currentInstance') - let accessToken = this.store.get('accessToken') try { - let accounts = await accountsFetcher(instanceName, accessToken, statusId) + // TODO: paginate + let accounts = await accountsFetcher() this.set({ accounts: accounts }) } catch (e) { toast.say('Error: ' + (e.name || '') + ' ' + (e.message || '')) diff --git a/routes/blocked.html b/routes/blocked.html new file mode 100644 index 0000000..c324799 --- /dev/null +++ b/routes/blocked.html @@ -0,0 +1,28 @@ +<:Head> +