123456789101112131415declare const __PEACH_VERSION__: string;1617export interface ReleaseNote {18 heading: string;19 body: string;20 breaking?: boolean;21}2223export const PEACH_VERSION: string = typeof __PEACH_VERSION__ !== "undefined"24 ? __PEACH_VERSION__25 : "0.0.0";2627export const CURRENT_NOTES: ReleaseNote[] = [28 {29 heading: "Passphrases & long passwords",30 body: "Peach now supports passphrases and passwords up to 256 characters. Existing vaults remain fully readable.",31 },32 {33 heading: "Update your Android app first",34 body: "Vault V4 is not readable by Peach Android before v2.15.3. Export a backup on Android before updating, then install the new version.",35 breaking: true,36 },37];3839export function hasReleaseNotes(): boolean {40 return CURRENT_NOTES.length > 0;41}4243const WHATS_NEW_SEEN_KEY = "peach_whats_new_seen";4445export async function shouldShowWhatsNew(): Promise<boolean> {46 if (!hasReleaseNotes()) return false;47 try {48 const seen = await chrome.storage.local.get(WHATS_NEW_SEEN_KEY);49 return seen[WHATS_NEW_SEEN_KEY] !== PEACH_VERSION;50 } catch {51 return false;52 }53}5455export async function markWhatsNewSeen(): Promise<void> {56 try {57 await chrome.storage.local.set({ [WHATS_NEW_SEEN_KEY]: PEACH_VERSION });58 } catch {59 60 }61}