t
This commit is contained in:
1 parent
1dde1311a3
commit
129c3dd164
12 files changed
+65
No files matched your search
@@ -290,6 +290,17 @@ function ProfileTab({ profile, topByCategory, onOpen }: { profile: Profile; topB
|
||||
</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>
|
||||
{profile.recent.length ? (
|
||||
<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>
|
||||
)}
|
||||
|
||||
{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 && (
|
||||
<>
|
||||
<SectionTitle>{t('nav.stats')}</SectionTitle>
|
||||
|
||||
@@ -758,6 +758,8 @@ const dict: Translations = {
|
||||
'welcome.nameHint': "Optional – wird auf deinem Profil angezeigt. Du kannst alles später ändern.",
|
||||
'welcome.go': "Los geht's",
|
||||
'welcome.later': "Später",
|
||||
'social.watching': "Schaut gerade",
|
||||
'social.watchlist': "Möchte sehen",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -758,6 +758,8 @@ const dict: Translations = {
|
||||
'welcome.nameHint': "Optional — shown on your profile. You can change everything later.",
|
||||
'welcome.go': "Let's go",
|
||||
'welcome.later': "Later",
|
||||
'social.watching': "Watching",
|
||||
'social.watchlist': "Wants to watch",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -758,6 +758,8 @@ const dict: Translations = {
|
||||
'welcome.nameHint': "Opcional: se muestra en tu perfil. Podrás cambiarlo todo más tarde.",
|
||||
'welcome.go': "Vamos",
|
||||
'welcome.later': "Más tarde",
|
||||
'social.watching': "Viendo",
|
||||
'social.watchlist': "Quiere ver",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -760,6 +760,8 @@ const dict = {
|
||||
'welcome.nameHint': "Facultatif — affiché sur ton profil. Tu pourras tout changer plus tard.",
|
||||
'welcome.go': "C'est parti",
|
||||
'welcome.later': "Plus tard",
|
||||
'social.watching': "En cours",
|
||||
'social.watchlist': "Envie de voir",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -758,6 +758,8 @@ const dict: Translations = {
|
||||
'welcome.nameHint': "Facoltativo — mostrato sul tuo profilo. Potrai cambiare tutto più tardi.",
|
||||
'welcome.go': "Iniziamo",
|
||||
'welcome.later': "Più tardi",
|
||||
'social.watching': "In corso",
|
||||
'social.watchlist': "Vuole vedere",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -758,6 +758,8 @@ const dict: Translations = {
|
||||
'welcome.nameHint': "任意 — プロフィールに表示されます。あとからすべて変更できます。",
|
||||
'welcome.go': "はじめる",
|
||||
'welcome.later': "あとで",
|
||||
'social.watching': "視聴中",
|
||||
'social.watchlist': "見たい",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -758,6 +758,8 @@ const dict: Translations = {
|
||||
'welcome.nameHint': "선택 사항 — 프로필에 표시돼요. 나중에 모두 바꿀 수 있어요.",
|
||||
'welcome.go': "시작하기",
|
||||
'welcome.later': "나중에",
|
||||
'social.watching': "보는 중",
|
||||
'social.watchlist': "보고 싶어요",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -758,6 +758,8 @@ const dict: Translations = {
|
||||
'welcome.nameHint': "Opcional — aparece no seu perfil. Você pode mudar tudo depois.",
|
||||
'welcome.go': "Vamos lá",
|
||||
'welcome.later': "Depois",
|
||||
'social.watching': "Assistindo",
|
||||
'social.watchlist': "Quer assistir",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -758,6 +758,8 @@ const dict: Translations = {
|
||||
'welcome.nameHint': "可选——显示在你的主页上。之后都可以修改。",
|
||||
'welcome.go': "开始吧",
|
||||
'welcome.later': "稍后",
|
||||
'social.watching': "正在看",
|
||||
'social.watchlist': "想看",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -44,6 +44,8 @@ export interface Profile extends ProfileCard {
|
||||
stats?: ProfileStats
|
||||
top: MediaItem[]
|
||||
recent: MediaItem[]
|
||||
watching: MediaItem[]
|
||||
watchlist: MediaItem[]
|
||||
}
|
||||
|
||||
export interface FeedEntry {
|
||||
@@ -113,6 +115,8 @@ function toProfile(raw: unknown): Profile | null {
|
||||
: undefined,
|
||||
top: toItems(raw.top),
|
||||
recent: toItems(raw.recent),
|
||||
watching: toItems(raw.watching),
|
||||
watchlist: toItems(raw.watchlist),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -419,6 +419,27 @@ begin
|
||||
order by k desc nulls last
|
||||
limit 12
|
||||
) 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;
|
||||
|
||||
Reference in new issue
Block a user