diff --git a/.env.example b/.env.example index c7ac4dd..a541f34 100644 --- a/.env.example +++ b/.env.example @@ -8,9 +8,9 @@ HOST_PORT_SERVER_BETA=18080 HOST_PORT_DOWNLOADER_BETA=19093 HOST_PORT_TOKEN_BETA=18081 HOST_PORT_GARAGE_S3_BETA=3900 -DATABASE_URL=jdbc:postgresql://postgres:5432/typetype -DATABASE_USER=typetype -DATABASE_PASSWORD=typetype +POSTGRES_DB=typetype +POSTGRES_USER=typetype +POSTGRES_PASSWORD=typetype DRAGONFLY_URL=redis://dragonfly:6379 GITHUB_REPO=Priveetee/TypeType-Server GITHUB_ISSUE_TEMPLATE=bug_report_backend.md diff --git a/apps/web/src/components/channel-avatar.tsx b/apps/web/src/components/channel-avatar.tsx index c63b18f..32072b2 100644 --- a/apps/web/src/components/channel-avatar.tsx +++ b/apps/web/src/components/channel-avatar.tsx @@ -21,16 +21,16 @@ function getInitial(name: string): string { } export function ChannelAvatar({ src, name, className = "w-8 h-8" }: Props) { - const [failed, setFailed] = useState(false); + const [failedSrc, setFailedSrc] = useState(null); + const failed = failedSrc === src; if (!src || failed) { return (
- {getInitial(name)} + {getInitial(name)}
); } @@ -38,11 +38,13 @@ export function ChannelAvatar({ src, name, className = "w-8 h-8" }: Props) { return ( setFailed(true)} + onError={() => setFailedSrc(src)} + title={name} /> ); } diff --git a/apps/web/src/components/history-card.tsx b/apps/web/src/components/history-card.tsx index 4eef8ac..e092cc8 100644 --- a/apps/web/src/components/history-card.tsx +++ b/apps/web/src/components/history-card.tsx @@ -50,21 +50,21 @@ export function HistoryCard({ item, onRemove, index }: HistoryCardProps) { return (
-
+
{item.title} @@ -93,34 +93,41 @@ export function HistoryCard({ item, onRemove, index }: HistoryCardProps) {
-
+
{item.channelUrl ? ( - - + + ) : ( - + + + )} -
+
-

{item.title}

+

+ {item.title} +

{item.channelUrl ? ( {item.channelName} ) : ( -

{item.channelName}

+

{item.channelName}

)} -

Watched {formatWatchedAt(item.watchedAt)}

+

+ Watched {formatWatchedAt(item.watchedAt)} +

diff --git a/apps/web/src/components/history-filter.tsx b/apps/web/src/components/history-filter.tsx index 4664dfb..6109c59 100644 --- a/apps/web/src/components/history-filter.tsx +++ b/apps/web/src/components/history-filter.tsx @@ -91,7 +91,7 @@ export function HistoryFilter({ }; return ( -