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 Revoke token
{{/confirm-action}} {{/confirm-action}}
</li> </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}} {{else}}
<li class="action text-right"> <li class="action text-right">
{{#confirm-action {{#confirm-action
@ -50,6 +60,16 @@
Revoke token Revoke token
{{/confirm-action}} {{/confirm-action}}
</li> </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}}
{{/if}} {{/if}}
<li class="action"> <li class="action">

View File

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