feat: Header重排、共享配方到公共库、待审核配方、权限优化 #17

Merged
fam merged 39 commits from fix/ui-polish-round2 into main 2026-04-09 18:37:12 +00:00
Showing only changes of commit e3285f0961 - Show all commits

View File

@@ -516,12 +516,19 @@ async function loadBrand() {
} catch {
brand.value = {}
}
// Prompt QR upload at most once per month
// Prompt QR upload: logged-in users once per month, anonymous every time
if (showBrandHint.value) {
const lastPrompt = localStorage.getItem('qr_upload_prompt_time')
const oneMonth = 30 * 24 * 60 * 60 * 1000
if (!lastPrompt || Date.now() - Number(lastPrompt) > oneMonth) {
localStorage.setItem('qr_upload_prompt_time', String(Date.now()))
let shouldPrompt = true
if (authStore.isLoggedIn) {
const lastPrompt = localStorage.getItem('qr_upload_prompt_time')
const oneMonth = 30 * 24 * 60 * 60 * 1000
if (lastPrompt && Date.now() - Number(lastPrompt) < oneMonth) {
shouldPrompt = false
} else {
localStorage.setItem('qr_upload_prompt_time', String(Date.now()))
}
}
if (shouldPrompt) {
const ok = await showConfirm(
'上传你的专属二维码,让配方卡片更专业 ✨',
{ okText: '去上传', cancelText: '下次再说' }