diff --git a/routes/_api/followsAndFollowers.js b/routes/_api/followsAndFollowers.js new file mode 100644 index 0000000..607e5ce --- /dev/null +++ b/routes/_api/followsAndFollowers.js @@ -0,0 +1,14 @@ +import { getWithTimeout, paramsString } from '../_utils/ajax' +import { auth, basename } from './utils' + +export async function getFollows (instanceName, accessToken, accountId, limit = 80) { + let url = `${basename(instanceName)}/api/v1/accounts/${accountId}/following` + url += '?' + paramsString({ limit }) + return getWithTimeout(url, auth(accessToken)) +} + +export async function getFollowers (instanceName, accessToken, accountId, limit = 80) { + let url = `${basename(instanceName)}/api/v1/accounts/${accountId}/followers` + url += '?' + paramsString({ limit }) + return getWithTimeout(url, auth(accessToken)) +} diff --git a/routes/_components/profile/AccountProfileDetails.html b/routes/_components/profile/AccountProfileDetails.html index 4a89b5b..bf8d34a 100644 --- a/routes/_components/profile/AccountProfileDetails.html +++ b/routes/_components/profile/AccountProfileDetails.html @@ -8,20 +8,24 @@
- - Follows - - - {{numFollowingDisplay}} - + + + +
- - Followers - - - {{numFollowersDisplay}} - + + + +
{{#if account && verifyCredentials && account.id !== verifyCredentials.id}} @@ -130,4 +134,4 @@ IconButton } } - \ No newline at end of file + diff --git a/routes/_pages/accounts/[accountId]/followers.html b/routes/_pages/accounts/[accountId]/followers.html new file mode 100644 index 0000000..f2f711d --- /dev/null +++ b/routes/_pages/accounts/[accountId]/followers.html @@ -0,0 +1,20 @@ + + + diff --git a/routes/_pages/accounts/[accountId]/follows.html b/routes/_pages/accounts/[accountId]/follows.html new file mode 100644 index 0000000..d2a3151 --- /dev/null +++ b/routes/_pages/accounts/[accountId]/follows.html @@ -0,0 +1,20 @@ + + + diff --git a/routes/accounts/[accountId]/followers.html b/routes/accounts/[accountId]/followers.html new file mode 100644 index 0000000..b6a155e --- /dev/null +++ b/routes/accounts/[accountId]/followers.html @@ -0,0 +1,21 @@ +<:Head> + Pinafore – Followers + + + + + diff --git a/routes/accounts/[accountId]/follows.html b/routes/accounts/[accountId]/follows.html new file mode 100644 index 0000000..214488c --- /dev/null +++ b/routes/accounts/[accountId]/follows.html @@ -0,0 +1,21 @@ +<:Head> + Pinafore – Follows + + + + +