goon/mobile/src/changelog.ts
goon-foss 5bac6d9c16 feat(mobile): source-code link in Settings + Refresh thumbnail button
- AppLockSettings: a "Source code" row linking the public OSS repo (report 4c5066b8) -
  a trust signal for a sideloaded FOSS app (audit / self-host / contribute).
- SceneDetail: a "Refresh thumbnail" button (force) for scenes whose preview is broken
  or stale (report d3376a71).
- changelog: new What's New entry for this batch.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 19:04:11 +02:00

50 lines
2.1 KiB
TypeScript

/**
* Changelog bundlowany z apką → ZAWSZE zgodny z tym, co przyszło OTA (te same zmiany
* lecą w tym samym bundlu). WhatsNewModal pokazuje wpisy nowsze niż ostatnio widziany
* (`lastSeenChangelogId` w SecureStore) i oznacza najnowszy jako przeczytany.
*
* Przy każdym publish OTA: DOPISZ nowy wpis NA GÓRZE (newest-first), z nowym `id`.
* Treść user-facing (bez wewnętrznego żargonu) — to widzi użytkownik.
*/
export type ChangelogEntry = {
/** Stabilny, rosnący identyfikator (np. data + seq). Newest-first w CHANGELOG. */
id: string;
/** Krótki, ludzki tytuł daty/wersji pokazywany w nagłówku wpisu. */
date: string;
/** Punkty zmian — krótkie, user-facing. */
items: string[];
};
export const CHANGELOG: ChangelogEntry[] = [
{
id: '2026-06-13',
date: 'June 2026',
items: [
'Source code link added in Settings — the app is open source (MIT).',
'New: a Refresh thumbnail button on a scene when its preview is broken or stale.',
'Fewer dead links — deleted videos on some sites are now detected automatically.',
],
},
{
id: '2026-06-12',
date: 'June 2026',
items: [
'Favorites now has a Scenes tab — every scene you heart shows up there.',
'Your bug reports can get replies: tap the ? button, then "Your messages".',
'More reliable playback and lower data use on several sites.',
'Clearer message when a source is blocked in your region or by your network.',
],
},
];
export const NEWEST_CHANGELOG_ID = CHANGELOG.length ? CHANGELOG[0].id : null;
/** Wpisy nowsze niż `lastSeenId`. lastSeen=null (pierwsze uruchomienie) → tylko najnowszy
* (nie zrzucamy całej historii). lastSeen == najnowszy → pusto (nic do pokazania). */
export function unseenEntries(lastSeenId: string | null): ChangelogEntry[] {
if (!CHANGELOG.length) return [];
if (!lastSeenId) return [CHANGELOG[0]];
const idx = CHANGELOG.findIndex((e) => e.id === lastSeenId);
if (idx === -1) return [CHANGELOG[0]]; // nieznany marker → pokaż tylko najnowszy
return CHANGELOG.slice(0, idx);
}