Initial commit for Greenlens

This commit is contained in:
Timo Knuth
2026-03-16 21:31:46 +01:00
parent 307135671f
commit 05d4f6e78b
573 changed files with 54233 additions and 1891 deletions

View File

@@ -118,4 +118,20 @@ export const AuthService = {
return 'unreachable';
}
},
async checkIfFirstRun(): Promise<boolean> {
const flag = await SecureStore.getItemAsync('greenlens_first_run_complete');
return flag !== 'true';
},
async markFirstRunComplete(): Promise<void> {
await SecureStore.setItemAsync('greenlens_first_run_complete', 'true');
},
async clearAllData(): Promise<void> {
await clearStoredSession();
await SecureStore.deleteItemAsync('greenlens_first_run_complete');
// Note: SQLite tables aren't cleared here to avoid destroying user data
// without explicit consent, but session tokens are wiped.
},
};