chore: show prompt to let the user know

This commit is contained in:
JustSong
2023-10-14 16:32:01 +08:00
parent a27a5bcc06
commit fbe9985f57
2 changed files with 26 additions and 4 deletions

View File

@@ -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');
}