mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-09-29 19:36:57 +03:00
button consistency
This commit is contained in:
@@ -18,11 +18,9 @@
|
|||||||
"account": {
|
"account": {
|
||||||
"title": "Secure your account",
|
"title": "Secure your account",
|
||||||
"descriptionSignedIn": "You're signed in as {{username}} using the temporary password from the Frigate logs. Set one you'll remember.",
|
"descriptionSignedIn": "You're signed in as {{username}} using the temporary password from the Frigate logs. Set one you'll remember.",
|
||||||
"descriptionAnonymous": "This port doesn't require a login. Set a password for the admin account so you can sign in on the secured port.",
|
"descriptionAnonymous": "You're accessing Frigate on a port that doesn't require a login. Set a password for the admin account so you can sign in on the secured port.",
|
||||||
"passwordSet": "Password set",
|
"passwordSet": "Password set",
|
||||||
"changePassword": "Change password",
|
"changePassword": "Change password",
|
||||||
"usersTitle": "Other users",
|
|
||||||
"usersDescription": "Add accounts for anyone else who needs access. Roles can be changed later in Settings.",
|
|
||||||
"addUser": "Add user",
|
"addUser": "Add user",
|
||||||
"usersFailed": "Could not load the user list. You can still set the admin password.",
|
"usersFailed": "Could not load the user list. You can still set the admin password.",
|
||||||
"userFailed": "Failed to add the user. Please try again."
|
"userFailed": "Failed to add the user. Please try again."
|
||||||
|
|||||||
@@ -107,57 +107,49 @@ export default function SetupAccount({
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex items-center justify-between rounded-md border p-4">
|
|
||||||
<div className="flex flex-col gap-1">
|
|
||||||
<span className="text-sm font-medium">{adminUsername}</span>
|
|
||||||
{passwordSet && (
|
|
||||||
<span className="flex items-center gap-2 text-xs text-muted-foreground">
|
|
||||||
<FaCircleCheck className="size-3 text-success" />
|
|
||||||
{t("setupWizard.account.passwordSet")}
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
<Button
|
|
||||||
type="button"
|
|
||||||
variant="select"
|
|
||||||
onClick={() => setShowPassword(true)}
|
|
||||||
>
|
|
||||||
{t("setupWizard.account.changePassword")}
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="flex flex-col gap-2">
|
<div className="flex flex-col gap-2">
|
||||||
<div>
|
<div className="flex items-center justify-between rounded-md border p-3">
|
||||||
<h3 className="text-sm font-medium">
|
<div className="flex flex-col gap-1">
|
||||||
{t("setupWizard.account.usersTitle")}
|
<span className="text-sm font-medium">{adminUsername}</span>
|
||||||
</h3>
|
{passwordSet && (
|
||||||
<p className="text-xs text-muted-foreground">
|
<span className="flex items-center gap-2 text-xs text-muted-foreground">
|
||||||
{t("setupWizard.account.usersDescription")}
|
<FaCircleCheck className="size-3 text-success" />
|
||||||
</p>
|
{t("setupWizard.account.passwordSet")}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<Button
|
||||||
|
type="button"
|
||||||
|
variant="outline"
|
||||||
|
onClick={() => setShowPassword(true)}
|
||||||
|
>
|
||||||
|
{t("setupWizard.account.changePassword")}
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{isLoading && <ActivityIndicator />}
|
|
||||||
|
|
||||||
{usersError && (
|
|
||||||
<p className="rounded-md bg-muted p-3 text-xs text-muted-foreground">
|
|
||||||
{t("setupWizard.account.usersFailed")}
|
|
||||||
</p>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{otherUsers.map((user) => (
|
{otherUsers.map((user) => (
|
||||||
<div
|
<div
|
||||||
key={user.username}
|
key={user.username}
|
||||||
className="flex items-center justify-between rounded-md border p-3"
|
className="flex items-center justify-between rounded-md border p-3"
|
||||||
>
|
>
|
||||||
<span className="text-sm">{user.username}</span>
|
<span className="text-sm font-medium">{user.username}</span>
|
||||||
<span className="text-xs text-muted-foreground">{user.role}</span>
|
<span className="text-xs text-muted-foreground">{user.role}</span>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{isLoading && <ActivityIndicator />}
|
||||||
|
|
||||||
|
{usersError && (
|
||||||
|
<p className="rounded-md bg-muted p-3 text-xs text-muted-foreground">
|
||||||
|
{t("setupWizard.account.usersFailed")}
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<div className="flex flex-col items-center gap-3 py-4">
|
||||||
<Button
|
<Button
|
||||||
type="button"
|
variant="select"
|
||||||
variant="outline"
|
className="w-full"
|
||||||
className="self-start"
|
|
||||||
onClick={() => setShowCreate(true)}
|
onClick={() => setShowCreate(true)}
|
||||||
>
|
>
|
||||||
{t("setupWizard.account.addUser")}
|
{t("setupWizard.account.addUser")}
|
||||||
@@ -169,7 +161,7 @@ export default function SetupAccount({
|
|||||||
{t("setupWizard.actions.back")}
|
{t("setupWizard.actions.back")}
|
||||||
</Button>
|
</Button>
|
||||||
<div className="flex flex-1 justify-end gap-3">
|
<div className="flex flex-1 justify-end gap-3">
|
||||||
<Button type="button" variant="outline" onClick={onSkip}>
|
<Button type="button" onClick={onSkip}>
|
||||||
{t("setupWizard.actions.skip")}
|
{t("setupWizard.actions.skip")}
|
||||||
</Button>
|
</Button>
|
||||||
<Button type="button" variant="select" onClick={onNext}>
|
<Button type="button" variant="select" onClick={onNext}>
|
||||||
|
|||||||
@@ -251,11 +251,7 @@ export default function SetupDetector({
|
|||||||
{t("setupWizard.actions.back")}
|
{t("setupWizard.actions.back")}
|
||||||
</Button>
|
</Button>
|
||||||
<div className="flex flex-1 justify-end gap-3">
|
<div className="flex flex-1 justify-end gap-3">
|
||||||
<Button
|
<Button type="button" onClick={() => onSkip(selected.key)}>
|
||||||
type="button"
|
|
||||||
variant="outline"
|
|
||||||
onClick={() => onSkip(selected.key)}
|
|
||||||
>
|
|
||||||
{t("setupWizard.actions.skip")}
|
{t("setupWizard.actions.skip")}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ export default function SetupHwAccel({
|
|||||||
{t("setupWizard.actions.back")}
|
{t("setupWizard.actions.back")}
|
||||||
</Button>
|
</Button>
|
||||||
<div className="flex flex-1 justify-end gap-3">
|
<div className="flex flex-1 justify-end gap-3">
|
||||||
<Button type="button" variant="outline" onClick={onSkip}>
|
<Button type="button" onClick={onSkip}>
|
||||||
{t("setupWizard.actions.skip")}
|
{t("setupWizard.actions.skip")}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ export default function SetupRecording({
|
|||||||
{t("setupWizard.actions.back")}
|
{t("setupWizard.actions.back")}
|
||||||
</Button>
|
</Button>
|
||||||
<div className="flex flex-1 justify-end gap-3">
|
<div className="flex flex-1 justify-end gap-3">
|
||||||
<Button type="button" variant="outline" onClick={onSkip}>
|
<Button type="button" onClick={onSkip}>
|
||||||
{t("setupWizard.actions.skip")}
|
{t("setupWizard.actions.skip")}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@@ -266,7 +266,7 @@ export default function SetupWizard() {
|
|||||||
{isDark ? <LuSun className="size-4" /> : <LuMoon className="size-4" />}
|
{isDark ? <LuSun className="size-4" /> : <LuMoon className="size-4" />}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Card className="w-full max-w-lg">
|
<Card className="w-full max-w-lg bg-background_alt">
|
||||||
<CardContent className="p-6">
|
<CardContent className="p-6">
|
||||||
<StepIndicator
|
<StepIndicator
|
||||||
steps={stepLabels}
|
steps={stepLabels}
|
||||||
|
|||||||
Reference in New Issue
Block a user