Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
admin-fe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pleroma
admin-fe
Commits
566d0fef
Commit
566d0fef
authored
5 years ago
by
Angelina Filippova
Browse files
Options
Downloads
Patches
Plain Diff
Show current instance's statuses
parent
d611c7d0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!99
Add ability to see local statuses on Statuses by instance tab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/store/modules/status.js
+24
-14
24 additions, 14 deletions
src/store/modules/status.js
src/views/statuses/index.vue
+2
-1
2 additions, 1 deletion
src/views/statuses/index.vue
with
26 additions
and
15 deletions
src/store/modules/status.js
+
24
−
14
View file @
566d0fef
...
...
@@ -50,23 +50,33 @@ const status = {
},
async
FetchStatuses
({
commit
,
getters
},
{
godmode
,
localOnly
})
{
commit
(
'
SET_LOADING
'
,
true
)
await
fetchStatuses
({
godmode
,
localOnly
,
authHost
:
getters
.
authHost
,
token
:
getters
.
token
})
const
statuses
=
await
fetchStatuses
({
godmode
,
localOnly
,
authHost
:
getters
.
authHost
,
token
:
getters
.
token
})
commit
(
'
SET_STATUSES_BY_INSTANCE
'
,
statuses
.
data
)
commit
(
'
SET_LOADING
'
,
false
)
},
async
FetchStatusesByInstance
({
commit
,
getters
,
state
})
{
async
FetchStatusesByInstance
({
commit
,
getters
,
state
,
rootState
})
{
commit
(
'
SET_LOADING
'
,
true
)
const
statuses
=
state
.
statusesByInstance
.
selectedInstance
===
''
?
{
data
:
[]
}
:
await
fetchStatusesByInstance
(
{
instance
:
state
.
statusesByInstance
.
selectedInstance
,
authHost
:
getters
.
authHost
,
token
:
getters
.
token
,
pageSize
:
state
.
statusesByInstance
.
pageSize
,
page
:
state
.
statusesByInstance
.
page
})
commit
(
'
SET_STATUSES_BY_INSTANCE
'
,
statuses
.
data
)
if
(
state
.
statusesByInstance
.
selectedInstance
===
''
)
{
commit
(
'
SET_STATUSES_BY_INSTANCE
'
,
[])
}
else
{
const
statuses
=
state
.
statusesByInstance
.
selectedInstance
===
rootState
.
user
.
authHost
?
await
fetchStatuses
(
{
godmode
:
false
,
localOnly
:
false
,
authHost
:
getters
.
authHost
,
token
:
getters
.
token
})
:
await
fetchStatusesByInstance
(
{
instance
:
state
.
statusesByInstance
.
selectedInstance
,
authHost
:
getters
.
authHost
,
token
:
getters
.
token
,
pageSize
:
state
.
statusesByInstance
.
pageSize
,
page
:
state
.
statusesByInstance
.
page
})
commit
(
'
SET_STATUSES_BY_INSTANCE
'
,
statuses
.
data
)
}
commit
(
'
SET_LOADING
'
,
false
)
},
async
FetchStatusesPageByInstance
({
commit
,
getters
,
state
})
{
...
...
This diff is collapsed.
Click to expand it.
src/views/statuses/index.vue
+
2
−
1
View file @
566d0fef
...
...
@@ -22,6 +22,7 @@
:selected-users=
"selectedUsers"
@
apply-action=
"clearSelection"
/>
</div>
<p
v-if=
"statuses.length === 0"
class=
"no-statuses"
>
{{
$t
(
'
userProfile.noStatuses
'
)
}}
</p>
<div
v-for=
"status in statuses"
:key=
"status.id"
class=
"status-container"
>
<status
:status=
"status"
...
...
@@ -52,7 +53,7 @@ export default {
},
computed
:
{
instances
()
{
return
[
'
Local
statuse
s
'
,
...
this
.
$store
.
state
.
peers
.
fetchedPeers
]
return
[
this
.
$store
.
stat
e
.
use
r
.
authHost
,
...
this
.
$store
.
state
.
peers
.
fetchedPeers
]
},
isDesktop
()
{
return
this
.
$store
.
state
.
app
.
device
===
'
desktop
'
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment