Skip to content

Commit 6183b2e

Browse files
0xPoeTurbo87
authored andcommitted
Add support for regenerating the token
1 parent 1ce1244 commit 6183b2e

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

app/components/settings/api-tokens.hbs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,14 @@
113113

114114
<div local-class="actions">
115115
{{#unless token.isExpired}}
116+
<LinkTo
117+
@route="settings.tokens.new"
118+
@query={{hash from=token.id}}
119+
local-class="regenerate-button"
120+
data-test-regenerate-token-button
121+
>
122+
Regenerate
123+
</LinkTo>
116124
<button
117125
type="button"
118126
local-class="revoke-button"

app/components/settings/api-tokens.module.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@
8989
border-radius: var(--space-3xs);
9090
}
9191

92+
.regenerate-button {
93+
composes: yellow-button small from '../../styles/shared/buttons.module.css';
94+
flex-grow: 1;
95+
border-radius: var(--space-3xs);
96+
}
97+
9298
.new-token {
9399
margin-top: var(--space-s);
94100
}
@@ -190,11 +196,19 @@
190196
}
191197

192198
.actions {
199+
display: flex;
200+
flex-direction: column;
193201
grid-area: actions;
194202
align-self: start;
195203
margin: 0 0 0 var(--space-xs);
196204
}
197205

206+
.actions > * {
207+
flex-grow: 1;
208+
width: 100%;
209+
margin-top: var(--space-xs);
210+
}
211+
198212
.new-token {
199213
grid-area: details;
200214
margin-bottom: 0;

0 commit comments

Comments
 (0)