Add reports management (#186)
implements part of #178, other parts will come later Co-authored-by: Sol Fisher Romanoff <sol@solfisher.com> Reviewed-on: https://akkoma.dev/AkkomaGang/pleroma-fe/pulls/186 Co-authored-by: sfr <sol@solfisher.com> Co-committed-by: sfr <sol@solfisher.com>
This commit is contained in:
parent
23b0b01829
commit
15bac1e401
30 changed files with 1082 additions and 32 deletions
|
@ -163,6 +163,7 @@ const api = {
|
|||
dispatch('startFetchingTimeline', { timeline: 'friends' })
|
||||
dispatch('startFetchingNotifications')
|
||||
dispatch('startFetchingAnnouncements')
|
||||
dispatch('startFetchingReports')
|
||||
dispatch('pushGlobalNotice', {
|
||||
level: 'error',
|
||||
messageKey: 'timeline.socket_broke',
|
||||
|
@ -280,6 +281,19 @@ const api = {
|
|||
if (!fetcher) return
|
||||
store.commit('removeFetcher', { fetcherName: 'announcements', fetcher })
|
||||
},
|
||||
|
||||
// Reports
|
||||
startFetchingReports (store) {
|
||||
if (store.state.fetchers['reports']) return
|
||||
const fetcher = store.state.backendInteractor.startFetchingReports({ store })
|
||||
store.commit('addFetcher', { fetcherName: 'reports', fetcher })
|
||||
},
|
||||
stopFetchingReports (store) {
|
||||
const fetcher = store.state.fetchers.reports
|
||||
if (!fetcher) return
|
||||
store.commit('removeFetcher', { fetcherName: 'reports', fetcher })
|
||||
},
|
||||
|
||||
getSupportedTranslationlanguages (store) {
|
||||
store.state.backendInteractor.getSupportedTranslationlanguages({ store })
|
||||
.then((data) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue