feat(mobile): strip .com/.org clutter from site names
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) <noreply@anthropic.com>
This commit is contained in:
parent
ac84da92a4
commit
78d26c4bc6
2 changed files with 16 additions and 2 deletions
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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
|
|||
>
|
||||
<View style={styles.chipMain}>
|
||||
<Text style={styles.chipName} numberOfLines={1}>
|
||||
{source.display_name}
|
||||
{prettySiteName(source.display_name)}
|
||||
</Text>
|
||||
{rel ? <Text style={styles.chipRel}>{rel}</Text> : null}
|
||||
</View>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue