1 parent
4e270e616a
commit
c82b7894a5
51 files changed
+7374
-104
No files matched your search
@@ -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>
|
||||
|
||||
|
||||
@@ -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])}{' '}
|
||||
|
||||
@@ -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 ? (
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in new issue
Block a user