mirror of
https://github.com/linux-do/new-api.git
synced 2025-11-09 15:43:41 +08:00
chore: show prompt to let the user know
This commit is contained in:
@@ -186,4 +186,14 @@ export const verifyJSON = (str) => {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
};
|
||||
|
||||
export function shouldShowPrompt(id) {
|
||||
let prompt = localStorage.getItem(`prompt-${id}`);
|
||||
return !prompt;
|
||||
|
||||
}
|
||||
|
||||
export function setPromptShown(id) {
|
||||
localStorage.setItem(`prompt-${id}`, 'true');
|
||||
}
|
||||
Reference in New Issue
Block a user