.
This commit is contained in:
@@ -138,7 +138,7 @@ export function AdminCenter() {
|
||||
key={t.id}
|
||||
onClick={() => setTab(t.id)}
|
||||
className={cn(
|
||||
"flex flex-1 items-center justify-center gap-2 whitespace-nowrap rounded-full px-4 py-2 text-sm font-medium transition",
|
||||
"relative flex flex-1 items-center justify-center gap-2 whitespace-nowrap rounded-full px-4 py-2 text-sm font-medium transition",
|
||||
tab === t.id
|
||||
? "bg-white text-stone-900 shadow dark:bg-zinc-800 dark:text-zinc-100"
|
||||
: "opacity-60 hover:opacity-100",
|
||||
|
||||
@@ -155,40 +155,42 @@ function ModelRow({ model, onChanged, onError }: {
|
||||
<span className="block truncate text-sm font-medium">{model.label || model.id}</span>
|
||||
<span className="block truncate font-mono text-xs opacity-50">{model.id}</span>
|
||||
</span>
|
||||
<label className="flex items-center gap-1.5 text-xs opacity-80">
|
||||
<Input
|
||||
type="number"
|
||||
min={0}
|
||||
max={1000000}
|
||||
value={hourly}
|
||||
disabled={busy}
|
||||
placeholder={t("models.unlimited")}
|
||||
aria-label={t("models.hourly")}
|
||||
onChange={(e) => setHourly(e.target.value)}
|
||||
onBlur={(e) => commitNumber("hourly", e.target.value)}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === "Enter") (e.target as HTMLInputElement).blur();
|
||||
}}
|
||||
className="w-24"
|
||||
/>
|
||||
<label className="flex shrink-0 items-center gap-1.5 whitespace-nowrap text-xs opacity-80">
|
||||
<span className="w-24 shrink-0">
|
||||
<Input
|
||||
type="number"
|
||||
min={0}
|
||||
max={1000000}
|
||||
value={hourly}
|
||||
disabled={busy}
|
||||
placeholder={t("models.unlimited")}
|
||||
aria-label={t("models.hourly")}
|
||||
onChange={(e) => setHourly(e.target.value)}
|
||||
onBlur={(e) => commitNumber("hourly", e.target.value)}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === "Enter") (e.target as HTMLInputElement).blur();
|
||||
}}
|
||||
/>
|
||||
</span>
|
||||
{t("models.hourly")}
|
||||
</label>
|
||||
<label className="flex items-center gap-1.5 text-xs opacity-80">
|
||||
<Input
|
||||
type="number"
|
||||
min={0}
|
||||
max={1000000}
|
||||
value={daily}
|
||||
disabled={busy}
|
||||
placeholder={t("models.unlimited")}
|
||||
aria-label={t("models.daily")}
|
||||
onChange={(e) => setDaily(e.target.value)}
|
||||
onBlur={(e) => commitNumber("daily", e.target.value)}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === "Enter") (e.target as HTMLInputElement).blur();
|
||||
}}
|
||||
className="w-24"
|
||||
/>
|
||||
<label className="flex shrink-0 items-center gap-1.5 whitespace-nowrap text-xs opacity-80">
|
||||
<span className="w-24 shrink-0">
|
||||
<Input
|
||||
type="number"
|
||||
min={0}
|
||||
max={1000000}
|
||||
value={daily}
|
||||
disabled={busy}
|
||||
placeholder={t("models.unlimited")}
|
||||
aria-label={t("models.daily")}
|
||||
onChange={(e) => setDaily(e.target.value)}
|
||||
onBlur={(e) => commitNumber("daily", e.target.value)}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === "Enter") (e.target as HTMLInputElement).blur();
|
||||
}}
|
||||
/>
|
||||
</span>
|
||||
{t("models.daily")}
|
||||
</label>
|
||||
<Switch
|
||||
|
||||
Reference in New Issue
Block a user