AI Newsletter Digest improvements: fixed QP soft line break decoding, URL extraction, and content cleaning
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
'use client';
|
||||
|
||||
const STORAGE_KEY = 'eggbrt-anonymous-id';
|
||||
|
||||
export function getAnonymousUserId(): string {
|
||||
if (typeof window === 'undefined') return '';
|
||||
|
||||
let id = localStorage.getItem(STORAGE_KEY);
|
||||
|
||||
if (!id) {
|
||||
id = crypto.randomUUID();
|
||||
localStorage.setItem(STORAGE_KEY, id);
|
||||
}
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
export function getDisplayName(): string {
|
||||
return localStorage.getItem('eggbrt-display-name') || '';
|
||||
}
|
||||
|
||||
export function setDisplayName(name: string): void {
|
||||
localStorage.setItem('eggbrt-display-name', name);
|
||||
}
|
||||
Reference in New Issue
Block a user