+
+
+
+
+ {account.name}
+
+
+
+
+ {account.user?.login ? `@${account.user.login} · ` : ""}
+ {account.accountType}
+
+ {account.error && (
+
+ {t("error")} {account.error}
+
+ )}
+
+
+
void handleToggleUsage()}
+ usageLoading={usageLoading}
+ showUsage={showUsage}
+ />
+
+
+
+ {t("priorityLabel")}
+ {editingPriority ? (
+ setPriorityValue(e.target.value)}
+ onBlur={handlePrioritySave}
+ onKeyDown={(e) => {
+ if (e.key === "Enter") handlePrioritySave()
+ if (e.key === "Escape") {
+ setPriorityValue(String(account.priority ?? 0))
+ setEditingPriority(false)
+ }
+ }}
+ autoFocus
+ min={0}
+ style={{
+ width: 60,
+ padding: "2px 6px",
+ fontSize: 13,
+ display: "inline-block",
+ }}
+ />
+ ) : (
+ setEditingPriority(true)}
+ style={{
+ cursor: "pointer",
+ padding: "2px 10px",
+ background: "var(--bg)",
+ border: "1px solid var(--border)",
+ borderRadius: 4,
+ fontFamily: "monospace",
+ fontSize: 13,
+ }}
+ title="Click to edit"
+ >
+ {account.priority ?? 0}
+
+ )}
+
+ {t("priorityHint")}
+
+
+
+
+ {status === "running" && (
+
+ )}
+ {showUsage
+ && (usage ?
+
+ :
+ {t("usageUnavailable")}
+
)}
+
+ )
+}
diff --git a/web/src/components/AddAccountForm.tsx b/web/src/components/AddAccountForm.tsx
new file mode 100644
index 000000000..4a057d656
--- /dev/null
+++ b/web/src/components/AddAccountForm.tsx
@@ -0,0 +1,339 @@
+import { useCallback, useEffect, useRef, useState } from "react"
+
+import { api } from "../api"
+import { useT } from "../i18n"
+
+interface Props {
+ onComplete: () => Promise