langue
deploy / deploy (push) Successful in 31s

This commit is contained in:
Romain committed 2026-10-04 16:37:27 +02:00
1 parent 4e270e616a
commit c82b7894a5
51 files changed
+7374 -104

No files matched your search

+3 -3
View File
@@ -108,7 +108,7 @@ export default function AccountSection({ account, onMessage }: { account: Accoun
<button
onClick={() => (social.me ? social.openProfile(social.me.username) : social.openSearch())}
className="flex w-full items-center gap-3.5 px-4 py-4 text-left transition-colors active:bg-surface-2"
className="flex w-full items-center gap-3.5 px-4 py-4 text-start transition-colors active:bg-surface-2"
>
<Avatar url={social.me?.avatarUrl} name={social.me?.displayName ?? account.email} size={22} />
<span className="flex-1">
@@ -143,14 +143,14 @@ export default function AccountSection({ account, onMessage }: { account: Accoun
</div>
</form>
) : (
<button onClick={() => setPwOpen(true)} className="flex w-full items-center gap-3.5 px-4 py-4 text-left transition-colors active:bg-surface-2">
<button onClick={() => setPwOpen(true)} className="flex w-full items-center gap-3.5 px-4 py-4 text-start transition-colors active:bg-surface-2">
<KeyRound size={19} className="text-ink-2" />
<span className="flex-1 font-medium">{t('account.changePassword')}</span>
<span className="text-ink-3">→</span>
</button>
)}
<button onClick={() => logout(false)} disabled={busy === 'logout'} className="flex w-full items-center gap-3.5 px-4 py-4 text-left transition-colors active:bg-surface-2">
<button onClick={() => logout(false)} disabled={busy === 'logout'} className="flex w-full items-center gap-3.5 px-4 py-4 text-start transition-colors active:bg-surface-2">
{busy === 'logout' ? <Loader2 size={19} className="animate-spin text-ink-2" /> : <LogOut size={19} className="text-ink-2" />}
<span className="flex-1">
<span className="block font-medium">{t('account.logout')}</span>
+2 -2
View File
@@ -12,7 +12,7 @@ function PasswordField({ value, onChange, placeholder, autoComplete }: { value:
return (
<div className="relative">
<input
className="field pr-11"
className="field pe-11"
type={show ? 'text' : 'password'}
value={value}
onChange={(e) => onChange(e.target.value)}
@@ -22,7 +22,7 @@ function PasswordField({ value, onChange, placeholder, autoComplete }: { value:
maxLength={72}
required
/>
<button type="button" onClick={() => setShow((v) => !v)} className="absolute right-3 top-1/2 -translate-y-1/2 text-ink-3" aria-label={show ? t('auth.hidePassword') : t('auth.showPassword')}>
<button type="button" onClick={() => setShow((v) => !v)} className="absolute end-3 top-1/2 -translate-y-1/2 text-ink-3" aria-label={show ? t('auth.hidePassword') : t('auth.showPassword')}>
{show ? <EyeOff size={17} /> : <Eye size={17} />}
</button>
</div>
+1 -1
View File
@@ -31,7 +31,7 @@ export default function BottomNav({ current, onChange, onAdd }: Props) {
<span className="relative">
{label}
{/* soulignement fin, comme le lien actif de rdacet.fr */}
<span className={cx('absolute -bottom-1 left-0 h-px w-full bg-accent transition-opacity', active ? 'opacity-100' : 'opacity-0')} />
<span className={cx('absolute -bottom-1 start-0 h-px w-full bg-accent transition-opacity', active ? 'opacity-100' : 'opacity-0')} />
</span>
</button>
)
+1 -1
View File
@@ -63,7 +63,7 @@ function EntryRow({ e, onOpen, onAdd, busy, added }: { e: Entry; onOpen: (i: Med
)
if (mine) {
return (
<button onClick={() => onOpen(e.item!)} className="flex w-full items-center gap-3 py-2.5 text-left">
<button onClick={() => onOpen(e.item!)} className="flex w-full items-center gap-3 py-2.5 text-start">
{body}
<ChevronRight size={16} className="shrink-0 text-ink-3" />
</button>
+5 -5
View File
@@ -91,24 +91,24 @@ export default function DatabaseSearch({ onPick, initialQuery = '', currentExter
</div>
<div className="relative">
<Search size={17} className="pointer-events-none absolute left-3.5 top-1/2 -translate-y-1/2 text-ink-3" />
<Search size={17} className="pointer-events-none absolute start-3.5 top-1/2 -translate-y-1/2 text-ink-3" />
<input
type="search"
value={query}
onChange={(e) => setQuery(e.target.value)}
placeholder="Parasite, Frieren, Crash Landing on You…"
className="field pl-10"
className="field ps-10"
enterKeyHint="search"
autoComplete="off"
/>
{loading && <Loader2 size={17} className="absolute right-3.5 top-1/2 -translate-y-1/2 animate-spin text-ink-3" />}
{loading && <Loader2 size={17} className="absolute end-3.5 top-1/2 -translate-y-1/2 animate-spin text-ink-3" />}
</div>
{!hasKey && (
<div className="mt-2 text-xs text-ink-3">
{t('search.animeOnly')}
{onGoToSettings && (
<button type="button" onClick={onGoToSettings} className="ml-1 font-medium text-ink">
<button type="button" onClick={onGoToSettings} className="ms-1 font-medium text-ink">
{t('search.openSettings')} <span className="text-accent">→</span>
</button>
)}
@@ -128,7 +128,7 @@ export default function DatabaseSearch({ onPick, initialQuery = '', currentExter
type="button"
onClick={() => pick(r)}
disabled={!!picking}
className="flex w-full items-center gap-3 rounded-lg px-1 py-2.5 text-left transition-colors active:bg-surface-2 disabled:opacity-60"
className="flex w-full items-center gap-3 rounded-lg px-1 py-2.5 text-start transition-colors active:bg-surface-2 disabled:opacity-60"
>
{r.thumb ? (
<img src={r.thumb} alt="" loading="lazy" className="h-[4.2rem] w-11 shrink-0 rounded-md border border-line object-cover" />
+2 -2
View File
@@ -30,14 +30,14 @@ function Row({ item, scale }: { item: MediaItem; scale: RatingScale }) {
{t('public.me')} <span className="text-ink-2">{formatRating(item.rating, scale)}</span> · {t('public.label')} <span className="text-ink-2">{formatRating(item.publicRating, scale)}</span>
</p>
<div className="relative mt-1.5 h-1.5 rounded-full bg-surface-2">
<span className="absolute inset-y-0 left-1/2 w-px bg-line" />
<span className="absolute inset-y-0 start-1/2 w-px bg-line" />
<span
className={cx('absolute inset-y-0 rounded-full', gap >= 0 ? 'bg-accent' : 'bg-ink-3')}
style={gap >= 0 ? { left: '50%', width: `${width}%` } : { right: '50%', width: `${width}%` }}
/>
</div>
</div>
<span className={cx('w-11 shrink-0 text-right text-sm font-bold tabular-nums', gap >= 0 ? 'text-accent' : 'text-ink-2')}>{signed(gap, scale)}</span>
<span className={cx('w-11 shrink-0 text-end text-sm font-bold tabular-nums', gap >= 0 ? 'text-accent' : 'text-ink-2')}>{signed(gap, scale)}</span>
</li>
)
}
+3 -3
View File
@@ -86,7 +86,7 @@ export default function EpisodeList({ form, aired, onChange }: Props) {
<select
value={viewSeason}
onChange={(e) => setViewSeason(Number(e.target.value))}
className="field w-auto py-2 pr-9 text-sm font-semibold"
className="field w-auto py-2 pe-9 text-sm font-semibold"
aria-label={t('form.season')}
>
{seasons.map((n, k) => (
@@ -104,7 +104,7 @@ export default function EpisodeList({ form, aired, onChange }: Props) {
</span>
</div>
<div ref={listRef} className="max-h-[26rem] space-y-1 overflow-y-auto overscroll-contain pr-1">
<div ref={listRef} className="max-h-[26rem] space-y-1 overflow-y-auto overscroll-contain pe-1">
{rows.map((e) => {
const seen = e.number <= watchedHere
// Pas encore sorti : date à venir (TMDB), ou au-delà des épisodes diffusés
@@ -119,7 +119,7 @@ export default function EpisodeList({ form, aired, onChange }: Props) {
onClick={() => toggle(e.number)}
disabled={locked}
aria-pressed={seen}
className={cx('flex w-full items-center gap-3 rounded-xl p-1.5 text-left transition-colors', locked ? 'cursor-not-allowed' : 'active:bg-surface-2', upcoming && 'opacity-50')}
className={cx('flex w-full items-center gap-3 rounded-xl p-1.5 text-start transition-colors', locked ? 'cursor-not-allowed' : 'active:bg-surface-2', upcoming && 'opacity-50')}
>
<span className="relative aspect-video w-28 shrink-0 overflow-hidden rounded-lg border border-line bg-surface-2">
{e.still ? (
+3 -3
View File
@@ -118,7 +118,7 @@ export default function HomeHero({ items, onOpen }: { items: MediaItem[]; onOpen
<Info size={17} /> {t('homeHero.details')}
</button>
{count > 1 && (
<span className="ml-auto flex items-center gap-1.5">
<span className="ms-auto flex items-center gap-1.5">
{items.map((it, k) => (
<button
key={it.id}
@@ -151,14 +151,14 @@ export function ContinueCard({ item, onOpen }: { item: MediaItem; onOpen: (item:
{next && (
<button
onClick={() => incrementEpisode(item.id)}
className="absolute bottom-3 right-2 flex h-8 items-center gap-0.5 rounded-full bg-accent-fill px-3 text-xs font-semibold text-on-accent transition active:scale-90"
className="absolute bottom-3 end-2 flex h-8 items-center gap-0.5 rounded-full bg-accent-fill px-3 text-xs font-semibold text-on-accent transition active:scale-90"
aria-label={t('card.plusOne', { title: item.title })}
>
<Plus size={13} strokeWidth={2.5} />1
</button>
)}
</div>
<button onClick={() => onOpen(item)} className="mt-2 block w-full text-left">
<button onClick={() => onOpen(item)} className="mt-2 block w-full text-start">
<span className="block truncate text-sm font-semibold">{item.title}</span>
<span className="block text-xs text-ink-3">{next ? t('homeHero.nextUp', { ep: next }) : waitingLabel(item)}</span>
</button>
+1 -1
View File
@@ -80,7 +80,7 @@ export default function ItemHero({ form, typeLabel, editing, onEdit, primary }:
</div>
{form.overview && (
<button type="button" onClick={() => setMoreText((v) => !v)} className="mt-4 block text-left text-sm leading-relaxed text-ink-2">
<button type="button" onClick={() => setMoreText((v) => !v)} className="mt-4 block text-start text-sm leading-relaxed text-ink-2">
<span className={moreText ? 'whitespace-pre-line' : 'line-clamp-3'}>{form.overview}</span>
{form.overview.length > 160 && <span className="mt-1 block text-xs font-medium text-ink">{moreText ? t('hero.less') : t('hero.more')}</span>}
</button>
+1 -1
View File
@@ -89,7 +89,7 @@ export default function JournalView({ onOpen }: { onOpen: (item: MediaItem) => v
const d = new Date(e.date + 'T12:00:00')
return (
<li key={e.item.id + e.date + e.kind}>
<button onClick={() => onOpen(e.item)} className="flex w-full items-center gap-3 py-2.5 text-left">
<button onClick={() => onOpen(e.item)} className="flex w-full items-center gap-3 py-2.5 text-start">
<span className="w-9 shrink-0 text-center">
<span className="block text-xl font-bold leading-none tabular-nums">{d.getDate()}</span>
<span className="block text-[10px] uppercase text-ink-3">{d.toLocaleDateString(locale(), { weekday: 'short' }).replace('.', '')}</span>
+4 -4
View File
@@ -122,15 +122,15 @@ function ListDetail({ list, onBack, onOpen }: { list: CustomList; onBack: () =>
{adding ? (
<div>
<div className="relative mb-2">
<Search size={17} className="pointer-events-none absolute left-3.5 top-1/2 -translate-y-1/2 text-ink-3" />
<input type="search" value={query} onChange={(e) => setQuery(e.target.value)} placeholder={t('lists.searchLibrary')} className="field pl-10" autoFocus />
<Search size={17} className="pointer-events-none absolute start-3.5 top-1/2 -translate-y-1/2 text-ink-3" />
<input type="search" value={query} onChange={(e) => setQuery(e.target.value)} placeholder={t('lists.searchLibrary')} className="field ps-10" autoFocus />
</div>
<ul className="divide-y divide-line">
{candidates.map((item) => {
const inList = item.listIds?.includes(list.id)
return (
<li key={item.id}>
<button onClick={() => toggleInList(item.id, list.id)} className="flex w-full items-center gap-3 py-2.5 text-left">
<button onClick={() => toggleInList(item.id, list.id)} className="flex w-full items-center gap-3 py-2.5 text-start">
<div className="w-9 shrink-0">
<Poster src={item.poster} title={item.title} />
</div>
@@ -217,7 +217,7 @@ export default function ListsView({ onOpen }: { onOpen: (item: MediaItem) => voi
{lists.map((l) => {
const members = items.filter((i) => i.listIds?.includes(l.id))
return (
<button key={l.id} onClick={() => setOpenId(l.id)} className="text-left">
<button key={l.id} onClick={() => setOpenId(l.id)} className="text-start">
<Mosaic items={members} />
<p className="mt-2 truncate text-sm font-semibold">{l.name}</p>
<p className="text-xs text-ink-3">
+4 -4
View File
@@ -49,21 +49,21 @@ export function MediaCard({ item, onOpen }: { item: MediaItem; onOpen: (item: Me
<button onClick={() => onOpen(item)} className="block w-full" aria-label={t('card.open', { title: item.title })}>
<Poster src={item.poster} title={item.title} />
</button>
<TypeBadge item={item} className="pointer-events-none absolute left-2 top-2 border-transparent bg-bg/85" />
<TypeBadge item={item} className="pointer-events-none absolute start-2 top-2 border-transparent bg-bg/85" />
{item.favorite && (
<Heart size={15} className="pointer-events-none absolute right-2 top-2 fill-accent text-accent" />
<Heart size={15} className="pointer-events-none absolute end-2 top-2 fill-accent text-accent" />
)}
{canIncrement && (
<button
onClick={() => incrementEpisode(item.id)}
className="absolute bottom-2 right-2 flex h-8 items-center gap-0.5 rounded-full bg-accent-fill px-3 text-xs font-medium text-on-accent transition active:scale-90"
className="absolute bottom-2 end-2 flex h-8 items-center gap-0.5 rounded-full bg-accent-fill px-3 text-xs font-medium text-on-accent transition active:scale-90"
aria-label={t('card.plusOne', { title: item.title })}
>
<Plus size={13} strokeWidth={2.5} />1
</button>
)}
</div>
<button onClick={() => onOpen(item)} className="block w-full text-left">
<button onClick={() => onOpen(item)} className="block w-full text-start">
<h3 className="mt-2.5 line-clamp-2 font-sans text-sm font-semibold leading-snug tracking-normal">{item.title}</h3>
<div className="mt-1 flex items-center justify-between gap-2">
<StatusPill status={item.status} />
+3 -3
View File
@@ -97,7 +97,7 @@ function PublicCompare({ mine, pub, scale, source }: { mine?: number; pub: numbe
<span className="text-ink-2">
{t('public.label')} <span className="font-semibold text-ink">{show(pub)}</span> <span className="text-xs text-ink-3">· {source}</span>
</span>
{gapText && <span className={cx('text-right text-xs font-semibold', gap! >= 0.5 ? 'text-accent' : 'text-ink-3')}>{gapText}</span>}
{gapText && <span className={cx('text-end text-xs font-semibold', gap! >= 0.5 ? 'text-accent' : 'text-ink-3')}>{gapText}</span>}
</div>
)
}
@@ -378,7 +378,7 @@ export default function MediaForm({ item, onClose, onGoToSettings, onOpenItem }:
<button
type="button"
onClick={() => setShowSearch(true)}
className="flex w-full items-center justify-between rounded-2xl border border-dashed border-line-strong px-4 py-3 text-left text-sm text-ink-2"
className="flex w-full items-center justify-between rounded-2xl border border-dashed border-line-strong px-4 py-3 text-start text-sm text-ink-2"
>
<span>
{filledFrom ? (
@@ -400,7 +400,7 @@ export default function MediaForm({ item, onClose, onGoToSettings, onOpenItem }:
<div className="w-28 shrink-0">
<button type="button" onClick={() => fileRef.current?.click()} className="relative block w-full" aria-label={t('form.pickPoster')}>
<Poster src={form.poster} title={form.title || '?'} />
<span className="absolute bottom-2 right-2 grid size-8 place-items-center rounded-full bg-bg/85 text-ink">
<span className="absolute bottom-2 end-2 grid size-8 place-items-center rounded-full bg-bg/85 text-ink">
<ImagePlus size={15} />
</span>
</button>
+1 -1
View File
@@ -20,7 +20,7 @@ export default function Poster({ src, title, className }: { src?: string; title:
return (
<div className={cx('relative grid aspect-[2/3] w-full place-items-center overflow-hidden rounded-xl border border-line bg-surface-2', className)}>
<span className="text-3xl font-bold text-ink-3">{initial}</span>
<span className="absolute bottom-0 left-0 h-[3px] w-1/3 bg-accent-fill" />
<span className="absolute bottom-0 start-0 h-[3px] w-1/3 bg-accent-fill" />
</div>
)
}
+3 -3
View File
@@ -50,7 +50,7 @@ export function RatingInput({ value, onChange, scale, size = 'lg', label }: Inpu
}}
className="h-2 flex-1 accent-accent-fill"
/>
<span className={cx('w-14 text-right font-semibold tabular-nums', size === 'lg' ? 'text-xl' : 'text-sm')}>
<span className={cx('w-14 text-end font-semibold tabular-nums', size === 'lg' ? 'text-xl' : 'text-sm')}>
{value ? formatRating(value, '10') : '—'}
<span className="text-xs font-normal text-ink-3">/10</span>
</span>
@@ -87,11 +87,11 @@ export function RatingInput({ value, onChange, scale, size = 'lg', label }: Inpu
</button>
)
})}
<span className={cx('ml-2 tabular-nums text-ink-2', size === 'lg' ? 'text-base' : 'text-xs')}>
<span className={cx('ms-2 tabular-nums text-ink-2', size === 'lg' ? 'text-base' : 'text-xs')}>
{value ? formatRating(value, '5') : ''}
</span>
{value != null && size === 'lg' && (
<button type="button" onClick={() => onChange(undefined)} className="ml-auto p-1 text-ink-3" aria-label={t('rating.clear')}>
<button type="button" onClick={() => onChange(undefined)} className="ms-auto p-1 text-ink-3" aria-label={t('rating.clear')}>
<X size={18} />
</button>
)}
+1 -1
View File
@@ -134,7 +134,7 @@ export default function Recommendations() {
<button
onClick={() => addToWatchlist(r)}
disabled={done || !!busy}
className="absolute bottom-2 right-2 flex h-8 items-center gap-1 rounded-full bg-accent-fill px-2.5 text-xs font-semibold text-on-accent transition active:scale-90 disabled:opacity-90"
className="absolute bottom-2 end-2 flex h-8 items-center gap-1 rounded-full bg-accent-fill px-2.5 text-xs font-semibold text-on-accent transition active:scale-90 disabled:opacity-90"
aria-label={done ? t('reco.added', { title: r.title }) : t('reco.addLabel', { title: r.title })}
>
{busy === r.externalId ? <Loader2 size={13} className="animate-spin" /> : done ? <Check size={13} strokeWidth={3} /> : <Plus size={13} strokeWidth={3} />}
+1 -1
View File
@@ -169,7 +169,7 @@ export default function Roulette({ onClose, onOpen }: Props) {
<div className="flex-1 overflow-y-auto overscroll-contain">
<div className="safe-bottom mx-auto max-w-2xl pb-16">
{/* Rouleau d'affiches */}
<div ref={viewport} className="relative mt-6 h-[184px] overflow-hidden">
<div ref={viewport} dir="ltr" className="relative mt-6 h-[184px] overflow-hidden">
{reel.length > 0 ? (
<div
className="flex gap-3"
+1 -1
View File
@@ -38,7 +38,7 @@ export default function TagInput({ value, onChange, suggestions, placeholder, di
<div>
<div className="field flex flex-wrap items-center gap-1.5 py-2!">
{value.map((tag) => (
<span key={tag} className="inline-flex items-center gap-1 rounded-full border border-line-strong py-1 pl-3 pr-1.5 text-sm text-ink">
<span key={tag} className="inline-flex items-center gap-1 rounded-full border border-line-strong py-1 ps-3 pe-1.5 text-sm text-ink">
{display(tag)}
<button type="button" onClick={() => onChange(value.filter((v) => v !== tag))} aria-label={t('common.removeX', { name: display(tag) })} className="text-ink-3">
<X size={14} />
+7 -7
View File
@@ -96,7 +96,7 @@ export default function TopFive({ onOpen }: { onOpen: (item: MediaItem) => void
{/* N°1 : grand chiffre rouge + affiche + infos */}
<div className="flex items-end">
<div className="relative flex shrink-0 items-end">
<span className="-mr-3 mb-1">
<span className="-me-3 mb-1">
<RankNumber rank={1} big />
</span>
{first ? (
@@ -107,11 +107,11 @@ export default function TopFive({ onOpen }: { onOpen: (item: MediaItem) => void
<EmptySlot rank={1} onClick={edit} big />
)}
</div>
<div className="min-w-0 flex-1 pb-1 pl-4">
<div className="min-w-0 flex-1 pb-1 ps-4">
<span className="eyebrow text-accent">{t('top.number', { rank: 1 })} · {current.plural}</span>
{first ? (
<>
<button onClick={() => onOpen(first)} className="mt-1.5 block text-left text-lg font-bold leading-snug">
<button onClick={() => onOpen(first)} className="mt-1.5 block text-start text-lg font-bold leading-snug">
{first.title}
</button>
<div className="mt-1.5 flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-ink-3">
@@ -133,10 +133,10 @@ export default function TopFive({ onOpen }: { onOpen: (item: MediaItem) => void
return (
<div key={rank} className="min-w-0">
<div className="relative">
<span className="absolute -left-1 -top-9 z-0">
<span className="absolute -start-1 -top-9 z-0">
<RankNumber rank={rank} />
</span>
<div className="relative z-10 ml-4">
<div className="relative z-10 ms-4">
{item ? (
<button onClick={() => onOpen(item)} className="block w-full">
<Poster src={item.poster} title={item.title} />
@@ -146,10 +146,10 @@ export default function TopFive({ onOpen }: { onOpen: (item: MediaItem) => void
)}
</div>
</div>
<p className="ml-4 mt-1.5 truncate text-[11px] font-medium text-ink-2" title={item?.title}>
<p className="ms-4 mt-1.5 truncate text-[11px] font-medium text-ink-2" title={item?.title}>
{item ? item.title : '—'}
</p>
{item?.rating ? <p className="ml-4 text-[10px] text-ink-3">{formatRating(item.rating, settings.ratingScale)}/{settings.ratingScale}</p> : null}
{item?.rating ? <p className="ms-4 text-[10px] text-ink-3">{formatRating(item.rating, settings.ratingScale)}/{settings.ratingScale}</p> : null}
</div>
)
})}
+3 -3
View File
@@ -140,8 +140,8 @@ export default function TopFiveEditor({ category: initialCategory, onClose }: Pr
</button>
</div>
<div className="relative mb-2">
<Search size={17} className="pointer-events-none absolute left-3.5 top-1/2 -translate-y-1/2 text-ink-3" />
<input type="search" value={query} onChange={(e) => setQuery(e.target.value)} placeholder={t('top.searchTitle')} className="field pl-10" />
<Search size={17} className="pointer-events-none absolute start-3.5 top-1/2 -translate-y-1/2 text-ink-3" />
<input type="search" value={query} onChange={(e) => setQuery(e.target.value)} placeholder={t('top.searchTitle')} className="field ps-10" />
</div>
{ids.length >= 5 && <p className="py-2 text-xs text-ink-3">{t('top.full')}</p>}
<ul className="divide-y divide-line">
@@ -150,7 +150,7 @@ export default function TopFiveEditor({ category: initialCategory, onClose }: Pr
<button
onClick={() => setIds((p) => (p.length < 5 ? [...p, item.id] : p))}
disabled={ids.length >= 5}
className="flex w-full items-center gap-3 py-2.5 text-left disabled:opacity-40"
className="flex w-full items-center gap-3 py-2.5 text-start disabled:opacity-40"
>
<div className="w-9 shrink-0">
<Poster src={item.poster} title={item.title} />
+6 -6
View File
@@ -120,7 +120,7 @@ export default function EditProfile({ onClose }: { onClose: () => void }) {
<div className="-mt-11 flex items-end gap-3">
<button type="button" onClick={() => avatarInput.current?.click()} className="relative rounded-full" aria-label={t('social.changeAvatar')}>
<Avatar url={avatar.removed ? undefined : avatar.preview} name={displayName || me.username} size={88} className="border-4 border-bg" />
<span className="absolute bottom-1 right-1 grid size-7 place-items-center rounded-full bg-accent-fill text-on-accent">
<span className="absolute bottom-1 end-1 grid size-7 place-items-center rounded-full bg-accent-fill text-on-accent">
<Camera size={14} />
</span>
</button>
@@ -147,9 +147,9 @@ export default function EditProfile({ onClose }: { onClose: () => void }) {
<label className="block">
<span className="label">{t('social.username')}</span>
<div className="relative">
<span className="pointer-events-none absolute left-3.5 top-1/2 -translate-y-1/2 text-ink-3">@</span>
<span className="pointer-events-none absolute start-3.5 top-1/2 -translate-y-1/2 text-ink-3">@</span>
<input
className={cx('field pl-8', username && !usernameOk && 'border-accent!')}
className={cx('field ps-8', username && !usernameOk && 'border-accent!')}
value={username}
onChange={(e) => setUsername(e.target.value.toLowerCase())}
maxLength={21}
@@ -163,17 +163,17 @@ export default function EditProfile({ onClose }: { onClose: () => void }) {
<label className="block">
<span className="label">{t('social.bio')}</span>
<textarea className="field min-h-24 resize-y" value={bio} onChange={(e) => setBio(e.target.value)} maxLength={300} placeholder={t('social.bioPh')} />
<span className="mt-1 block text-right text-[11px] text-ink-3">{bio.length}/300</span>
<span className="mt-1 block text-end text-[11px] text-ink-3">{bio.length}/300</span>
</label>
<button type="button" role="switch" aria-checked={isPrivate} onClick={() => setIsPrivate((v) => !v)} className="flex w-full items-center gap-3 rounded-2xl border border-line px-4 py-3.5 text-left">
<button type="button" role="switch" aria-checked={isPrivate} onClick={() => setIsPrivate((v) => !v)} className="flex w-full items-center gap-3 rounded-2xl border border-line px-4 py-3.5 text-start">
<Lock size={18} className="shrink-0 text-ink-2" />
<span className="flex-1">
<span className="block text-sm font-medium">{t('social.privateAccount')}</span>
<span className="mt-0.5 block text-xs text-ink-3">{t('social.privateHint')}</span>
</span>
<span className={cx('relative h-6 w-11 shrink-0 rounded-full transition-colors', isPrivate ? 'bg-accent-fill' : 'bg-surface-2 border border-line-strong')}>
<span className={cx('absolute top-0.5 size-5 rounded-full bg-ink transition-all', isPrivate ? 'left-[22px] bg-on-accent' : 'left-0.5')} />
<span className={cx('absolute top-0.5 size-5 rounded-full bg-ink transition-all', isPrivate ? 'start-[22px] bg-on-accent' : 'start-0.5')} />
</span>
</button>
+2 -2
View File
@@ -67,7 +67,7 @@ export default function FriendsFeed() {
<Loader2 size={14} className="animate-spin" /> {t('social.loading')}
</p>
) : entries.length === 0 ? (
<button onClick={social.openSearch} className="flex w-full items-center gap-3 rounded-2xl border border-dashed border-line-strong p-4 text-left">
<button onClick={social.openSearch} className="flex w-full items-center gap-3 rounded-2xl border border-dashed border-line-strong p-4 text-start">
<span className="grid size-10 shrink-0 place-items-center rounded-full bg-surface-2 text-accent">
<UserPlus size={18} />
</span>
@@ -81,7 +81,7 @@ export default function FriendsFeed() {
<button onClick={() => social.openProfile(e.user.username)} aria-label={e.user.displayName}>
<Avatar url={e.user.avatarUrl} name={e.user.displayName} size={36} />
</button>
<button onClick={() => social.openItem(e.item, e.user)} className="flex min-w-0 flex-1 items-center gap-3 text-left">
<button onClick={() => social.openItem(e.item, e.user)} className="flex min-w-0 flex-1 items-center gap-3 text-start">
<span className="min-w-0 flex-1">
<span className="line-clamp-2 text-sm leading-snug text-ink-2">
<span className="font-semibold text-ink">{e.user.displayName}</span> {t(VERB[e.kind])}{' '}
+3 -3
View File
@@ -52,20 +52,20 @@ export default function PeopleSearch({ onClose }: { onClose: () => void }) {
<Sheet label={t('social.findFriends')} title={t('social.findFriends')} onClose={onClose}>
<div className="px-4 pt-4">
<div className="relative">
<Search size={17} className="pointer-events-none absolute left-3.5 top-1/2 -translate-y-1/2 text-ink-3" />
<Search size={17} className="pointer-events-none absolute start-3.5 top-1/2 -translate-y-1/2 text-ink-3" />
<input
type="search"
value={q}
onChange={(e) => setQ(e.target.value)}
placeholder={t('social.searchPh')}
className="field pl-10"
className="field ps-10"
autoFocus
autoCapitalize="off"
autoComplete="off"
spellCheck={false}
enterKeyHint="search"
/>
{loading && <Loader2 size={17} className="absolute right-3.5 top-1/2 -translate-y-1/2 animate-spin text-ink-3" />}
{loading && <Loader2 size={17} className="absolute end-3.5 top-1/2 -translate-y-1/2 animate-spin text-ink-3" />}
</div>
{results.length > 0 ? (
+1 -1
View File
@@ -31,7 +31,7 @@ export default function PersonRow({ person, actions }: { person: ProfileCard; ac
return (
<div className="flex items-center gap-3 py-2.5">
<button onClick={() => social.openProfile(person.username)} className="flex min-w-0 flex-1 items-center gap-3 text-left">
<button onClick={() => social.openProfile(person.username)} className="flex min-w-0 flex-1 items-center gap-3 text-start">
<Avatar url={person.avatarUrl} name={person.displayName} size={44} />
<span className="min-w-0">
<span className="block truncate text-sm font-semibold">{person.displayName}</span>
+2 -2
View File
@@ -16,7 +16,7 @@ import { useSocial } from './SocialProvider'
function PosterTile({ item, onOpen, caption }: { item: MediaItem; onOpen: () => void; caption?: string }) {
const { settings } = useMedia()
return (
<button onClick={onOpen} className="block w-full text-left">
<button onClick={onOpen} className="block w-full text-start">
<Poster src={item.poster} title={item.title} />
<p className="mt-1.5 truncate text-[11px] font-medium text-ink-2">{item.title}</p>
<p className="flex h-4 items-center gap-1 text-[11px] text-ink-3">
@@ -286,7 +286,7 @@ function ProfileTab({ profile, topByCategory, onOpen }: { profile: Profile; topB
{c.items.map((item) => (
<div key={item.id} className="relative">
<PosterTile item={item} onOpen={() => onOpen(item)} />
<span className="absolute left-1 top-1 grid size-5 place-items-center rounded-full bg-bg/85 text-[10px] font-bold">{item.top!.rank}</span>
<span className="absolute start-1 top-1 grid size-5 place-items-center rounded-full bg-bg/85 text-[10px] font-bold">{item.top!.rank}</span>
</div>
))}
</div>
+2 -2
View File
@@ -60,9 +60,9 @@ export default function WelcomeProfile({ onLater }: { onLater: () => void }) {
<label className="block">
<span className="label">{t('social.username')}</span>
<div className="relative">
<span className="pointer-events-none absolute left-3.5 top-1/2 -translate-y-1/2 text-ink-3">@</span>
<span className="pointer-events-none absolute start-3.5 top-1/2 -translate-y-1/2 text-ink-3">@</span>
<input
className={cx('field pl-8', clean && !usernameOk && 'border-accent!')}
className={cx('field ps-8', clean && !usernameOk && 'border-accent!')}
value={username}
onChange={(e) => setUsername(toUsername(e.target.value))}
maxLength={21}