feat(ux): first-time onboarding, empty states, and copy fixes
Implements the six "propose first" items from the product/UX review: - "/" now redirects to /dashboard instead of the empty /jobs table -- a new user's first screen is now an overview with orientation, not a data table with zero rows and four filter dropdowns. - Jobs table gets a real first-time empty state (distinct from "no results match your filters") pointing at Add Job and the bookmarklet, instead of a bare "No jobs found." - Match Score card and Candidate Fit tab now each get a one-line caption explaining what they are and how they differ (deterministic keyword coverage vs. AI opinion) -- they previously sat side by side with no explanation of why there are two. - Google sign-in hint now reflects self-serve signup when Auth:AllowRegistration is on, instead of always implying you need an existing linked account. - Quick Search button now shows its keyboard shortcut (Ctrl+K / ⌘K) inline instead of being undiscoverable.
This commit is contained in:
@@ -51,6 +51,7 @@ export default function GoogleAuthCard({ onSignedIn }: { onSignedIn?: () => void
|
||||
const { t } = useI18n();
|
||||
const [me, setMe] = useState<MeResponse | null>(null);
|
||||
const [working, setWorking] = useState(false);
|
||||
const [allowRegistration, setAllowRegistration] = useState(false);
|
||||
const hostRef = useRef<HTMLDivElement | null>(null);
|
||||
|
||||
const clientId = (process.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID || "").trim();
|
||||
@@ -72,6 +73,9 @@ export default function GoogleAuthCard({ onSignedIn }: { onSignedIn?: () => void
|
||||
|
||||
useEffect(() => {
|
||||
void refreshMe();
|
||||
api.get<{ allowRegistration: boolean }>("/auth/config").then((res) => {
|
||||
setAllowRegistration(Boolean(res.data?.allowRegistration));
|
||||
}).catch(() => setAllowRegistration(false));
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -156,7 +160,7 @@ export default function GoogleAuthCard({ onSignedIn }: { onSignedIn?: () => void
|
||||
|
||||
{!signedIn ? (
|
||||
<Typography sx={{ color: "text.secondary" }}>
|
||||
{t("googleSignInHint")}
|
||||
{allowRegistration ? t("googleSignInHintSelfServe") : t("googleSignInHint")}
|
||||
</Typography>
|
||||
) : me?.provider === "local" ? (
|
||||
<Typography sx={{ color: "text.secondary" }}>
|
||||
|
||||
Reference in New Issue
Block a user