Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pleroma-fe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
pleroma-fe
Commits
ef515056
There was a problem fetching the pipeline summary.
Commit
ef515056
authored
6 years ago
by
HJ
Browse files
Options
Downloads
Patches
Plain Diff
missing files and a plug for bad favs
parent
d085cc85
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!306
Support qvitter api notifications
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/notification/notification.vue
+5
-2
5 additions, 2 deletions
src/components/notification/notification.vue
src/services/notifications_fetcher/notifications_fetcher.service.js
+41
-0
41 additions, 0 deletions
...es/notifications_fetcher/notifications_fetcher.service.js
with
46 additions
and
2 deletions
src/components/notification/notification.vue
+
5
−
2
View file @
ef515056
...
...
@@ -24,12 +24,15 @@
<small>
{{
$t
(
'
notifications.followed_you
'
)
}}
</small>
</span>
</div>
<small
class=
"timeago"
><router-link
:to=
"
{ name: 'conversation', params: { id: notification.status.id } }">
<timeago
:since=
"notification.action.created_at"
:auto-update=
"240"
></timeago></router-link></small>
<small
class=
"timeago"
><router-link
v-if=
"notification.status"
:to=
"
{ name: 'conversation', params: { id: notification.status.id } }">
<timeago
:since=
"notification.action.created_at"
:auto-update=
"240"
></timeago></router-link></small>
</span>
<div
class=
"follow-text"
v-if=
"notification.type === 'follow'"
>
<router-link
:to=
"
{ name: 'user-profile', params: { id: notification.action.user.id } }">@
{{
notification
.
action
.
user
.
screen_name
}}
</router-link>
</div>
<status
v-else
class=
"faint"
:compact=
"true"
:statusoid=
"notification.status"
:noHeading=
"true"
></status>
<status
v-if=
"notification.status"
v-else
class=
"faint"
:compact=
"true"
:statusoid=
"notification.status"
:noHeading=
"true"
></status>
<div
v-if=
"!notification.status"
>
Favorite for missing post
</div>
</div>
</div>
</
template
>
...
...
This diff is collapsed.
Click to expand it.
src/services/notifications_fetcher/notifications_fetcher.service.js
0 → 100644
+
41
−
0
View file @
ef515056
import
apiService
from
'
../api/api.service.js
'
const
update
=
({
store
,
notifications
,
older
})
=>
{
store
.
dispatch
(
'
setNotificationsError
'
,
{
value
:
false
})
store
.
dispatch
(
'
addNewNotifications
'
,
{
notifications
,
older
})
}
const
fetchAndUpdate
=
({
store
,
credentials
,
older
=
false
})
=>
{
const
args
=
{
credentials
}
const
rootState
=
store
.
rootState
||
store
.
state
const
timelineData
=
rootState
.
statuses
.
notifications
if
(
older
)
{
if
(
timelineData
.
minId
!==
Number
.
POSITIVE_INFINITY
)
{
args
[
'
until
'
]
=
timelineData
.
minId
}
}
else
{
args
[
'
since
'
]
=
timelineData
.
maxId
}
args
[
'
timeline
'
]
=
'
notifications
'
return
apiService
.
fetchTimeline
(
args
)
.
then
((
notifications
)
=>
{
update
({
store
,
notifications
,
older
})
},
()
=>
store
.
dispatch
(
'
setNotificationsError
'
,
{
value
:
true
}))
}
const
startFetching
=
({
credentials
,
store
})
=>
{
fetchAndUpdate
({
credentials
,
store
})
const
boundFetchAndUpdate
=
()
=>
fetchAndUpdate
({
credentials
,
store
})
return
setInterval
(
boundFetchAndUpdate
,
10000
)
}
const
notificationsFetcher
=
{
fetchAndUpdate
,
startFetching
}
export
default
notificationsFetcher
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