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: "Vault V4 format",30 body: "Peach now supports passphrases and passwords up to 256 characters. Your existing vaults and exports remain fully readable.",31 },32 {33 heading: "Back up before updating",34 body: "We recommend creating a vault backup before installing this update. Open Settings → Export to save an encrypted copy of your vault.",35 },36 {37 heading: "Update your Android app",38 body: "Vault V4 is not readable by Peach Android before v2.15.3. If you sync between devices, update the Android app first — an older Android client cannot open a V4 vault.",39 breaking: true,40 },41];4243export function hasReleaseNotes(): boolean {44 return CURRENT_NOTES.length > 0;45}4647const WHATS_NEW_SEEN_KEY = "peach_whats_new_seen";4849export async function shouldShowWhatsNew(): Promise<boolean> {50 if (!hasReleaseNotes()) return false;51 try {52 const seen = await chrome.storage.local.get(WHATS_NEW_SEEN_KEY);53 return seen[WHATS_NEW_SEEN_KEY] !== PEACH_VERSION;54 } catch {55 return false;56 }57}5859export async function markWhatsNewSeen(): Promise<void> {60 try {61 await chrome.storage.local.set({ [WHATS_NEW_SEEN_KEY]: PEACH_VERSION });62 } catch {63 64 }65}