BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
3ef0ab72
Unverified
Commit
3ef0ab72
authored
Jan 12, 2018
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add tooltip for notifications icon in collapsed sidebar
parent
5d444418
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
3 deletions
+23
-3
subscriptions.vue
...cripts/sidebar/components/subscriptions/subscriptions.vue
+23
-3
No files found.
app/assets/javascripts/sidebar/components/subscriptions/subscriptions.vue
View file @
3ef0ab72
<
script
>
import
{
__
}
from
'~/locale'
;
import
icon
from
'~/vue_shared/components/icon.vue'
;
import
toggleButton
from
'~/vue_shared/components/toggle_button.vue'
;
import
tooltip
from
'~/vue_shared/directives/tooltip'
;
import
eventHub
from
'../../event_hub'
;
import
icon
from
'../../../vue_shared/components/icon.vue'
;
import
toggleButton
from
'../../../vue_shared/components/toggle_button.vue'
;
const
ICON_ON
=
'notifications'
;
const
ICON_OFF
=
'notifications-off'
;
const
LABEL_ON
=
__
(
'Notifications on'
);
const
LABEL_OFF
=
__
(
'Notifications off'
);
export
default
{
directives
:
{
tooltip
,
},
components
:
{
icon
,
toggleButton
,
...
...
@@ -30,8 +40,11 @@
return
this
.
subscribed
===
null
||
this
.
loading
;
},
notificationIcon
()
{
return
this
.
subscribed
?
'notifications'
:
'notifications-off'
;
return
this
.
subscribed
?
ICON_ON
:
ICON_OFF
;
},
notificationTooltip
()
{
return
this
.
subscribed
?
LABEL_ON
:
LABEL_OFF
;
}
},
methods
:
{
toggleSubscription
()
{
...
...
@@ -44,12 +57,19 @@
<
template
>
<div>
<div
class=
"sidebar-collapsed-icon"
>
<span
v-tooltip
:title=
"notificationTooltip"
data-container=
"body"
data-placement=
"left"
>
<icon
:name=
"notificationIcon"
:size=
"16"
aria-hidden=
"true"
class=
"sidebar-item-icon is-active"
/>
</span>
</div>
<span
class=
"issuable-header-text hide-collapsed pull-left"
>
{{
__
(
'Notifications'
)
}}
...
...
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