diff --git a/CHANGELOG.md b/CHANGELOG.md index d604a408..0a193e23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased +### Added + +- Create `/statuses/:id` route that shows single status + ### Changed - Statuses count changes when an instance is selected and shows the amount of statuses from an originating instance @@ -18,6 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Fixed - Send `true` and `false` as booleans if they are values of single selects on the Settings page +- Fix sorting users on Users page if there is an acount with missing nickname or ID ## [2.0.3] - 2020-04-29 diff --git a/src/api/__mocks__/status.js b/src/api/__mocks__/status.js index ec5271cc..ec727650 100644 --- a/src/api/__mocks__/status.js +++ b/src/api/__mocks__/status.js @@ -6,6 +6,29 @@ export async function deleteStatus(id, authHost, token) { return Promise.resolve() } +export async function fetchStatus(id, authHost, token) { + const data = { + account: { + id: '9n1bySks25olxWrku0', + avatar: 'http://localhost:4000/images/avi.png', + display_name: 'dolin', + tags: ['strip_media', 'sandbox', 'disable_any_subscription', 'force_nsfw'], + url: 'http://localhost:4000/users/dolin' + }, + content: 'pizza makes everything better', + created_at: '2020-05-22T17:34:34.000Z', + id: '9vJOO3iFPyjNaEhJ5s', + media_attachments: [], + poll: null, + sensitive: false, + spoiler_text: '', + visibility: 'public', + url: 'http://localhost:4000/notice/9vJOO3iFPyjNaEhJ5s' + } + + return Promise.resolve({ data }) +} + export async function fetchStatusesByInstance({ instance, authHost, token, pageSize, page }) { let data if (pageSize === 1) { diff --git a/src/api/__mocks__/users.js b/src/api/__mocks__/users.js index 3e4975ef..99f32543 100644 --- a/src/api/__mocks__/users.js +++ b/src/api/__mocks__/users.js @@ -6,7 +6,11 @@ export let users = [ const userProfile = { avatar: 'avatar.jpg', nickname: 'allis', id: '2', tags: [], roles: { admin: true, moderator: false }, local: true, external: false } -const userStatuses = [] +const userStatuses = [ + { account: { id: '9n1bySks25olxWrku0', display_name: 'dolin' }, content: 'pizza makes everything better', id: '9vJOO3iFPyjNaEhJ5s', created_at: '2020-05-22T17:34:34.000Z', visibility: 'public' }, + { account: { id: '9n1bySks25olxWrku0', display_name: 'dolin' }, content: 'pizza time', id: '9vJPD5XKOdzQ0bvGLY', created_at: '2020-05-22T17:34:34.000Z', visibility: 'public' }, + { account: { id: '9n1bySks25olxWrku0', display_name: 'dolin' }, content: 'what is yout favorite pizza?', id: '9jop82OBXeFPYulVjM', created_at: '2020-05-22T17:34:34.000Z', visibility: 'public' } +] const filterUsers = (str) => { const filters = str.split(',').filter(item => item.length > 0) diff --git a/src/api/status.js b/src/api/status.js index e3bb3fd4..0f3455c7 100644 --- a/src/api/status.js +++ b/src/api/status.js @@ -21,6 +21,15 @@ export async function deleteStatus(id, authHost, token) { }) } +export async function fetchStatus(id, authHost, token) { + return await request({ + baseURL: baseName(authHost), + url: `/api/pleroma/admin/statuses/${id}`, + method: 'get', + headers: authHeaders(token) + }) +} + export async function fetchStatuses({ godmode, localOnly, authHost, token, pageSize, page }) { return await request({ baseURL: baseName(authHost), diff --git a/src/components/Status/index.vue b/src/components/Status/index.vue index bde254e5..90185840 100644 --- a/src/components/Status/index.vue +++ b/src/components/Status/index.vue @@ -1,86 +1,74 @@ + + diff --git a/src/views/users/components/ModerationDropdown.vue b/src/views/users/components/ModerationDropdown.vue index 57d56562..ef5e2395 100644 --- a/src/views/users/components/ModerationDropdown.vue +++ b/src/views/users/components/ModerationDropdown.vue @@ -1,11 +1,11 @@ - -
-

Password reset token was generated: {{ passwordResetToken }}

-

You can also use this link to reset password: - {{ passwordResetLink }} -

-
-
+ - -
-

Password reset token was generated: {{ passwordResetToken }}

-

You can also use this link to reset password: - {{ passwordResetLink }} -

-
-
+