diff --git a/public/partials/admin/user.htm b/public/partials/admin/user.htm
index 0ee7ac0..8d81249 100644
--- a/public/partials/admin/user.htm
+++ b/public/partials/admin/user.htm
@@ -81,14 +81,14 @@
Personal API tokens for this admin account. Send as Authorization: Bearer <token> to authenticate without GitHub OAuth (useful for development).
+
Copy this token now — it will not be shown again:
-
{{newTokenPlaintext}}
-
+
{{tokenForm.plaintext}}
+
diff --git a/public/script/admin.js b/public/script/admin.js
index 8a45883..8b272cf 100644
--- a/public/script/admin.js
+++ b/public/script/admin.js
@@ -199,8 +199,7 @@ angular
getUserRepositories($routeParams.username);
$scope.tokens = [];
- $scope.newTokenName = "";
- $scope.newTokenPlaintext = null;
+ $scope.tokenForm = { name: "", plaintext: null };
function loadTokens() {
$http.get("/api/admin/tokens").then(
@@ -215,13 +214,13 @@ angular
loadTokens();
$scope.createToken = () => {
- if (!$scope.newTokenName) return;
+ if (!$scope.tokenForm.name) return;
$http
- .post("/api/admin/tokens", { name: $scope.newTokenName })
+ .post("/api/admin/tokens", { name: $scope.tokenForm.name })
.then(
(res) => {
- $scope.newTokenPlaintext = res.data.token;
- $scope.newTokenName = "";
+ $scope.tokenForm.plaintext = res.data.token;
+ $scope.tokenForm.name = "";
loadTokens();
},
(err) => console.error(err)
diff --git a/public/script/bundle.min.js b/public/script/bundle.min.js
index cff80dc..40569b9 100644
--- a/public/script/bundle.min.js
+++ b/public/script/bundle.min.js
@@ -2621,4 +2621,5 @@ Expecting `+E.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on l
:root { --mermaid-font-family: ${t.fontFamily}}`),void 0!==t.altFontFamily&&(n+=`
:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),i instanceof Map){let e=t.htmlLabels??t.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];i.forEach(t=>{gq(t.styles)||e.forEach(e=>{n+=$Fe(t.id,e,t.styles)}),gq(t.textStyles)||(n+=$Fe(t.id,"tspan",(t?.textStyles||[]).map(e=>e.replace("color","fill"))))})}return n},"createCssStyles"),RFe=mt((e,t,i,n)=>{i=LFe(e,i);return uFe(aFe(n+`{${ch(t,i,e.themeVariables)}}`),dFe)},"createUserStyles"),MFe=mt((e="",t,i)=>{let n=e;return i||t||(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=(n=nC(n)).replace(/
/g,"
")},"cleanUpSvgCode"),IFe=mt((e="",t)=>{return`