QR upload: replace inline hint with dialog, add back button in brand page
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 12s
Test / e2e-test (push) Failing after 1m21s
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 12s
Test / e2e-test (push) Failing after 1m21s
- Replace the inline brand-upload-hint bar in RecipeDetailOverlay with a confirm dialog (「去上传」/「取消」) that pops up when the card opens - Extend useDialog/CustomDialog to support custom ok/cancel button text - Add a 「← 返回配方卡片」banner in MyDiary brand tab when navigated from a recipe card, allowing return without uploading Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -36,12 +36,6 @@
|
||||
>English</button>
|
||||
</div>
|
||||
|
||||
<!-- QR / brand upload hint -->
|
||||
<div v-if="showBrandHint" class="brand-upload-hint">
|
||||
<span class="hint-icon">✨</span>
|
||||
<span>上传你的专属二维码,生成属于自己的配方卡片</span>
|
||||
</div>
|
||||
|
||||
<!-- Card image (rendered by html2canvas) -->
|
||||
<div v-show="!cardImageUrl" ref="cardRef" class="export-card">
|
||||
<!-- Brand overlay layers -->
|
||||
@@ -361,6 +355,7 @@ import { useAuthStore } from '../stores/auth'
|
||||
import { useUiStore } from '../stores/ui'
|
||||
import { useDiaryStore } from '../stores/diary'
|
||||
import { api } from '../composables/useApi'
|
||||
import { showConfirm } from '../composables/useDialog'
|
||||
import { oilEn, recipeNameEn } from '../composables/useOilTranslation'
|
||||
// TagPicker replaced with inline tag editing
|
||||
|
||||
@@ -481,6 +476,14 @@ async function loadBrand() {
|
||||
} catch {
|
||||
brand.value = {}
|
||||
}
|
||||
// Show upload prompt if user hasn't set up brand assets yet
|
||||
if (showBrandHint.value) {
|
||||
const ok = await showConfirm(
|
||||
'上传你的专属二维码,让配方卡片更专业 ✨',
|
||||
{ okText: '去上传', cancelText: '取消' }
|
||||
)
|
||||
if (ok) goUploadQr()
|
||||
}
|
||||
}
|
||||
|
||||
// Whether to show the brand/QR upload hint (show to all users who haven't set up brand assets)
|
||||
|
||||
Reference in New Issue
Block a user