Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
SiB Notifications
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
7
Issues
7
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Startin blox
framework
SiB Notifications
Commits
c595706e
Commit
c595706e
authored
Jan 22, 2020
by
Matthieu Fesselier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix: update badge when new notification
parent
9aa6ccee
Pipeline
#7121
passed with stage
in 1 minute and 31 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
sib-badge.js
sib-badge.js
+5
-3
sib-notifications.js
sib-notifications.js
+2
-0
No files found.
sib-badge.js
View file @
c595706e
...
...
@@ -7,7 +7,7 @@ Helpers.importCSS(`${base_url}/css/badge.css`);
class
SIBBadge
extends
SIBTemplateElement
{
constructor
()
{
super
()
super
()
;
// On read events, remove badge
window
.
addEventListener
(
'
read
'
,
event
=>
{
...
...
@@ -18,7 +18,9 @@ class SIBBadge extends SIBTemplateElement {
event
.
detail
.
resource
[
'
@id
'
]
==
this
.
resourceId
)
{
this
.
querySelector
(
'
.counter
'
).
remove
();
}
})
});
window
.
addEventListener
(
'
notificationsRefresh
'
,
this
.
render
.
bind
(
this
));
}
get
resourceId
()
{
...
...
@@ -38,7 +40,7 @@ class SIBBadge extends SIBTemplateElement {
<sib-display
bind-user
nested-field="inbox"
fields
="none"
fields
search-fields="unread, object"
search-value-unread="true"
search-value-object="
${
this
.
resourceId
}
"
...
...
sib-notifications.js
View file @
c595706e
...
...
@@ -89,6 +89,8 @@ class SIBNotifications extends SIBTemplateElement {
const
notifications
=
this
.
_getNotificationsList
();
if
(
notifications
)
notifications
.
clearCache
();
// clear container cache
this
.
render
();
window
.
dispatchEvent
(
new
CustomEvent
(
'
notificationsRefresh
'
,
{
bubbles
:
true
}));
}
/* Events listeners */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment