feat: add camel logo and random desert-themed subtitles to login page
25 rotating cameleer-themed login subtitles picked randomly on each page load. Also adds the camel logo SVG next to the app name. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -21,12 +21,20 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.logo {
|
.logo {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: var(--text-primary);
|
color: var(--text-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.logoImg {
|
||||||
|
width: 36px;
|
||||||
|
height: 36px;
|
||||||
|
}
|
||||||
|
|
||||||
.subtitle {
|
.subtitle {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
color: var(--text-muted);
|
color: var(--text-muted);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { type FormEvent, useEffect, useState } from 'react';
|
import { type FormEvent, useEffect, useMemo, useState } from 'react';
|
||||||
import { Navigate } from 'react-router';
|
import { Navigate } from 'react-router';
|
||||||
import { useAuthStore } from './auth-store';
|
import { useAuthStore } from './auth-store';
|
||||||
import { api } from '../api/client';
|
import { api } from '../api/client';
|
||||||
@@ -10,8 +10,37 @@ interface OidcInfo {
|
|||||||
authorizationEndpoint: string;
|
authorizationEndpoint: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const SUBTITLES = [
|
||||||
|
"Prove you're not a mirage",
|
||||||
|
"Only authorized cameleers beyond this dune",
|
||||||
|
"Halt, traveler — state your business",
|
||||||
|
"The caravan doesn't move without credentials",
|
||||||
|
"No hitchhikers on this caravan",
|
||||||
|
"This oasis requires a password",
|
||||||
|
"Camels remember faces. We use passwords.",
|
||||||
|
"You shall not pass... without logging in",
|
||||||
|
"The desert is vast. Your session has expired.",
|
||||||
|
"Another day, another dune to authenticate",
|
||||||
|
"Papers, please. The caravan master is watching.",
|
||||||
|
"Trust, but verify — ancient cameleer proverb",
|
||||||
|
"Even the Silk Road had checkpoints",
|
||||||
|
"Your camel is parked outside. Now identify yourself.",
|
||||||
|
"One does not simply walk into the dashboard",
|
||||||
|
"The sands shift, but your password shouldn't",
|
||||||
|
"Unauthorized access? In this economy?",
|
||||||
|
"Welcome back, weary traveler",
|
||||||
|
"The dashboard awaits on the other side of this dune",
|
||||||
|
"Keep calm and authenticate",
|
||||||
|
"Who goes there? Friend or rogue exchange?",
|
||||||
|
"Access denied looks the same in every desert",
|
||||||
|
"May your routes be green and your tokens valid",
|
||||||
|
"Forgot your password? That's between you and the dunes.",
|
||||||
|
"No ticket, no caravan",
|
||||||
|
];
|
||||||
|
|
||||||
export function LoginPage() {
|
export function LoginPage() {
|
||||||
const { isAuthenticated, login, loading, error } = useAuthStore();
|
const { isAuthenticated, login, loading, error } = useAuthStore();
|
||||||
|
const subtitle = useMemo(() => SUBTITLES[Math.floor(Math.random() * SUBTITLES.length)], []);
|
||||||
const [username, setUsername] = useState('');
|
const [username, setUsername] = useState('');
|
||||||
const [password, setPassword] = useState('');
|
const [password, setPassword] = useState('');
|
||||||
const [oidc, setOidc] = useState<OidcInfo | null>(null);
|
const [oidc, setOidc] = useState<OidcInfo | null>(null);
|
||||||
@@ -54,8 +83,11 @@ export function LoginPage() {
|
|||||||
<div className={styles.page}>
|
<div className={styles.page}>
|
||||||
<Card className={styles.card}>
|
<Card className={styles.card}>
|
||||||
<div className={styles.loginForm}>
|
<div className={styles.loginForm}>
|
||||||
<div className={styles.logo}>cameleer3</div>
|
<div className={styles.logo}>
|
||||||
<p className={styles.subtitle}>Sign in to access the observability dashboard</p>
|
<img src="/favicon.svg" alt="" className={styles.logoImg} />
|
||||||
|
cameleer3
|
||||||
|
</div>
|
||||||
|
<p className={styles.subtitle}>{subtitle}</p>
|
||||||
|
|
||||||
{error && (
|
{error && (
|
||||||
<div className={styles.error}>
|
<div className={styles.error}>
|
||||||
|
|||||||
Reference in New Issue
Block a user