This commit is contained in:
Romain committed 2026-10-03 10:45:18 +02:00
1 parent 1dde1311a3
commit 129c3dd164
12 files changed
+65

No files matched your search

+22
View File
@@ -290,6 +290,17 @@ function ProfileTab({ profile, topByCategory, onOpen }: { profile: Profile; topB
</section> </section>
))} ))}
{profile.watching.length > 0 && (
<>
<SectionTitle>{t('social.watching')}</SectionTitle>
<div className="grid grid-cols-4 gap-2.5">
{profile.watching.map((item) => (
<PosterTile key={item.id} item={item} onOpen={() => onOpen(item)} />
))}
</div>
</>
)}
<SectionTitle>{t('social.recent')}</SectionTitle> <SectionTitle>{t('social.recent')}</SectionTitle>
{profile.recent.length ? ( {profile.recent.length ? (
<div className="grid grid-cols-4 gap-2.5"> <div className="grid grid-cols-4 gap-2.5">
@@ -301,6 +312,17 @@ function ProfileTab({ profile, topByCategory, onOpen }: { profile: Profile; topB
<p className="text-sm text-ink-3">{t('social.noRecent')}</p> <p className="text-sm text-ink-3">{t('social.noRecent')}</p>
)} )}
{profile.watchlist.length > 0 && (
<>
<SectionTitle>{t('social.watchlist')}</SectionTitle>
<div className="grid grid-cols-4 gap-2.5">
{profile.watchlist.map((item) => (
<PosterTile key={item.id} item={item} onOpen={() => onOpen(item)} />
))}
</div>
</>
)}
{s && ( {s && (
<> <>
<SectionTitle>{t('nav.stats')}</SectionTitle> <SectionTitle>{t('nav.stats')}</SectionTitle>
+2
View File
@@ -758,6 +758,8 @@ const dict: Translations = {
'welcome.nameHint': "Optional – wird auf deinem Profil angezeigt. Du kannst alles später ändern.", 'welcome.nameHint': "Optional – wird auf deinem Profil angezeigt. Du kannst alles später ändern.",
'welcome.go': "Los geht's", 'welcome.go': "Los geht's",
'welcome.later': "Später", 'welcome.later': "Später",
'social.watching': "Schaut gerade",
'social.watchlist': "Möchte sehen",
} }
export default dict export default dict
+2
View File
@@ -758,6 +758,8 @@ const dict: Translations = {
'welcome.nameHint': "Optional — shown on your profile. You can change everything later.", 'welcome.nameHint': "Optional — shown on your profile. You can change everything later.",
'welcome.go': "Let's go", 'welcome.go': "Let's go",
'welcome.later': "Later", 'welcome.later': "Later",
'social.watching': "Watching",
'social.watchlist': "Wants to watch",
} }
export default dict export default dict
+2
View File
@@ -758,6 +758,8 @@ const dict: Translations = {
'welcome.nameHint': "Opcional: se muestra en tu perfil. Podrás cambiarlo todo más tarde.", 'welcome.nameHint': "Opcional: se muestra en tu perfil. Podrás cambiarlo todo más tarde.",
'welcome.go': "Vamos", 'welcome.go': "Vamos",
'welcome.later': "Más tarde", 'welcome.later': "Más tarde",
'social.watching': "Viendo",
'social.watchlist': "Quiere ver",
} }
export default dict export default dict
+2
View File
@@ -760,6 +760,8 @@ const dict = {
'welcome.nameHint': "Facultatif — affiché sur ton profil. Tu pourras tout changer plus tard.", 'welcome.nameHint': "Facultatif — affiché sur ton profil. Tu pourras tout changer plus tard.",
'welcome.go': "C'est parti", 'welcome.go': "C'est parti",
'welcome.later': "Plus tard", 'welcome.later': "Plus tard",
'social.watching': "En cours",
'social.watchlist': "Envie de voir",
} }
export default dict export default dict
+2
View File
@@ -758,6 +758,8 @@ const dict: Translations = {
'welcome.nameHint': "Facoltativo — mostrato sul tuo profilo. Potrai cambiare tutto più tardi.", 'welcome.nameHint': "Facoltativo — mostrato sul tuo profilo. Potrai cambiare tutto più tardi.",
'welcome.go': "Iniziamo", 'welcome.go': "Iniziamo",
'welcome.later': "Più tardi", 'welcome.later': "Più tardi",
'social.watching': "In corso",
'social.watchlist': "Vuole vedere",
} }
export default dict export default dict
+2
View File
@@ -758,6 +758,8 @@ const dict: Translations = {
'welcome.nameHint': "任意 — プロフィールに表示されます。あとからすべて変更できます。", 'welcome.nameHint': "任意 — プロフィールに表示されます。あとからすべて変更できます。",
'welcome.go': "はじめる", 'welcome.go': "はじめる",
'welcome.later': "あとで", 'welcome.later': "あとで",
'social.watching': "視聴中",
'social.watchlist': "見たい",
} }
export default dict export default dict
+2
View File
@@ -758,6 +758,8 @@ const dict: Translations = {
'welcome.nameHint': "선택 사항 — 프로필에 표시돼요. 나중에 모두 바꿀 수 있어요.", 'welcome.nameHint': "선택 사항 — 프로필에 표시돼요. 나중에 모두 바꿀 수 있어요.",
'welcome.go': "시작하기", 'welcome.go': "시작하기",
'welcome.later': "나중에", 'welcome.later': "나중에",
'social.watching': "보는 중",
'social.watchlist': "보고 싶어요",
} }
export default dict export default dict
+2
View File
@@ -758,6 +758,8 @@ const dict: Translations = {
'welcome.nameHint': "Opcional — aparece no seu perfil. Você pode mudar tudo depois.", 'welcome.nameHint': "Opcional — aparece no seu perfil. Você pode mudar tudo depois.",
'welcome.go': "Vamos lá", 'welcome.go': "Vamos lá",
'welcome.later': "Depois", 'welcome.later': "Depois",
'social.watching': "Assistindo",
'social.watchlist': "Quer assistir",
} }
export default dict export default dict
+2
View File
@@ -758,6 +758,8 @@ const dict: Translations = {
'welcome.nameHint': "可选——显示在你的主页上。之后都可以修改。", 'welcome.nameHint': "可选——显示在你的主页上。之后都可以修改。",
'welcome.go': "开始吧", 'welcome.go': "开始吧",
'welcome.later': "稍后", 'welcome.later': "稍后",
'social.watching': "正在看",
'social.watchlist': "想看",
} }
export default dict export default dict
+4
View File
@@ -44,6 +44,8 @@ export interface Profile extends ProfileCard {
stats?: ProfileStats stats?: ProfileStats
top: MediaItem[] top: MediaItem[]
recent: MediaItem[] recent: MediaItem[]
watching: MediaItem[]
watchlist: MediaItem[]
} }
export interface FeedEntry { export interface FeedEntry {
@@ -113,6 +115,8 @@ function toProfile(raw: unknown): Profile | null {
: undefined, : undefined,
top: toItems(raw.top), top: toItems(raw.top),
recent: toItems(raw.recent), recent: toItems(raw.recent),
watching: toItems(raw.watching),
watchlist: toItems(raw.watchlist),
} }
} }
@@ -419,6 +419,27 @@ begin
order by k desc nulls last order by k desc nulls last
limit 12 limit 12
) s ) s
),
-- En cours et « à voir » : ce qu'on voit aussi dans le fil des abonnements
'watching', (
select coalesce(jsonb_agg(public.public_item(s.data) order by s.k desc nulls last), '[]'::jsonb)
from (
select data, coalesce(data->>'startDate', left(data->>'updatedAt', 10)) as k
from public.items
where user_id = p.id and not deleted and data->>'status' = 'en_cours'
order by k desc nulls last
limit 8
) s
),
'watchlist', (
select coalesce(jsonb_agg(public.public_item(s.data) order by s.k desc nulls last), '[]'::jsonb)
from (
select data, data->>'createdAt' as k
from public.items
where user_id = p.id and not deleted and data->>'status' = 'a_voir'
order by k desc nulls last
limit 8
) s
) )
); );
end if; end if;