Update all non-major dependencies
[ProtonMail-WebClient.git] / applications / pass-desktop / src / app / firstLaunch.ts
blobcb0e1c0734272f995d581548cce827bffe154e2c
1 import { STORAGE_PREFIX } from '@proton/shared/lib/authentication/persistedSessionStorage';
3 export const FIRST_LAUNCH_KEY = 'pass::first_launch_complete';
5 export const dismissFirstLaunch = () => localStorage.setItem(FIRST_LAUNCH_KEY, '1');
7 export const isFirstLaunch = () => {
8     if (localStorage.getItem(FIRST_LAUNCH_KEY) === '1') return false;
10     if (Object.keys(localStorage).filter((key) => key.startsWith(STORAGE_PREFIX)).length > 0) {
11         dismissFirstLaunch();
12         return false;
13     }
15     return true;