|
1 |
| -<div class={{if api_token.isNew "row create-token" "row"}}> |
| 1 | +<div class={{if this.api_token.isNew "row create-token" "row"}}> |
2 | 2 | <div class='name'>
|
3 |
| - {{#if api_token.isNew}} |
| 3 | + {{#if this.api_token.isNew}} |
4 | 4 | <Input
|
5 |
| - @type="text" placeholder="New token name" |
6 |
| - @disabled={{api_token.isSaving}} |
7 |
| - @value={{api_token.name}} |
| 5 | + @type="text" |
| 6 | + placeholder="New token name" |
| 7 | + @disabled={{this.api_token.isSaving}} |
| 8 | + @value={{this.api_token.name}} |
8 | 9 | @autofocus="autofocus"
|
9 | 10 | @enter="saveToken"
|
10 | 11 | data-test-focused-input
|
11 | 12 | />
|
12 | 13 | {{else}}
|
13 |
| - {{ api_token.name }} |
| 14 | + {{ this.api_token.name }} |
14 | 15 | {{/if}}
|
15 | 16 | </div>
|
16 | 17 |
|
17 | 18 | <div class='spacer'></div>
|
18 | 19 |
|
19 |
| - {{#unless api_token.isNew}} |
| 20 | + {{#unless this.api_token.isNew}} |
20 | 21 | <div class='dates'>
|
21 | 22 | <div class='created-at'>
|
22 |
| - <span class='small' title={{api_token.created_at}}> |
23 |
| - Created {{moment-from-now api_token.created_at}} |
| 23 | + <span class='small' title={{this.api_token.created_at}}> |
| 24 | + Created {{moment-from-now this.api_token.created_at}} |
24 | 25 | </span>
|
25 | 26 | </div>
|
26 |
| - {{#if api_token.last_used_at}} |
| 27 | + {{#if this.api_token.last_used_at}} |
27 | 28 | <div class='last_used_at'>
|
28 |
| - <span class='small' title={{api_token.last_used_at}}> |
29 |
| - Last used {{moment-from-now api_token.last_used_at}} |
| 29 | + <span class='small' title={{this.api_token.last_used_at}}> |
| 30 | + Last used {{moment-from-now this.api_token.last_used_at}} |
30 | 31 | </span>
|
31 | 32 | </div>
|
32 | 33 | {{else}}
|
|
38 | 39 | {{/unless}}
|
39 | 40 |
|
40 | 41 | <div class='actions'>
|
41 |
| - {{#if api_token.isNew}} |
| 42 | + {{#if this.api_token.isNew}} |
42 | 43 | <button
|
43 | 44 | type="button"
|
44 | 45 | class='small yellow-button'
|
45 |
| - disabled={{disableCreate}} |
46 |
| - title={{if emptyName "You must specify a name" ""}} |
| 46 | + disabled={{this.disableCreate}} |
| 47 | + title={{if this.emptyName "You must specify a name" ""}} |
47 | 48 | {{action "saveToken"}}
|
48 | 49 | >
|
49 | 50 | Create
|
|
52 | 53 | <button
|
53 | 54 | type="button"
|
54 | 55 | class='small tan-button'
|
55 |
| - disabled={{api_token.isSaving}} |
| 56 | + disabled={{this.api_token.isSaving}} |
56 | 57 | {{action "revokeToken"}}
|
57 | 58 | >
|
58 | 59 | Revoke
|
59 | 60 | </button>
|
60 | 61 | {{/if}}
|
61 |
| - {{#if api_token.isSaving}} |
| 62 | + {{#if this.api_token.isSaving}} |
62 | 63 | <img class='overlay' src="/assets/ajax-loader.gif">
|
63 | 64 | {{/if}}
|
64 | 65 | </div>
|
65 | 66 | </div>
|
66 | 67 |
|
67 |
| -{{#if serverError}} |
| 68 | +{{#if this.serverError}} |
68 | 69 | <div class='row error'>
|
69 | 70 | <div>
|
70 |
| - {{ serverError }} |
| 71 | + {{ this.serverError }} |
71 | 72 | </div>
|
72 | 73 | </div>
|
73 | 74 | {{/if}}
|
74 | 75 |
|
75 |
| -{{#if api_token.token}} |
| 76 | +{{#if this.api_token.token}} |
76 | 77 | <div class='row new-token'>
|
77 | 78 | <div>
|
78 | 79 | Please record this token somewhere, you cannot retrieve
|
79 | 80 | its value again. For use on the command line you can save it to <code>~/.cargo/credentials</code>
|
80 | 81 | with:
|
81 | 82 |
|
82 |
| - <pre>cargo login {{ api_token.token }}</pre> |
| 83 | + <pre>cargo login {{ this.api_token.token }}</pre> |
83 | 84 | </div>
|
84 | 85 | </div>
|
85 | 86 | {{/if}}
|
0 commit comments