1 parent
04b5005e3b
commit
51a320b31f
29 files changed
+1139
-7
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { locale, t } from '../i18n'
|
||||
import { Check, Heart, ImagePlus, Loader2, Minus, Plus, Share2, Trash2, X } from 'lucide-react'
|
||||
import { Check, Heart, ImagePlus, Loader2, MessagesSquare, Minus, Plus, Share2, Trash2, X } from 'lucide-react'
|
||||
import { useEffect, useMemo, useRef, useState, type ReactNode } from 'react'
|
||||
import { CRITERIA, DEFAULT_FILM_MINUTES, MEDIA_TYPES, STATUSES, TYPE_BY_VALUE } from '../lib/constants'
|
||||
import { canonicalGenre, canonicalSubtype, genreLabel, genreSuggestions as defaultGenres, subtypeLabel, subtypeSuggestions } from '../lib/genres'
|
||||
@@ -18,6 +18,7 @@ import SharePreview from './SharePreview'
|
||||
import DatabaseSearch from './DatabaseSearch'
|
||||
import EpisodeList from './EpisodeList'
|
||||
import ItemHero, { type HeroAction } from './ItemHero'
|
||||
import { useSocial } from './social/SocialProvider'
|
||||
import { NewListForm } from './ListsView'
|
||||
import Poster from './Poster'
|
||||
import { RatingInput } from './Rating'
|
||||
@@ -136,6 +137,7 @@ function Rewatches({ dates, onChange }: { dates: string[]; onChange: (d: string[
|
||||
}
|
||||
|
||||
export default function MediaForm({ item, onClose, onGoToSettings, onOpenItem }: Props) {
|
||||
const social = useSocial()
|
||||
const { add, update, remove, items, settings, lists, patchMany } = useMedia()
|
||||
const [form, setForm] = useState<MediaInput>(() => {
|
||||
if (!item) return EMPTY
|
||||
@@ -597,6 +599,11 @@ export default function MediaForm({ item, onClose, onGoToSettings, onOpenItem }:
|
||||
|
||||
<Section title={t('form.review')}>
|
||||
<textarea className="field min-h-32 resize-y" value={form.notes ?? ''} onChange={(e) => set('notes', e.target.value)} placeholder={t('form.reviewPh')} />
|
||||
{form.externalId && social.enabled && (
|
||||
<button type="button" onClick={() => social.openReviews(form.externalId!, form.title)} className="mt-3 flex w-full items-center justify-center gap-2 rounded-xl border border-line py-2.5 text-sm font-medium text-ink-2 transition-colors active:bg-surface-2">
|
||||
<MessagesSquare size={16} /> {t('reviews.seeAll')}
|
||||
</button>
|
||||
)}
|
||||
</Section>
|
||||
|
||||
<div className="space-y-2 border-t border-line pt-6">
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { Check, Loader2, Plus, Star } from 'lucide-react'
|
||||
import { Check, Loader2, MessagesSquare, Plus, Star } from 'lucide-react'
|
||||
import { useState } from 'react'
|
||||
import { t } from '../../i18n'
|
||||
import { genreLabel } from '../../lib/genres'
|
||||
import { useScrollLock } from '../../lib/scrollLock'
|
||||
import { useSocial } from './SocialProvider'
|
||||
import { cx, formatDate, formatRating, normalizeText } from '../../lib/utils'
|
||||
import { useMedia } from '../../store'
|
||||
import type { MediaInput, MediaItem } from '../../types'
|
||||
@@ -20,6 +21,7 @@ export interface PeekOwner {
|
||||
/** Aperçu d'un titre de quelqu'un d'autre : sa note, son avis public, et ajout à ma liste « À voir ». */
|
||||
export default function ItemPeek({ item, owner, onClose }: { item: MediaItem; owner?: PeekOwner; onClose: () => void }) {
|
||||
const { items, add, settings } = useMedia()
|
||||
const social = useSocial()
|
||||
const [busy, setBusy] = useState(false)
|
||||
const [added, setAdded] = useState(false)
|
||||
const owned = items.some(
|
||||
@@ -107,6 +109,12 @@ export default function ItemPeek({ item, owner, onClose }: { item: MediaItem; ow
|
||||
</div>
|
||||
)}
|
||||
|
||||
{item.externalId && (
|
||||
<button onClick={() => social.openReviews(item.externalId!, item.title)} className="mt-4 flex w-full items-center justify-center gap-2 rounded-xl border border-line py-2.5 text-sm font-medium text-ink-2 transition-colors active:bg-surface-2">
|
||||
<MessagesSquare size={16} /> {t('reviews.seeAll')}
|
||||
</button>
|
||||
)}
|
||||
|
||||
{item.overview && <p className="mt-4 line-clamp-5 text-sm leading-relaxed text-ink-2">{item.overview}</p>}
|
||||
|
||||
<div className="mt-5 grid grid-cols-2 gap-2">
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
import { Loader2 } from 'lucide-react'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { t } from '../../i18n'
|
||||
import { listNotifications, markNotificationsRead, type AppNotification, type NotificationKind } from '../../lib/cloud/notifications'
|
||||
import { cx, formatDate } from '../../lib/utils'
|
||||
import { EmptyState } from '../ui'
|
||||
import Avatar from './Avatar'
|
||||
import Sheet from './Sheet'
|
||||
|
||||
const PAGE = 30
|
||||
const FOLLOW_KINDS: NotificationKind[] = ['follow_request', 'follow_accepted', 'new_follower']
|
||||
|
||||
const VERB: Record<NotificationKind, () => string> = {
|
||||
follow_request: () => t('notif.follow_request'),
|
||||
follow_accepted: () => t('notif.follow_accepted'),
|
||||
new_follower: () => t('notif.new_follower'),
|
||||
reaction: () => t('notif.reaction'),
|
||||
}
|
||||
|
||||
/** Liste des notifications (abonnements, demandes acceptées, réactions). Marque comme lues à l'ouverture. */
|
||||
export default function Notifications({ onClose, onOpenProfile }: { onClose: () => void; onOpenProfile: (username: string) => void }) {
|
||||
const [items, setItems] = useState<AppNotification[] | undefined>(undefined)
|
||||
const [done, setDone] = useState(false)
|
||||
const [loadingMore, setLoadingMore] = useState(false)
|
||||
|
||||
useEffect(() => {
|
||||
let alive = true
|
||||
void (async () => {
|
||||
try {
|
||||
const page = await listNotifications(0)
|
||||
if (!alive) return
|
||||
setItems(page)
|
||||
setDone(page.length < PAGE)
|
||||
} catch {
|
||||
if (alive) {
|
||||
setItems([])
|
||||
setDone(true)
|
||||
}
|
||||
}
|
||||
// Marque comme lu (feu et oubli) pour vider le badge
|
||||
markNotificationsRead().catch(() => {})
|
||||
})()
|
||||
return () => {
|
||||
alive = false
|
||||
}
|
||||
}, [])
|
||||
|
||||
const loadMore = async () => {
|
||||
if (!items || loadingMore) return
|
||||
setLoadingMore(true)
|
||||
try {
|
||||
const page = await listNotifications(items.length)
|
||||
setItems((prev) => [...(prev ?? []), ...page])
|
||||
setDone(page.length < PAGE)
|
||||
} catch {
|
||||
setDone(true)
|
||||
} finally {
|
||||
setLoadingMore(false)
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<Sheet title={t('notif.title')} label={t('notif.title')} onClose={onClose}>
|
||||
{items === undefined ? (
|
||||
<p className="flex items-center justify-center py-16 text-ink-3">
|
||||
<Loader2 size={20} className="animate-spin" />
|
||||
</p>
|
||||
) : items.length === 0 ? (
|
||||
<div className="px-4">
|
||||
<EmptyState title={t('notif.empty')} />
|
||||
</div>
|
||||
) : (
|
||||
<ul>
|
||||
{items.map((n) => (
|
||||
<Row key={n.id} n={n} onOpenProfile={onOpenProfile} />
|
||||
))}
|
||||
{!done && (
|
||||
<li className="p-4">
|
||||
<button onClick={loadMore} disabled={loadingMore} className="btn btn-ghost w-full">
|
||||
{loadingMore ? <Loader2 size={15} className="animate-spin" /> : t('social.loadMore')}
|
||||
</button>
|
||||
</li>
|
||||
)}
|
||||
</ul>
|
||||
)}
|
||||
</Sheet>
|
||||
)
|
||||
}
|
||||
|
||||
function Row({ n, onOpenProfile }: { n: AppNotification; onOpenProfile: (username: string) => void }) {
|
||||
const actor = n.actor
|
||||
const actorName = actor?.display_name ?? t('notif.someone')
|
||||
const unread = n.read_at === null
|
||||
const username = actor?.username
|
||||
const target = username != null && FOLLOW_KINDS.includes(n.kind) ? username : null
|
||||
|
||||
const inner = (
|
||||
<>
|
||||
{unread && <span className="size-2 shrink-0 rounded-full bg-accent-fill" aria-hidden="true" />}
|
||||
<Avatar url={actor?.avatar_url ?? undefined} name={actorName} size={38} />
|
||||
<span className="min-w-0 flex-1 text-sm leading-snug text-ink-2">
|
||||
<b className="text-ink">{actorName}</b> {VERB[n.kind]()}
|
||||
{n.kind === 'reaction' && (
|
||||
<>
|
||||
{n.emoji ? ` ${n.emoji}` : ''}
|
||||
{n.title ? ` ${t('notif.on', { title: n.title })}` : ''}
|
||||
</>
|
||||
)}
|
||||
</span>
|
||||
<span className="shrink-0 text-xs text-ink-3">{formatDate(n.created_at)}</span>
|
||||
</>
|
||||
)
|
||||
|
||||
const base = cx('flex items-center gap-3 border-b border-line px-4 py-3 text-start', unread && 'bg-surface-2')
|
||||
|
||||
return (
|
||||
<li>
|
||||
{target != null ? (
|
||||
<button onClick={() => onOpenProfile(target)} className={cx(base, 'w-full')}>
|
||||
{inner}
|
||||
</button>
|
||||
) : (
|
||||
<div className={base}>{inner}</div>
|
||||
)}
|
||||
</li>
|
||||
)
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
import { createContext, useCallback, useContext, useEffect, useMemo, useState, type ReactNode } from 'react'
|
||||
import { getFollowRequests, getMyProfile, type Profile, type ProfileCard } from '../../lib/cloud/social'
|
||||
import { markNotificationsRead, unreadCount } from '../../lib/cloud/notifications'
|
||||
import { useMedia } from '../../store'
|
||||
import type { MediaItem } from '../../types'
|
||||
import EditProfile from './EditProfile'
|
||||
@@ -7,6 +8,8 @@ import FollowList from './FollowList'
|
||||
import ItemPeek, { type PeekOwner } from './ItemPeek'
|
||||
import PeopleSearch from './PeopleSearch'
|
||||
import ProfileView from './ProfileView'
|
||||
import TitleReviews from './TitleReviews'
|
||||
import Notifications from './Notifications'
|
||||
import { useOnResume } from '../../lib/onResume'
|
||||
import WelcomeProfile, { RANDOM_USERNAME } from './WelcomeProfile'
|
||||
|
||||
@@ -20,6 +23,12 @@ interface SocialApi {
|
||||
openSearch: () => void
|
||||
openEdit: () => void
|
||||
openFollowList: (profile: Profile, kind: 'followers' | 'following') => void
|
||||
/** Tous les avis sur un titre (amis / autres) */
|
||||
openReviews: (externalId: string, title: string) => void
|
||||
/** Panneau des notifications */
|
||||
openNotifications: () => void
|
||||
/** Notifications non lues */
|
||||
unread: number
|
||||
peek: (item: MediaItem, owner?: PeekOwner) => void
|
||||
/** Ouvre la fiche si elle est à moi, sinon l'aperçu */
|
||||
openItem: (item: MediaItem, owner?: PeekOwner) => void
|
||||
@@ -34,6 +43,9 @@ const SocialContext = createContext<SocialApi>({
|
||||
openSearch: () => {},
|
||||
openEdit: () => {},
|
||||
openFollowList: () => {},
|
||||
openReviews: () => {},
|
||||
openNotifications: () => {},
|
||||
unread: 0,
|
||||
peek: () => {},
|
||||
openItem: () => {},
|
||||
})
|
||||
@@ -45,6 +57,8 @@ type Overlay =
|
||||
| { kind: 'search' }
|
||||
| { kind: 'edit' }
|
||||
| { kind: 'follows'; profile: Profile; list: 'followers' | 'following' }
|
||||
| { kind: 'reviews'; externalId: string; title: string }
|
||||
| { kind: 'notifications' }
|
||||
|
||||
/** Profils, recherche et aperçus : affichés par-dessus l'app, empilés (le bouton fermer revient au précédent). */
|
||||
export function SocialProvider({ children, onOpenOwnItem }: { children: ReactNode; onOpenOwnItem: (item: MediaItem) => void }) {
|
||||
@@ -52,6 +66,7 @@ export function SocialProvider({ children, onOpenOwnItem }: { children: ReactNod
|
||||
const enabled = !!account
|
||||
const [me, setMe] = useState<Profile | null>(null)
|
||||
const [requests, setRequests] = useState<ProfileCard[]>([])
|
||||
const [unread, setUnread] = useState(0)
|
||||
const [stack, setStack] = useState<Overlay[]>([])
|
||||
const [peeked, setPeeked] = useState<{ item: MediaItem; owner?: PeekOwner }>()
|
||||
// « Plus tard » sur le choix du pseudo : redemandé au prochain lancement
|
||||
@@ -74,9 +89,10 @@ export function SocialProvider({ children, onOpenOwnItem }: { children: ReactNod
|
||||
const refresh = useCallback(async () => {
|
||||
if (!enabled || !navigator.onLine) return
|
||||
try {
|
||||
const [p, r] = await Promise.all([getMyProfile(), getFollowRequests()])
|
||||
const [p, r, u] = await Promise.all([getMyProfile(), getFollowRequests(), unreadCount()])
|
||||
setMe(p)
|
||||
setRequests(r)
|
||||
setUnread(u)
|
||||
} catch {
|
||||
/* hors-ligne / serveur pas encore à jour : le reste de l'app fonctionne */
|
||||
}
|
||||
@@ -125,10 +141,17 @@ export function SocialProvider({ children, onOpenOwnItem }: { children: ReactNod
|
||||
openSearch: () => push({ kind: 'search' }),
|
||||
openEdit: () => push({ kind: 'edit' }),
|
||||
openFollowList: (profile, list) => push({ kind: 'follows', profile, list }),
|
||||
openReviews: (externalId, title) => push({ kind: 'reviews', externalId, title }),
|
||||
openNotifications: () => {
|
||||
setUnread(0)
|
||||
void markNotificationsRead().catch(() => {})
|
||||
push({ kind: 'notifications' })
|
||||
},
|
||||
unread,
|
||||
peek: (item, owner) => setPeeked({ item, owner }),
|
||||
openItem,
|
||||
}),
|
||||
[enabled, me, requests, refresh, push, openItem],
|
||||
[enabled, me, requests, unread, refresh, push, openItem],
|
||||
)
|
||||
|
||||
return (
|
||||
@@ -142,8 +165,12 @@ export function SocialProvider({ children, onOpenOwnItem }: { children: ReactNod
|
||||
<PeopleSearch key={k} onClose={pop} />
|
||||
) : o.kind === 'edit' ? (
|
||||
<EditProfile key={k} onClose={pop} />
|
||||
) : (
|
||||
) : o.kind === 'follows' ? (
|
||||
<FollowList key={k} profile={o.profile} initial={o.list} onClose={pop} />
|
||||
) : o.kind === 'reviews' ? (
|
||||
<TitleReviews key={k} externalId={o.externalId} title={o.title} onClose={pop} onOpenProfile={(u) => push({ kind: 'profile', username: u })} />
|
||||
) : (
|
||||
<Notifications key={k} onClose={pop} onOpenProfile={(u) => push({ kind: 'profile', username: u })} />
|
||||
),
|
||||
)}
|
||||
{children}
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
import { Loader2, Star } from 'lucide-react'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { t } from '../../i18n'
|
||||
import { REACTION_EMOJIS, reactToReview, titleReviews, unreactReview, type ReactionEmoji, type TitleReview, type TitleReviews as TitleReviewsData } from '../../lib/cloud/reviews'
|
||||
import { cx, formatRating } from '../../lib/utils'
|
||||
import { useMedia } from '../../store'
|
||||
import Avatar from './Avatar'
|
||||
import Sheet from './Sheet'
|
||||
|
||||
/** Écran plein : tous les avis sur un même titre (amis / autres membres) avec réactions. */
|
||||
export default function TitleReviews({ externalId, title, onClose, onOpenProfile }: { externalId: string; title: string; onClose: () => void; onOpenProfile: (username: string) => void }) {
|
||||
const [data, setData] = useState<TitleReviewsData>()
|
||||
const [error, setError] = useState(false)
|
||||
|
||||
useEffect(() => {
|
||||
let alive = true
|
||||
titleReviews(externalId)
|
||||
.then((d) => alive && setData(d))
|
||||
.catch(() => alive && setError(true))
|
||||
return () => {
|
||||
alive = false
|
||||
}
|
||||
}, [externalId])
|
||||
|
||||
const bothEmpty = !!data && data.friends.length === 0 && data.others.length === 0
|
||||
|
||||
return (
|
||||
<Sheet title={title} label={t('reviews.title')} onClose={onClose}>
|
||||
<p className="eyebrow px-4 pt-4">{t('reviews.title')}</p>
|
||||
{data === undefined && !error ? (
|
||||
<p className="flex items-center justify-center gap-2 px-4 py-16 text-sm text-ink-3">
|
||||
<Loader2 size={16} className="animate-spin" /> {t('social.loading')}
|
||||
</p>
|
||||
) : !data || error || bothEmpty ? (
|
||||
<p className="px-4 py-16 text-center text-sm text-ink-3">{t('reviews.none')}</p>
|
||||
) : (
|
||||
<div className="grid grid-cols-1 gap-4 px-4 pt-4 sm:grid-cols-2">
|
||||
<ReviewColumn heading={t('reviews.friends')} empty={t('reviews.noneFriends')} list={data.friends} onOpenProfile={onOpenProfile} />
|
||||
<ReviewColumn heading={t('reviews.others')} empty={t('reviews.noneOthers')} list={data.others} onOpenProfile={onOpenProfile} />
|
||||
</div>
|
||||
)}
|
||||
</Sheet>
|
||||
)
|
||||
}
|
||||
|
||||
function ReviewColumn({ heading, empty, list, onOpenProfile }: { heading: string; empty: string; list: TitleReview[]; onOpenProfile: (username: string) => void }) {
|
||||
return (
|
||||
<section>
|
||||
<p className="eyebrow mb-2">{heading}</p>
|
||||
{list.length === 0 ? (
|
||||
<p className="text-sm text-ink-3">{empty}</p>
|
||||
) : (
|
||||
<div className="space-y-3">
|
||||
{list.map((r) => (
|
||||
<ReviewCard key={`${r.user_id}-${r.item_id}`} r={r} onOpenProfile={onOpenProfile} />
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</section>
|
||||
)
|
||||
}
|
||||
|
||||
function ReviewCard({ r, onOpenProfile }: { r: TitleReview; onOpenProfile: (username: string) => void }) {
|
||||
const { settings } = useMedia()
|
||||
const [reactions, setReactions] = useState<Record<string, number>>(r.reactions)
|
||||
const [mine, setMine] = useState<string | null>(r.mine)
|
||||
const [busy, setBusy] = useState(false)
|
||||
|
||||
const toggle = async (emoji: ReactionEmoji) => {
|
||||
if (busy) return
|
||||
const prev = { reactions, mine }
|
||||
const next: Record<string, number> = { ...reactions }
|
||||
if (mine === emoji) {
|
||||
next[emoji] = Math.max(0, (next[emoji] ?? 0) - 1)
|
||||
setReactions(next)
|
||||
setMine(null)
|
||||
} else {
|
||||
if (mine) next[mine] = Math.max(0, (next[mine] ?? 0) - 1)
|
||||
next[emoji] = (next[emoji] ?? 0) + 1
|
||||
setReactions(next)
|
||||
setMine(emoji)
|
||||
}
|
||||
setBusy(true)
|
||||
try {
|
||||
if (prev.mine === emoji) await unreactReview(r.user_id, r.item_id)
|
||||
else await reactToReview(r.user_id, r.item_id, emoji)
|
||||
} catch {
|
||||
setReactions(prev.reactions)
|
||||
setMine(prev.mine)
|
||||
} finally {
|
||||
setBusy(false)
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<article className="card p-3.5">
|
||||
<div className="flex items-center gap-2.5">
|
||||
<Avatar url={r.user.avatar_url ?? undefined} name={r.user.display_name} size={34} />
|
||||
<button onClick={() => onOpenProfile(r.user.username)} className="min-w-0 flex-1 text-start">
|
||||
<p className="truncate text-sm font-semibold">{r.user.display_name}</p>
|
||||
<p className="truncate text-xs text-ink-3">@{r.user.username}</p>
|
||||
</button>
|
||||
{r.rating != null && (
|
||||
<span className="flex shrink-0 items-center gap-0.5 text-sm font-semibold text-ink-2">
|
||||
<Star size={12} className="fill-accent text-accent" />
|
||||
{formatRating(r.rating, settings.ratingScale)}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
{r.notes && <p className="mt-2 line-clamp-6 whitespace-pre-line text-sm leading-relaxed text-ink-2">{r.notes}</p>}
|
||||
<div className="mt-3 flex flex-wrap gap-1.5">
|
||||
{REACTION_EMOJIS.map((emoji) => {
|
||||
const count = reactions[emoji] ?? 0
|
||||
const on = mine === emoji
|
||||
return (
|
||||
<button
|
||||
key={emoji}
|
||||
onClick={() => void toggle(emoji)}
|
||||
disabled={busy}
|
||||
aria-pressed={on}
|
||||
className={cx('inline-flex items-center gap-1 rounded-full border px-2 py-1 text-sm transition-colors disabled:opacity-60', on ? 'border-accent text-ink' : 'border-line text-ink-2')}
|
||||
>
|
||||
<span>{emoji}</span>
|
||||
{count > 0 && <span className="text-xs font-medium">{count}</span>}
|
||||
</button>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</article>
|
||||
)
|
||||
}
|
||||
@@ -234,6 +234,24 @@ const dict: Translations = {
|
||||
'settings.installApp': 'تثبيت التطبيق',
|
||||
'settings.installHint': 'أضِف AzuuCine إلى شاشتك الرئيسية أو سطح المكتب.',
|
||||
'settings.installed': 'تم تثبيت التطبيق',
|
||||
'reviews.title': 'التقييمات',
|
||||
'reviews.friends': 'أصدقاؤك',
|
||||
'reviews.others': 'أعضاء آخرون',
|
||||
'reviews.noneFriends': 'لا تقييمات من أصدقائك',
|
||||
'reviews.noneOthers': 'لا توجد تقييمات أخرى',
|
||||
'reviews.none': 'لا توجد تقييمات بعد',
|
||||
'reviews.seeAll': 'عرض كل التقييمات',
|
||||
'reviews.react': 'تفاعل',
|
||||
'notif.title': 'الإشعارات',
|
||||
'notif.empty': 'لا إشعارات',
|
||||
'notif.someone': 'شخص ما',
|
||||
'notif.follow_request': 'يريد متابعتك',
|
||||
'notif.follow_accepted': 'قبل طلبك',
|
||||
'notif.new_follower': 'بدأ بمتابعتك',
|
||||
'notif.reaction': 'تفاعل مع تقييمك',
|
||||
'notif.on': 'على {title}',
|
||||
'home.notifications': 'الإشعارات',
|
||||
'home.notificationsN': '{count} إشعارات',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
|
||||
@@ -228,6 +228,24 @@ const dict: Translations = {
|
||||
'settings.installApp': 'App installieren',
|
||||
'settings.installHint': 'Füge AzuuCine zum Startbildschirm oder Desktop hinzu.',
|
||||
'settings.installed': 'App installiert',
|
||||
'reviews.title': 'Rezensionen',
|
||||
'reviews.friends': 'Deine Freunde',
|
||||
'reviews.others': 'Andere Mitglieder',
|
||||
'reviews.noneFriends': 'Keine Rezensionen deiner Freunde',
|
||||
'reviews.noneOthers': 'Keine weiteren Rezensionen',
|
||||
'reviews.none': 'Noch keine Rezensionen',
|
||||
'reviews.seeAll': 'Alle Rezensionen ansehen',
|
||||
'reviews.react': 'Reagieren',
|
||||
'notif.title': 'Mitteilungen',
|
||||
'notif.empty': 'Keine Mitteilungen',
|
||||
'notif.someone': 'Jemand',
|
||||
'notif.follow_request': 'möchte dir folgen',
|
||||
'notif.follow_accepted': 'hat deine Anfrage angenommen',
|
||||
'notif.new_follower': 'folgt dir jetzt',
|
||||
'notif.reaction': 'hat auf deine Rezension reagiert',
|
||||
'notif.on': 'zu {title}',
|
||||
'home.notifications': 'Mitteilungen',
|
||||
'home.notificationsN': '{count} Mitteilungen',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
|
||||
@@ -228,6 +228,24 @@ const dict: Translations = {
|
||||
'settings.installApp': 'Install the app',
|
||||
'settings.installHint': 'Add AzuuCine to your home screen or desktop.',
|
||||
'settings.installed': 'App installed',
|
||||
'reviews.title': 'Reviews',
|
||||
'reviews.friends': 'Your friends',
|
||||
'reviews.others': 'Other members',
|
||||
'reviews.noneFriends': 'No reviews from your friends',
|
||||
'reviews.noneOthers': 'No other reviews',
|
||||
'reviews.none': 'No reviews yet',
|
||||
'reviews.seeAll': 'See all reviews',
|
||||
'reviews.react': 'React',
|
||||
'notif.title': 'Notifications',
|
||||
'notif.empty': 'No notifications',
|
||||
'notif.someone': 'Someone',
|
||||
'notif.follow_request': 'wants to follow you',
|
||||
'notif.follow_accepted': 'accepted your request',
|
||||
'notif.new_follower': 'started following you',
|
||||
'notif.reaction': 'reacted to your review',
|
||||
'notif.on': 'on {title}',
|
||||
'home.notifications': 'Notifications',
|
||||
'home.notificationsN': '{count} notifications',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
|
||||
@@ -228,6 +228,24 @@ const dict: Translations = {
|
||||
'settings.installApp': 'Instalar la aplicación',
|
||||
'settings.installHint': 'Añade AzuuCine a tu pantalla de inicio o escritorio.',
|
||||
'settings.installed': 'Aplicación instalada',
|
||||
'reviews.title': 'Opiniones',
|
||||
'reviews.friends': 'Tus amigos',
|
||||
'reviews.others': 'Otros miembros',
|
||||
'reviews.noneFriends': 'Ningún opinión de tus amigos',
|
||||
'reviews.noneOthers': 'Ninguna otra opinión',
|
||||
'reviews.none': 'Aún no hay opiniones',
|
||||
'reviews.seeAll': 'Ver todas las opiniones',
|
||||
'reviews.react': 'Reaccionar',
|
||||
'notif.title': 'Notificaciones',
|
||||
'notif.empty': 'Sin notificaciones',
|
||||
'notif.someone': 'Alguien',
|
||||
'notif.follow_request': 'quiere seguirte',
|
||||
'notif.follow_accepted': 'aceptó tu solicitud',
|
||||
'notif.new_follower': 'empezó a seguirte',
|
||||
'notif.reaction': 'reaccionó a tu opinión',
|
||||
'notif.on': 'en {title}',
|
||||
'home.notifications': 'Notificaciones',
|
||||
'home.notificationsN': '{count} notificaciones',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
|
||||
@@ -230,6 +230,24 @@ const dict = {
|
||||
'settings.installApp': 'Installer l\'application',
|
||||
'settings.installHint': 'Ajoute AzuuCine à ton écran d\'accueil ou ton bureau.',
|
||||
'settings.installed': 'Application installée',
|
||||
'reviews.title': 'Avis',
|
||||
'reviews.friends': 'Tes amis',
|
||||
'reviews.others': 'Autres membres',
|
||||
'reviews.noneFriends': 'Aucun avis de tes amis',
|
||||
'reviews.noneOthers': 'Aucun autre avis',
|
||||
'reviews.none': 'Aucun avis pour le moment',
|
||||
'reviews.seeAll': 'Voir tous les avis',
|
||||
'reviews.react': 'Réagir',
|
||||
'notif.title': 'Notifications',
|
||||
'notif.empty': 'Aucune notification',
|
||||
'notif.someone': 'Quelqu’un',
|
||||
'notif.follow_request': 'veut s’abonner à toi',
|
||||
'notif.follow_accepted': 'a accepté ta demande',
|
||||
'notif.new_follower': 's’est abonné à toi',
|
||||
'notif.reaction': 'a réagi à ton avis',
|
||||
'notif.on': 'sur {title}',
|
||||
'home.notifications': 'Notifications',
|
||||
'home.notificationsN': '{count} notifications',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Vue d\'ensemble',
|
||||
|
||||
@@ -228,6 +228,24 @@ const dict: Translations = {
|
||||
'settings.installApp': 'ऐप इंस्टॉल करें',
|
||||
'settings.installHint': 'AzuuCine को अपनी होम स्क्रीन या डेस्कटॉप पर जोड़ें।',
|
||||
'settings.installed': 'ऐप इंस्टॉल हो गया',
|
||||
'reviews.title': 'समीक्षाएँ',
|
||||
'reviews.friends': 'तुम्हारे दोस्त',
|
||||
'reviews.others': 'अन्य सदस्य',
|
||||
'reviews.noneFriends': 'तुम्हारे दोस्तों की कोई समीक्षा नहीं',
|
||||
'reviews.noneOthers': 'कोई अन्य समीक्षा नहीं',
|
||||
'reviews.none': 'अभी कोई समीक्षा नहीं',
|
||||
'reviews.seeAll': 'सभी समीक्षाएँ देखें',
|
||||
'reviews.react': 'प्रतिक्रिया दें',
|
||||
'notif.title': 'सूचनाएँ',
|
||||
'notif.empty': 'कोई सूचना नहीं',
|
||||
'notif.someone': 'किसी ने',
|
||||
'notif.follow_request': 'तुम्हें फ़ॉलो करना चाहता है',
|
||||
'notif.follow_accepted': 'तुम्हारा अनुरोध स्वीकार किया',
|
||||
'notif.new_follower': 'तुम्हें फ़ॉलो करने लगा',
|
||||
'notif.reaction': 'तुम्हारी समीक्षा पर प्रतिक्रिया दी',
|
||||
'notif.on': '{title} पर',
|
||||
'home.notifications': 'सूचनाएँ',
|
||||
'home.notificationsN': '{count} सूचनाएँ',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
|
||||
@@ -228,6 +228,24 @@ const dict: Translations = {
|
||||
'settings.installApp': 'Pasang aplikasi',
|
||||
'settings.installHint': 'Tambahkan AzuuCine ke layar utama atau desktop kamu.',
|
||||
'settings.installed': 'Aplikasi terpasang',
|
||||
'reviews.title': 'Ulasan',
|
||||
'reviews.friends': 'Teman kamu',
|
||||
'reviews.others': 'Anggota lain',
|
||||
'reviews.noneFriends': 'Tidak ada ulasan dari temanmu',
|
||||
'reviews.noneOthers': 'Tidak ada ulasan lain',
|
||||
'reviews.none': 'Belum ada ulasan',
|
||||
'reviews.seeAll': 'Lihat semua ulasan',
|
||||
'reviews.react': 'Reaksi',
|
||||
'notif.title': 'Notifikasi',
|
||||
'notif.empty': 'Tidak ada notifikasi',
|
||||
'notif.someone': 'Seseorang',
|
||||
'notif.follow_request': 'ingin mengikutimu',
|
||||
'notif.follow_accepted': 'menerima permintaanmu',
|
||||
'notif.new_follower': 'mulai mengikutimu',
|
||||
'notif.reaction': 'bereaksi pada ulasanmu',
|
||||
'notif.on': 'di {title}',
|
||||
'home.notifications': 'Notifikasi',
|
||||
'home.notificationsN': '{count} notifikasi',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
|
||||
@@ -228,6 +228,24 @@ const dict: Translations = {
|
||||
'settings.installApp': 'Installa l\'app',
|
||||
'settings.installHint': 'Aggiungi AzuuCine alla schermata home o al desktop.',
|
||||
'settings.installed': 'App installata',
|
||||
'reviews.title': 'Recensioni',
|
||||
'reviews.friends': 'I tuoi amici',
|
||||
'reviews.others': 'Altri membri',
|
||||
'reviews.noneFriends': 'Nessuna recensione dei tuoi amici',
|
||||
'reviews.noneOthers': 'Nessun’altra recensione',
|
||||
'reviews.none': 'Ancora nessuna recensione',
|
||||
'reviews.seeAll': 'Vedi tutte le recensioni',
|
||||
'reviews.react': 'Reagisci',
|
||||
'notif.title': 'Notifiche',
|
||||
'notif.empty': 'Nessuna notifica',
|
||||
'notif.someone': 'Qualcuno',
|
||||
'notif.follow_request': 'vuole seguirti',
|
||||
'notif.follow_accepted': 'ha accettato la tua richiesta',
|
||||
'notif.new_follower': 'ha iniziato a seguirti',
|
||||
'notif.reaction': 'ha reagito alla tua recensione',
|
||||
'notif.on': 'su {title}',
|
||||
'home.notifications': 'Notifiche',
|
||||
'home.notificationsN': '{count} notifiche',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
|
||||
@@ -228,6 +228,24 @@ const dict: Translations = {
|
||||
'settings.installApp': 'アプリをインストール',
|
||||
'settings.installHint': 'AzuuCine をホーム画面やデスクトップに追加します。',
|
||||
'settings.installed': 'アプリをインストール済み',
|
||||
'reviews.title': 'レビュー',
|
||||
'reviews.friends': '友だち',
|
||||
'reviews.others': 'ほかのメンバー',
|
||||
'reviews.noneFriends': '友だちのレビューはありません',
|
||||
'reviews.noneOthers': 'ほかのレビューはありません',
|
||||
'reviews.none': 'まだレビューがありません',
|
||||
'reviews.seeAll': 'すべてのレビューを見る',
|
||||
'reviews.react': 'リアクション',
|
||||
'notif.title': '通知',
|
||||
'notif.empty': '通知はありません',
|
||||
'notif.someone': '誰か',
|
||||
'notif.follow_request': 'があなたをフォローしたがっています',
|
||||
'notif.follow_accepted': 'があなたのリクエストを承認しました',
|
||||
'notif.new_follower': 'があなたをフォローしました',
|
||||
'notif.reaction': 'があなたのレビューにリアクションしました',
|
||||
'notif.on': '「{title}」に',
|
||||
'home.notifications': '通知',
|
||||
'home.notificationsN': '{count}件の通知',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
|
||||
@@ -228,6 +228,24 @@ const dict: Translations = {
|
||||
'settings.installApp': '앱 설치',
|
||||
'settings.installHint': 'AzuuCine을 홈 화면이나 바탕화면에 추가하세요.',
|
||||
'settings.installed': '앱 설치됨',
|
||||
'reviews.title': '리뷰',
|
||||
'reviews.friends': '내 친구',
|
||||
'reviews.others': '다른 회원',
|
||||
'reviews.noneFriends': '친구의 리뷰가 없어요',
|
||||
'reviews.noneOthers': '다른 리뷰가 없어요',
|
||||
'reviews.none': '아직 리뷰가 없어요',
|
||||
'reviews.seeAll': '리뷰 모두 보기',
|
||||
'reviews.react': '반응하기',
|
||||
'notif.title': '알림',
|
||||
'notif.empty': '알림이 없어요',
|
||||
'notif.someone': '누군가',
|
||||
'notif.follow_request': '님이 당신을 팔로우하고 싶어 해요',
|
||||
'notif.follow_accepted': '님이 요청을 수락했어요',
|
||||
'notif.new_follower': '님이 당신을 팔로우했어요',
|
||||
'notif.reaction': '님이 당신의 리뷰에 반응했어요',
|
||||
'notif.on': '{title}에',
|
||||
'home.notifications': '알림',
|
||||
'home.notificationsN': '알림 {count}개',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
|
||||
@@ -228,6 +228,24 @@ const dict: Translations = {
|
||||
'settings.installApp': 'App installeren',
|
||||
'settings.installHint': 'Voeg AzuuCine toe aan je startscherm of bureaublad.',
|
||||
'settings.installed': 'App geïnstalleerd',
|
||||
'reviews.title': 'Recensies',
|
||||
'reviews.friends': 'Je vrienden',
|
||||
'reviews.others': 'Andere leden',
|
||||
'reviews.noneFriends': 'Geen recensies van je vrienden',
|
||||
'reviews.noneOthers': 'Geen andere recensies',
|
||||
'reviews.none': 'Nog geen recensies',
|
||||
'reviews.seeAll': 'Alle recensies bekijken',
|
||||
'reviews.react': 'Reageren',
|
||||
'notif.title': 'Meldingen',
|
||||
'notif.empty': 'Geen meldingen',
|
||||
'notif.someone': 'Iemand',
|
||||
'notif.follow_request': 'wil je volgen',
|
||||
'notif.follow_accepted': 'heeft je verzoek geaccepteerd',
|
||||
'notif.new_follower': 'volgt je nu',
|
||||
'notif.reaction': 'heeft op je recensie gereageerd',
|
||||
'notif.on': 'op {title}',
|
||||
'home.notifications': 'Meldingen',
|
||||
'home.notificationsN': '{count} meldingen',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
|
||||
@@ -232,6 +232,24 @@ const dict: Translations = {
|
||||
'settings.installApp': 'Zainstaluj aplikację',
|
||||
'settings.installHint': 'Dodaj AzuuCine do ekranu głównego lub pulpitu.',
|
||||
'settings.installed': 'Aplikacja zainstalowana',
|
||||
'reviews.title': 'Recenzje',
|
||||
'reviews.friends': 'Twoi znajomi',
|
||||
'reviews.others': 'Inni użytkownicy',
|
||||
'reviews.noneFriends': 'Brak recenzji od znajomych',
|
||||
'reviews.noneOthers': 'Brak innych recenzji',
|
||||
'reviews.none': 'Jeszcze nie ma recenzji',
|
||||
'reviews.seeAll': 'Zobacz wszystkie recenzje',
|
||||
'reviews.react': 'Zareaguj',
|
||||
'notif.title': 'Powiadomienia',
|
||||
'notif.empty': 'Brak powiadomień',
|
||||
'notif.someone': 'Ktoś',
|
||||
'notif.follow_request': 'chce Cię obserwować',
|
||||
'notif.follow_accepted': 'zaakceptował Twoją prośbę',
|
||||
'notif.new_follower': 'zaczął Cię obserwować',
|
||||
'notif.reaction': 'zareagował na Twoją recenzję',
|
||||
'notif.on': 'w {title}',
|
||||
'home.notifications': 'Powiadomienia',
|
||||
'home.notificationsN': 'Powiadomienia: {count}',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
|
||||
@@ -228,6 +228,24 @@ const dict: Translations = {
|
||||
'settings.installApp': 'Instalar o app',
|
||||
'settings.installHint': 'Adicione o AzuuCine à tela inicial ou à área de trabalho.',
|
||||
'settings.installed': 'App instalado',
|
||||
'reviews.title': 'Avaliações',
|
||||
'reviews.friends': 'Teus amigos',
|
||||
'reviews.others': 'Outros membros',
|
||||
'reviews.noneFriends': 'Nenhuma avaliação dos teus amigos',
|
||||
'reviews.noneOthers': 'Nenhuma outra avaliação',
|
||||
'reviews.none': 'Ainda sem avaliações',
|
||||
'reviews.seeAll': 'Ver todas as avaliações',
|
||||
'reviews.react': 'Reagir',
|
||||
'notif.title': 'Notificações',
|
||||
'notif.empty': 'Sem notificações',
|
||||
'notif.someone': 'Alguém',
|
||||
'notif.follow_request': 'quer te seguir',
|
||||
'notif.follow_accepted': 'aceitou teu pedido',
|
||||
'notif.new_follower': 'começou a te seguir',
|
||||
'notif.reaction': 'reagiu à tua avaliação',
|
||||
'notif.on': 'em {title}',
|
||||
'home.notifications': 'Notificações',
|
||||
'home.notificationsN': '{count} notificações',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
|
||||
@@ -232,6 +232,24 @@ const dict: Translations = {
|
||||
'settings.installApp': 'Установить приложение',
|
||||
'settings.installHint': 'Добавь AzuuCine на главный экран или рабочий стол.',
|
||||
'settings.installed': 'Приложение установлено',
|
||||
'reviews.title': 'Отзывы',
|
||||
'reviews.friends': 'Твои друзья',
|
||||
'reviews.others': 'Другие участники',
|
||||
'reviews.noneFriends': 'Нет отзывов от друзей',
|
||||
'reviews.noneOthers': 'Других отзывов нет',
|
||||
'reviews.none': 'Пока нет отзывов',
|
||||
'reviews.seeAll': 'Смотреть все отзывы',
|
||||
'reviews.react': 'Отреагировать',
|
||||
'notif.title': 'Уведомления',
|
||||
'notif.empty': 'Нет уведомлений',
|
||||
'notif.someone': 'Кто-то',
|
||||
'notif.follow_request': 'хочет подписаться на тебя',
|
||||
'notif.follow_accepted': 'принял(а) твою заявку',
|
||||
'notif.new_follower': 'подписался(ась) на тебя',
|
||||
'notif.reaction': 'отреагировал(а) на твой отзыв',
|
||||
'notif.on': 'к «{title}»',
|
||||
'home.notifications': 'Уведомления',
|
||||
'home.notificationsN': 'Уведомлений: {count}',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
|
||||
@@ -228,6 +228,24 @@ const dict: Translations = {
|
||||
'settings.installApp': 'ติดตั้งแอป',
|
||||
'settings.installHint': 'เพิ่ม AzuuCine ไปที่หน้าจอหลักหรือเดสก์ท็อปของคุณ',
|
||||
'settings.installed': 'ติดตั้งแอปแล้ว',
|
||||
'reviews.title': 'รีวิว',
|
||||
'reviews.friends': 'เพื่อนของคุณ',
|
||||
'reviews.others': 'สมาชิกอื่น',
|
||||
'reviews.noneFriends': 'ไม่มีรีวิวจากเพื่อน',
|
||||
'reviews.noneOthers': 'ไม่มีรีวิวอื่น',
|
||||
'reviews.none': 'ยังไม่มีรีวิว',
|
||||
'reviews.seeAll': 'ดูรีวิวทั้งหมด',
|
||||
'reviews.react': 'แสดงความรู้สึก',
|
||||
'notif.title': 'การแจ้งเตือน',
|
||||
'notif.empty': 'ไม่มีการแจ้งเตือน',
|
||||
'notif.someone': 'มีคน',
|
||||
'notif.follow_request': 'ต้องการติดตามคุณ',
|
||||
'notif.follow_accepted': 'ยอมรับคำขอของคุณ',
|
||||
'notif.new_follower': 'เริ่มติดตามคุณ',
|
||||
'notif.reaction': 'แสดงความรู้สึกต่อรีวิวของคุณ',
|
||||
'notif.on': 'ใน {title}',
|
||||
'home.notifications': 'การแจ้งเตือน',
|
||||
'home.notificationsN': '{count} การแจ้งเตือน',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
|
||||
@@ -228,6 +228,24 @@ const dict: Translations = {
|
||||
'settings.installApp': 'Uygulamayı yükle',
|
||||
'settings.installHint': 'AzuuCine’i ana ekranına veya masaüstüne ekle.',
|
||||
'settings.installed': 'Uygulama yüklendi',
|
||||
'reviews.title': 'Yorumlar',
|
||||
'reviews.friends': 'Arkadaşların',
|
||||
'reviews.others': 'Diğer üyeler',
|
||||
'reviews.noneFriends': 'Arkadaşlarından yorum yok',
|
||||
'reviews.noneOthers': 'Başka yorum yok',
|
||||
'reviews.none': 'Henüz yorum yok',
|
||||
'reviews.seeAll': 'Tüm yorumları gör',
|
||||
'reviews.react': 'Tepki ver',
|
||||
'notif.title': 'Bildirimler',
|
||||
'notif.empty': 'Bildirim yok',
|
||||
'notif.someone': 'Biri',
|
||||
'notif.follow_request': 'seni takip etmek istiyor',
|
||||
'notif.follow_accepted': 'isteğini kabul etti',
|
||||
'notif.new_follower': 'seni takip etmeye başladı',
|
||||
'notif.reaction': 'yorumuna tepki verdi',
|
||||
'notif.on': '{title} için',
|
||||
'home.notifications': 'Bildirimler',
|
||||
'home.notificationsN': '{count} bildirim',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
|
||||
@@ -228,6 +228,24 @@ const dict: Translations = {
|
||||
'settings.installApp': 'Cài đặt ứng dụng',
|
||||
'settings.installHint': 'Thêm AzuuCine vào màn hình chính hoặc màn hình nền của bạn.',
|
||||
'settings.installed': 'Đã cài ứng dụng',
|
||||
'reviews.title': 'Đánh giá',
|
||||
'reviews.friends': 'Bạn bè của bạn',
|
||||
'reviews.others': 'Thành viên khác',
|
||||
'reviews.noneFriends': 'Chưa có đánh giá từ bạn bè',
|
||||
'reviews.noneOthers': 'Không có đánh giá khác',
|
||||
'reviews.none': 'Chưa có đánh giá',
|
||||
'reviews.seeAll': 'Xem tất cả đánh giá',
|
||||
'reviews.react': 'Bày tỏ cảm xúc',
|
||||
'notif.title': 'Thông báo',
|
||||
'notif.empty': 'Không có thông báo',
|
||||
'notif.someone': 'Ai đó',
|
||||
'notif.follow_request': 'muốn theo dõi bạn',
|
||||
'notif.follow_accepted': 'đã chấp nhận yêu cầu của bạn',
|
||||
'notif.new_follower': 'đã theo dõi bạn',
|
||||
'notif.reaction': 'đã bày tỏ cảm xúc với đánh giá của bạn',
|
||||
'notif.on': 'về {title}',
|
||||
'home.notifications': 'Thông báo',
|
||||
'home.notificationsN': '{count} thông báo',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
|
||||
@@ -228,6 +228,24 @@ const dict: Translations = {
|
||||
'settings.installApp': '安装应用',
|
||||
'settings.installHint': '将 AzuuCine 添加到主屏幕或桌面。',
|
||||
'settings.installed': '应用已安装',
|
||||
'reviews.title': '评价',
|
||||
'reviews.friends': '你的好友',
|
||||
'reviews.others': '其他用户',
|
||||
'reviews.noneFriends': '好友暂无评价',
|
||||
'reviews.noneOthers': '暂无其他评价',
|
||||
'reviews.none': '还没有评价',
|
||||
'reviews.seeAll': '查看全部评价',
|
||||
'reviews.react': '回应',
|
||||
'notif.title': '通知',
|
||||
'notif.empty': '暂无通知',
|
||||
'notif.someone': '有人',
|
||||
'notif.follow_request': '想关注你',
|
||||
'notif.follow_accepted': '接受了你的请求',
|
||||
'notif.new_follower': '开始关注你',
|
||||
'notif.reaction': '回应了你的评价',
|
||||
'notif.on': '关于《{title}》',
|
||||
'home.notifications': '通知',
|
||||
'home.notificationsN': '{count} 条通知',
|
||||
'settings.admin': 'Administration',
|
||||
'admin.title': 'Administration',
|
||||
'admin.tabOverview': 'Overview',
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
import { t } from '../../i18n'
|
||||
import { cloudFetch } from './api'
|
||||
|
||||
/** Notifications (cloche) : abonnements, demandes acceptées, réactions reçues. */
|
||||
|
||||
export type NotificationKind = 'follow_request' | 'follow_accepted' | 'new_follower' | 'reaction'
|
||||
|
||||
export interface AppNotification {
|
||||
id: number
|
||||
kind: NotificationKind
|
||||
created_at: string
|
||||
read_at: string | null
|
||||
emoji: string | null
|
||||
item_id: string | null
|
||||
actor: { username: string; display_name: string; avatar_url: string | null } | null
|
||||
/** Titre de la fiche concernée (réactions) */
|
||||
title: string | null
|
||||
}
|
||||
|
||||
async function rpc<T>(name: string, args: Record<string, unknown> = {}): Promise<T> {
|
||||
const res = await cloudFetch(`/rest/v1/rpc/${name}`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(args),
|
||||
})
|
||||
if (!res.ok) throw new Error(t('social.err.server', { status: res.status }))
|
||||
return res.json() as Promise<T>
|
||||
}
|
||||
|
||||
export const listNotifications = (offset = 0) => rpc<AppNotification[]>('get_notifications', { p_offset: offset })
|
||||
|
||||
export async function unreadCount(): Promise<number> {
|
||||
try {
|
||||
const n = await rpc<number>('notifications_unread')
|
||||
return typeof n === 'number' ? n : 0
|
||||
} catch {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
export async function markNotificationsRead(): Promise<void> {
|
||||
await rpc('mark_notifications_read')
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
import { t } from '../../i18n'
|
||||
import { cloudFetch } from './api'
|
||||
|
||||
/** Avis des autres membres sur un même titre, et réactions (emoji). */
|
||||
|
||||
export const REACTION_EMOJIS = ['👍', '❤️', '🔥', '😂', '😮', '😢'] as const
|
||||
export type ReactionEmoji = (typeof REACTION_EMOJIS)[number]
|
||||
|
||||
export interface ReviewAuthor {
|
||||
id: string
|
||||
username: string
|
||||
display_name: string
|
||||
avatar_url: string | null
|
||||
is_private: boolean
|
||||
relation: string
|
||||
}
|
||||
|
||||
export interface TitleReview {
|
||||
user: ReviewAuthor
|
||||
user_id: string
|
||||
item_id: string
|
||||
updated_at: string
|
||||
rating: number | null
|
||||
notes: string
|
||||
/** emoji -> nombre */
|
||||
reactions: Record<string, number>
|
||||
total: number
|
||||
/** mon emoji sur cet avis, ou null */
|
||||
mine: string | null
|
||||
}
|
||||
|
||||
export interface TitleReviews {
|
||||
friends: TitleReview[]
|
||||
others: TitleReview[]
|
||||
}
|
||||
|
||||
async function rpc<T>(name: string, args: Record<string, unknown> = {}): Promise<T> {
|
||||
const res = await cloudFetch(`/rest/v1/rpc/${name}`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(args),
|
||||
})
|
||||
if (!res.ok) throw new Error(t('social.err.server', { status: res.status }))
|
||||
return res.json() as Promise<T>
|
||||
}
|
||||
|
||||
/** Tous les avis publics sur un titre (séparés : amis / autres). */
|
||||
export const titleReviews = (externalId: string, offset = 0) =>
|
||||
rpc<TitleReviews>('title_reviews', { p_external_id: externalId, p_offset: offset })
|
||||
|
||||
export async function reactToReview(author: string, item: string, emoji: ReactionEmoji): Promise<void> {
|
||||
await rpc('react_to_review', { p_author: author, p_item: item, p_emoji: emoji })
|
||||
}
|
||||
|
||||
export async function unreactReview(author: string, item: string): Promise<void> {
|
||||
await rpc('unreact_review', { p_author: author, p_item: item })
|
||||
}
|
||||
+13
-1
@@ -1,6 +1,6 @@
|
||||
import { useSocial } from '../components/social/SocialProvider'
|
||||
import { t } from '../i18n'
|
||||
import { CalendarDays, Dices, Plus } from 'lucide-react'
|
||||
import { Bell, CalendarDays, Dices, Plus } from 'lucide-react'
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||
import { TYPE_BY_VALUE } from '../lib/constants'
|
||||
import Avatar from '../components/social/Avatar'
|
||||
@@ -132,6 +132,18 @@ export default function HomePage({ onOpen, onAdd, onNavigate, onRoulette, onCale
|
||||
<span className="absolute -end-1 -top-1 grid min-w-5 place-items-center rounded-full bg-accent-fill px-1 text-[10px] font-bold text-on-accent">{soon}</span>
|
||||
)}
|
||||
</button>
|
||||
{social.enabled && (
|
||||
<button
|
||||
onClick={social.openNotifications}
|
||||
className="relative grid size-11 shrink-0 place-items-center rounded-full border border-line text-ink-2 transition-colors active:bg-surface-2"
|
||||
aria-label={social.unread > 0 ? t('home.notificationsN', { count: social.unread }) : t('home.notifications')}
|
||||
>
|
||||
<Bell size={20} />
|
||||
{social.unread > 0 && (
|
||||
<span className="absolute -end-1 -top-1 grid min-w-5 place-items-center rounded-full bg-accent-fill px-1 text-[10px] font-bold text-on-accent">{social.unread}</span>
|
||||
)}
|
||||
</button>
|
||||
)}
|
||||
{social.enabled && (
|
||||
<button onClick={() => (social.me ? social.openProfile(social.me.username) : social.openSearch())} className="relative shrink-0 rounded-full" aria-label={t('social.myProfile')}>
|
||||
<Avatar url={social.me?.avatarUrl} name={social.me?.displayName ?? '?'} size={44} />
|
||||
|
||||
Reference in new issue
Block a user