add link to copy current token from user status bar (#6063)

This commit is contained in:
Noelle Daley 2019-01-17 11:24:49 -08:00 committed by GitHub
parent 159f0c1b0a
commit 3bacca85b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 5 deletions

View File

@ -34,6 +34,16 @@
Revoke token
{{/confirm-action}}
</li>
<li class="action">
<CopyButton
@clipboardText={{auth.currentToken}}
class="link button"
@buttonType="button"
@success={{action (set-flash-message 'Token copied!')}}
>
Copy token
</CopyButton>
</li>
{{else}}
<li class="action text-right">
{{#confirm-action
@ -50,6 +60,16 @@
Revoke token
{{/confirm-action}}
</li>
<li class="action">
<CopyButton
@clipboardText={{auth.currentToken}}
class="link button"
@buttonType="button"
@success={{action (set-flash-message 'Token copied!')}}
>
Copy token
</CopyButton>
</li>
{{/if}}
{{/if}}
<li class="action">

View File

@ -1,10 +1,6 @@
{{#basic-dropdown-hover horizontalPosition="auto-left" verticalPosition="below" renderInPlace=media.isMobile as |d|}}
{{#d.trigger tagName=(if (eq type "replication") "span" "button") class=(if (eq type "replication") "" "button is-transparent")}}
{{i-con
glyph=glyphName
size=24
aria-label=ariaLabel
}}
<ICon @glyph={{glyphName}} @size=24 @aria-label={{ariaLabel}} />
<div class="status-menu-label">
{{label}}
</div>