mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-10-04 02:33:47 +10:00
Replace the achromatic shadcn palette with the Desk & Paper tokens (warm neutrals, one moss accent, danger, warn and info), exposed to Tailwind under their spec names; the previous names resolve to the new tokens until every screen is rebuilt. Hard-coded palette classes become semantic tokens and stage colors follow the spec. Fonts move to Newsreader, Hanken Grotesk and JetBrains Mono. The theme gains a System option that follows the operating system live, applied before first paint, and Base UI now receives the locale's direction. Primitives follow the component spec: button variants primary, secondary, ghost, danger and link with a loading state, accent focus rings on inputs, SwitchRow, semantic badges, segmented and underline tabs, restyled menus, dialogs, sheets, tooltips and command bar, and a single bottom-center toast with an Undo action. New: IconButton, SegmentedControl, RadioGroup and NativeSelect.
40 lines
1.1 KiB
TypeScript
40 lines
1.1 KiB
TypeScript
import { Trans } from "@lingui/react/macro";
|
|
import { PasswordIcon, PencilSimpleLineIcon } from "@phosphor-icons/react";
|
|
import { Link } from "@tanstack/react-router";
|
|
import { Button } from "@reactive-resume/ui/components/button";
|
|
import { useDialogStore } from "@/dialogs/store";
|
|
import { useAuthAccounts } from "./hooks";
|
|
|
|
export function PasswordSection() {
|
|
const { openDialog } = useDialogStore();
|
|
const { hasAccount } = useAuthAccounts();
|
|
|
|
const hasPassword = hasAccount("credential");
|
|
|
|
return (
|
|
<div className="flex items-center justify-between gap-x-4">
|
|
<h2 className="flex items-center gap-x-3 font-medium text-base">
|
|
<PasswordIcon />
|
|
<Trans>Password</Trans>
|
|
</h2>
|
|
|
|
{hasPassword ? (
|
|
<Button variant="secondary" onClick={() => openDialog("auth.change-password", undefined)}>
|
|
<PencilSimpleLineIcon />
|
|
<Trans>Update Password</Trans>
|
|
</Button>
|
|
) : (
|
|
<Button
|
|
variant="secondary"
|
|
nativeButton={false}
|
|
render={
|
|
<Link to="/auth/forgot-password">
|
|
<Trans>Set Password</Trans>
|
|
</Link>
|
|
}
|
|
/>
|
|
)}
|
|
</div>
|
|
);
|
|
}
|