Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
88f6e32e
Commit
88f6e32e
authored
Jun 05, 2019
by
Lyza Danger Gardner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Put help icon into top bar
parent
1975fcdd
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
7 deletions
+28
-7
account.svg
src/images/icons/account.svg
+2
-2
help.svg
src/images/icons/help.svg
+3
-0
share.svg
src/images/icons/share.svg
+2
-2
svg-icon.js
src/sidebar/components/svg-icon.js
+1
-0
top-bar-test.js
src/sidebar/components/test/top-bar-test.js
+14
-3
top-bar.html
src/sidebar/templates/top-bar.html
+6
-0
No files found.
src/images/icons/account.svg
View file @
88f6e32e
...
...
@@ -5,9 +5,9 @@
<desc>
Created with Sketch.
</desc>
<defs></defs>
<g
id=
"Page-1"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
sketch:type=
"MSPage"
>
<g
id=
"Artboard-1-Copy"
sketch:type=
"MSArtboardGroup"
fill=
"
#000000
"
>
<g
id=
"Artboard-1-Copy"
sketch:type=
"MSArtboardGroup"
fill=
"
currentColor
"
>
<circle
id=
"Oval-1"
sketch:type=
"MSShapeGroup"
cx=
"8"
cy=
"4"
r=
"3"
></circle>
<path
d=
"M8,15 C11,15 14,14.4329966 14,12 C14,10.5670034 10,8 8,8 C6,8 2,10.5670034 2,12 C2,14.4329966 5,15 8,15 Z"
id=
"Oval-1-Copy"
sketch:type=
"MSShapeGroup"
></path>
</g>
</g>
</svg>
\ No newline at end of file
</svg>
src/images/icons/help.svg
0 → 100644
View file @
88f6e32e
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"16"
height=
"16"
viewBox=
"0 0 16 16"
>
<path
fill=
"currentColor"
fill-rule=
"nonzero"
d=
"M8 16A8 8 0 1 1 8 0a8 8 0 0 1 0 16zm-.5-5.805c.496 0 .768-.29.873-.788.091-.623.3-.943 1.23-1.515.987-.616 1.497-1.381 1.497-2.503C11.1 3.66 9.765 2.5 7.779 2.5c-1.503 0-2.622.631-3.07 1.612-.14.282-.209.564-.209.884 0 .564.343.928.895.928.426 0 .741-.208.916-.683.224-.661.685-1.018 1.37-1.018.77 0 1.3.505 1.3 1.233 0 .683-.272 1.055-1.174 1.627-.825.512-1.251 1.092-1.251 1.968v.104c0 .609.35 1.04.943 1.04zm.013 3.305c.637 0 1.147-.512 1.147-1.166 0-.654-.51-1.166-1.147-1.166-.629 0-1.14.512-1.14 1.166 0 .654.511 1.166 1.14 1.166z"
/>
</svg>
src/images/icons/share.svg
View file @
88f6e32e
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"16"
height=
"16"
viewBox=
"0 0 16 16"
>
<path
fill=
"#000"
fill-rule=
"nonzero"
d=
"M16 1.656v3.5c0 .587-.721.874-1.138.464l-.992-.977-6.764 6.66a.674.674 0 0 1-.943 0l-.629-.62a.649.649 0 0 1 0-.927l6.765-6.66-.992-.976c-.419-.412-.122-1.12.471-1.12h3.555c.369 0 .667.294.667.656zm-4.694 6.749c.42-.414 1.138-.121 1.138.464v4.819c0 .724-.597 1.312-1.333 1.312H1.333A1.323 1.323 0 0 1 0 13.687V4.063C0 3.338.597 2.75 1.333 2.75h8.223c.593 0 .89.707.47 1.12l-.444.438a.772.772 0 0 1-.47.192H1.777v8.75h8.889V9.306c0-.15.087-.358.195-.464l.444-.437z"
/>
</svg>
\ No newline at end of file
<path
fill=
"currentColor"
fill-rule=
"nonzero"
d=
"M16 1.656v3.5c0 .587-.721.874-1.138.464l-.992-.977-6.764 6.66a.674.674 0 0 1-.943 0l-.629-.62a.649.649 0 0 1 0-.927l6.765-6.66-.992-.976c-.419-.412-.122-1.12.471-1.12h3.555c.369 0 .667.294.667.656zm-4.694 6.749c.42-.414 1.138-.121 1.138.464v4.819c0 .724-.597 1.312-1.333 1.312H1.333A1.323 1.323 0 0 1 0 13.687V4.063C0 3.338.597 2.75 1.333 2.75h8.223c.593 0 .89.707.47 1.12l-.444.438a.772.772 0 0 1-.47.192H1.777v8.75h8.889V9.306c0-.15.087-.358.195-.464l.444-.437z"
/>
</svg>
src/sidebar/components/svg-icon.js
View file @
88f6e32e
...
...
@@ -11,6 +11,7 @@ const icons = {
'expand-menu'
:
require
(
'../../images/icons/expand-menu.svg'
),
copy
:
require
(
'../../images/icons/copy.svg'
),
cursor
:
require
(
'../../images/icons/cursor.svg'
),
help
:
require
(
'../../images/icons/help.svg'
),
leave
:
require
(
'../../images/icons/leave.svg'
),
refresh
:
require
(
'../../images/icons/refresh.svg'
),
share
:
require
(
'../../images/icons/share.svg'
),
...
...
src/sidebar/components/test/top-bar-test.js
View file @
88f6e32e
...
...
@@ -41,6 +41,10 @@ describe('topBar', function() {
return
el
.
querySelector
(
'.top-bar__apply-update-btn'
);
}
function
helpBtn
(
el
)
{
return
el
.
querySelector
(
'.top-bar__help-btn'
);
}
function
createTopBar
(
inputs
)
{
const
defaultInputs
=
{
isSidebar
:
true
,
...
...
@@ -79,6 +83,16 @@ describe('topBar', function() {
assert
.
called
(
onApplyPendingUpdates
);
});
it
(
'shows help when help icon clicked'
,
function
()
{
const
onShowHelpPanel
=
sinon
.
stub
();
const
el
=
createTopBar
({
onShowHelpPanel
:
onShowHelpPanel
,
});
const
help
=
helpBtn
(
el
[
0
]);
help
.
click
();
assert
.
called
(
onShowHelpPanel
);
});
it
(
'displays the login control and propagates callbacks'
,
function
()
{
const
onShowHelpPanel
=
sinon
.
stub
();
const
onLogin
=
sinon
.
stub
();
...
...
@@ -90,9 +104,6 @@ describe('topBar', function() {
});
const
loginControl
=
el
.
find
(
'login-control'
).
controller
(
'loginControl'
);
loginControl
.
onShowHelpPanel
();
assert
.
called
(
onShowHelpPanel
);
loginControl
.
onLogin
();
assert
.
called
(
onLogin
);
...
...
src/sidebar/templates/top-bar.html
View file @
88f6e32e
...
...
@@ -49,6 +49,12 @@
aria-label=
"Share this page"
>
<i
class=
"h-icon-annotation-share"
></i>
</button>
<button
class=
"top-bar__btn top-bar__help-btn"
ng-click=
"vm.onShowHelpPanel()"
title=
"Help"
aria-label=
"Help"
>
<svg-icon
name=
"'help'"
></svg-icon>
</button>
<login-control
class=
"login-control"
auth=
"vm.auth"
...
...
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