From 78d26c4bc610147d8cb481fd67a521395eda8384 Mon Sep 17 00:00:00 2001 From: jtrzupek Date: Sat, 20 Jun 2026 16:38:45 +0200 Subject: [PATCH] feat(mobile): strip .com/.org clutter from site names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User-report 18105d14: drop the TLD suffix from Sites list + SiteScenes header (hqporner.com -> hqporner, fpo.xxx -> fpo). Logos skipped (needs a per-site logo source) — TLD strip is the quick win. Co-Authored-By: Claude Opus 4.8 (1M context) --- mobile/src/changelog.ts | 8 ++++++++ mobile/src/screens/SitesScreen.tsx | 10 ++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/mobile/src/changelog.ts b/mobile/src/changelog.ts index 472fcee..e88a853 100644 --- a/mobile/src/changelog.ts +++ b/mobile/src/changelog.ts @@ -16,6 +16,14 @@ export type ChangelogEntry = { }; export const CHANGELOG: ChangelogEntry[] = [ + { + id: '2026-06-20c', + date: 'June 2026', + items: [ + 'Cleaner site names (dropped the .com/.org clutter).', + 'siska scenes work again (and their newer videos play).', + ], + }, { id: '2026-06-20b', date: 'June 2026', diff --git a/mobile/src/screens/SitesScreen.tsx b/mobile/src/screens/SitesScreen.tsx index 3d7b8f0..fafa18d 100644 --- a/mobile/src/screens/SitesScreen.tsx +++ b/mobile/src/screens/SitesScreen.tsx @@ -115,7 +115,7 @@ export function SitesScreen() { onPress={() => navigation.navigate('SiteScenes', { origin: item.origin, - name: item.display_name, + name: prettySiteName(item.display_name), }) } /> @@ -152,6 +152,12 @@ function SegButton({ ); } +// Lista Sites pokazuje display_name = domena (hqporner.com). User-report 18105d14: +// pozbyć się suffixów com/org/itp. Strip końcowego TLD → czysta nazwa. +function prettySiteName(name: string): string { + return name.replace(/\.[a-z]{2,5}$/i, '').trim() || name; +} + function formatRelativeTime(iso: string | null): string | null { if (!iso) return null; const ts = Date.parse(iso); @@ -174,7 +180,7 @@ function SiteChip({ source, onPress }: { source: SourceOut; onPress: () => void > - {source.display_name} + {prettySiteName(source.display_name)} {rel ? {rel} : null}