diff --git a/src/api/status.js b/src/api/status.js index 37f7e0c2..fcc820e0 100644 --- a/src/api/status.js +++ b/src/api/status.js @@ -30,6 +30,15 @@ export async function fetchStatuses({ godmode, localOnly, authHost, token, pageS }) } +export async function fetchStatusesCount(authHost, token) { + return await request({ + baseURL: baseName(authHost), + url: `/api/pleroma/admin/stats`, + method: 'get', + headers: authHeaders(token) + }) +} + export async function fetchStatusesByInstance({ instance, authHost, token, pageSize, page }) { return await request({ baseURL: baseName(authHost), diff --git a/src/lang/en.js b/src/lang/en.js index 8b8e9ff7..7311c097 100644 --- a/src/lang/en.js +++ b/src/lang/en.js @@ -241,12 +241,16 @@ export default { resendConfirmation: 'Resend confirmation email' }, statuses: { - statuses: 'Statuses by instance', + statuses: 'Statuses', instanceFilter: 'Instance filter', loadMore: 'Load more', noInstances: 'No other instances found', onlyLocalStatuses: 'Show only local statuses', - showPrivateStatuses: 'Show private statuses' + showPrivateStatuses: 'Show private statuses', + direct: 'Direct', + private: 'Private', + public: 'Public', + unlisted: 'Unlisted' }, userProfile: { tags: 'Tags', diff --git a/src/store/modules/status.js b/src/store/modules/status.js index e0cc5d97..8847e8bf 100644 --- a/src/store/modules/status.js +++ b/src/store/modules/status.js @@ -1,4 +1,4 @@ -import { changeStatusScope, deleteStatus, fetchStatuses, fetchStatusesByInstance } from '@/api/status' +import { changeStatusScope, deleteStatus, fetchStatuses, fetchStatusesCount, fetchStatusesByInstance } from '@/api/status' const status = { state: { @@ -12,7 +12,8 @@ const status = { pageSize: 20, buttonLoading: false, allLoaded: false - } + }, + statusVisibility: {} }, mutations: { CHANGE_GODMODE_CHECKBOX_VALUE: (state, value) => { @@ -41,6 +42,9 @@ const status = { }, SET_LOADING: (state, status) => { state.loading = status + }, + SET_STATUS_VISIBILITY: (state, visibility) => { + state.statusVisibility = visibility } }, actions: { @@ -64,6 +68,12 @@ const status = { dispatch('FetchStatusesByInstance') } }, + async FetchStatusesCount({ commit, getters }) { + commit('SET_LOADING', true) + const { data } = await fetchStatusesCount(getters.authHost, getters.token) + commit('SET_STATUS_VISIBILITY', data.status_visibility) + commit('SET_LOADING', false) + }, async FetchStatusesByInstance({ commit, getters, state, rootState }) { commit('SET_LOADING', true) if (state.statusesByInstance.selectedInstance === '') { diff --git a/src/views/emojiPacks/index.vue b/src/views/emojiPacks/index.vue index e13df39a..2757e3a4 100644 --- a/src/views/emojiPacks/index.vue +++ b/src/views/emojiPacks/index.vue @@ -155,7 +155,7 @@ export default { margin: 0 30px; } .emoji-packs-header { - margin: 22px 0 20px 15px; + margin: 10px 0 20px 15px; } .import-pack-button { margin-left: 10px; diff --git a/src/views/invites/index.vue b/src/views/invites/index.vue index 2497bfc0..60111430 100644 --- a/src/views/invites/index.vue +++ b/src/views/invites/index.vue @@ -246,7 +246,7 @@ export default { padding: 5px 20px 0 20px } h1 { - margin: 22px 0 0 15px; + margin: 10px 0 0 15px; } .icon { margin-right: 5px; diff --git a/src/views/moderation_log/index.vue b/src/views/moderation_log/index.vue index 2e249b80..9dcee370 100644 --- a/src/views/moderation_log/index.vue +++ b/src/views/moderation_log/index.vue @@ -130,7 +130,7 @@ export default { margin: 0 15px; } h1 { - margin: 22px 0 20px 0; + margin: 10px 0 20px 0; } .el-timeline { margin: 25px 45px 0 0; diff --git a/src/views/reports/index.vue b/src/views/reports/index.vue index 64993da3..729cbe64 100644 --- a/src/views/reports/index.vue +++ b/src/views/reports/index.vue @@ -50,7 +50,7 @@ export default { padding-bottom: 0 } h1 { - margin: 22px 0 0 15px; + margin: 10px 0 0 15px; } .no-reports-message { color: gray; diff --git a/src/views/settings/styles/main.scss b/src/views/settings/styles/main.scss index 562308b5..8e6cb4cf 100644 --- a/src/views/settings/styles/main.scss +++ b/src/views/settings/styles/main.scss @@ -444,7 +444,7 @@ margin: 0; } .settings-header-container { - margin: 15px; + margin: 10px 15px 15px 15px; } .nav-container { display: flex; diff --git a/src/views/statuses/index.vue b/src/views/statuses/index.vue index 74e3f55b..88bfab6c 100644 --- a/src/views/statuses/index.vue +++ b/src/views/statuses/index.vue @@ -3,6 +3,12 @@