Skip to content

Every analytics tool wants a subscription. And your data. I built Twiligent instead. YouTube stats. Instagram stats. One dashboard. Runs locally on your machine.

chore(app): add the Google G mark for the sign-in button

spacesdrive98e20dfc9eff
diff --git a/frontend/public/icons/google-g.svg b/frontend/public/icons/google-g.svg
new file mode 100644
index 0000000..759cf05
--- /dev/null
+++ b/frontend/public/icons/google-g.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" aria-hidden="true"><path fill="#EA4335" d="M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"/><path fill="#4285F4" d="M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"/><path fill="#FBBC05" d="M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z"/><path fill="#34A853" d="M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"/></svg>
diff --git a/frontend/src/pages/LoginBrandPanel.tsx b/frontend/src/pages/LoginBrandPanel.tsx
deleted file mode 100644
index 6c91533..0000000
--- a/frontend/src/pages/LoginBrandPanel.tsx
+++ /dev/null
@@ -1,86 +0,0 @@
-import { Clock, TrendingUp } from 'lucide-react';
-import { YouTubeIcon, InstagramIcon, RedditIcon } from '@/components/brand/platform-icons';
-
-const PLATFORMS = [
- { icon: YouTubeIcon, label: 'YouTube' },
- { icon: InstagramIcon, label: 'Instagram' },
- { icon: RedditIcon, label: 'Reddit' },
-];
-
-// decorative preview, hidden from assistive technology and on small screens
-export default function LoginBrandPanel() {
- return (
- <aside aria-hidden="true" className="hidden p-3 lg:block">
- <div className="sticky top-3 flex h-[calc(100svh-1.5rem)] flex-col overflow-hidden rounded-panel fold-band p-10 text-white xl:p-12">
- <img
- src="/Logos/twiligent-mark-white.svg"
- alt=""
- className="pointer-events-none absolute -right-24 -bottom-28 w-[70%] max-w-[40rem] opacity-[0.07] select-none"
- draggable={false}
- />
-
- <div className="relative flex items-center gap-2">
- {PLATFORMS.map(platform => {
- const Icon = platform.icon;
- return (
- <span key={platform.label} className="inline-flex h-8 items-center gap-1.5 rounded-pill border border-white/15 bg-white/10 px-3 text-small font-medium backdrop-blur-sm">
- <Icon className="size-3.5" />
- {platform.label}
- </span>
- );
- })}
- </div>
-
- <div className="relative flex min-h-0 flex-1 items-center justify-center py-8">
- <div className="relative w-full max-w-[25rem]">
- <div className="rounded-card border border-white/15 bg-white/10 p-5 shadow-lg backdrop-blur-md">
- <div className="flex items-center justify-between text-small text-white/75">
- <span>Audience</span>
- <span className="inline-flex items-center gap-1 rounded-pill bg-white/15 px-2 py-0.5 text-caption font-medium text-white">
- <TrendingUp className="size-3" />
- 12.6%
- </span>
- </div>
- <p className="mt-2 font-heading text-[2.75rem] leading-none font-semibold tracking-[-0.03em] tabular-nums">128.4K</p>
- <svg viewBox="0 0 320 72" className="mt-4 h-16 w-full" fill="none" preserveAspectRatio="none">
- <defs>
- <linearGradient id="login-spark" x1="0" y1="0" x2="0" y2="1">
- <stop offset="0%" stopColor="white" stopOpacity="0.35" />
- <stop offset="100%" stopColor="white" stopOpacity="0" />
- </linearGradient>
- </defs>
- <path d="M0 58 C30 54 48 60 72 50 S118 30 146 36 S196 44 222 26 S276 14 320 6 L320 72 L0 72 Z" fill="url(#login-spark)" />
- <path d="M0 58 C30 54 48 60 72 50 S118 30 146 36 S196 44 222 26 S276 14 320 6" stroke="white" strokeWidth="2.5" strokeLinecap="round" />
- </svg>
- </div>
-
- <div className="absolute -bottom-14 -left-10 flex w-64 items-center gap-3 rounded-card border border-white/15 bg-white/15 p-3.5 shadow-lg backdrop-blur-md xl:-left-14">
- <span className="grid size-10 shrink-0 place-items-center rounded-control bg-white/15">
- <InstagramIcon className="size-5" />
- </span>
- <div className="min-w-0 flex-1">
- <p className="text-small font-semibold">Reel scheduled</p>
- <p className="flex items-center gap-1 text-caption text-white/75"><Clock className="size-3" />Tomorrow, 09:00</p>
- </div>
- </div>
-
- <div className="absolute -top-[4.5rem] right-10 flex items-center gap-2.5 rounded-card border border-white/15 bg-white/15 px-3.5 py-3 shadow-lg backdrop-blur-md xl:-right-10">
- <YouTubeIcon className="size-5" />
- <div>
- <p className="text-caption text-white/75">Top video</p>
- <p className="text-small font-semibold tabular-nums">1.2M views</p>
- </div>
- </div>
- </div>
- </div>
-
- <div className="relative flex flex-col gap-3">
- <p className="max-w-md font-heading text-[clamp(1.75rem,min(2.8vw,5vh),2.5rem)] leading-[1.12] font-semibold tracking-[-0.025em]">
- Every channel, folded into one clear picture.
- </p>
- <p className="max-w-sm text-sm text-white/75">Analytics for YouTube, Instagram and Reddit, with scheduled publishing to Instagram.</p>
- </div>
- </div>
- </aside>
- );
-}
diff --git a/frontend/src/pages/LoginForm.tsx b/frontend/src/pages/LoginForm.tsx
deleted file mode 100644
index 5224e7c..0000000
--- a/frontend/src/pages/LoginForm.tsx
+++ /dev/null
@@ -1,70 +0,0 @@
-import type { FormEvent } from 'react';
-import { ArrowRight } from 'lucide-react';
-import { Button } from '@/components/ui/button';
-import { Input } from '@/components/ui/input';
-import { Spinner } from '@/components/ui/spinner';
-import { FieldRow } from '@/components/DetailPanel';
-import { PASSWORD_MIN_LENGTH } from '@/lib/passwords';
-import PasswordInput from './PasswordInput';
-import type { LoginCopy } from './loginCopy';
-
-export interface LoginFormProps {
- isLogin: boolean;
- copy: LoginCopy;
- email: string;
- password: string;
- onEmailChange: (value: string) => void;
- onPasswordChange: (value: string) => void;
- showPassword: boolean;
- onTogglePassword: () => void;
- loading: boolean;
- onSubmit: (e: FormEvent<HTMLFormElement>) => void;
- // shown on the sign-in form only
- onForgotPassword?: () => void;
-}
-
-export default function LoginForm({
- isLogin, copy, email, password, onEmailChange, onPasswordChange, showPassword, onTogglePassword, loading, onSubmit, onForgotPassword,
-}: LoginFormProps) {
- return (
- <form onSubmit={onSubmit} className="flex flex-col gap-4">
- <FieldRow label="Email" htmlFor="email">
- <Input
- id="email"
- type="email"
- className="h-(--control-h-lg)"
- placeholder="[email protected]"
- value={email}
- onChange={e => onEmailChange(e.target.value)}
- required
- autoComplete="email"
- />
- </FieldRow>
- <FieldRow label="Password" htmlFor="password">
- <PasswordInput
- id="password"
- value={password}
- onChange={onPasswordChange}
- placeholder={isLogin ? 'Your password' : `At least ${PASSWORD_MIN_LENGTH} characters`}
- autoComplete={isLogin ? 'current-password' : 'new-password'}
- showPassword={showPassword}
- onTogglePassword={onTogglePassword}
- />
- </FieldRow>
- {onForgotPassword && (
- <button
- type="button"
- onClick={onForgotPassword}
- className="-mt-2 self-end rounded-sm text-sm font-medium text-brand-text underline-offset-4 hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring"
- >
- Forgot password?
- </button>
- )}
- <Button type="submit" size="lg" className="mt-2 w-full" disabled={loading}>
- {loading && <Spinner className="size-4" />}
- {loading ? copy.busy : copy.submit}
- {!loading && <ArrowRight data-icon="inline-end" />}
- </Button>
- </form>
- );
-}