feat: 编辑器对齐+审核记录+UI调整
- 新增/编辑配方编辑器与配方卡片编辑界面完全一致(含容量与稀释) - 自定义滴数/稀释比例框缩小,应用按钮放在稀释比例同一行 - 管理员可查看所有审核记录(采纳/拒绝历史) - 标签筛选和全选按钮对所有用户可见 - 我的配方/公共配方库均可折叠 - viewer 看配方卡片无编辑按钮 - diary 配方卡片无编辑按钮 - 退出登录跳转首页并刷新 - 新增 /api/recipe-reviews 端点 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -52,7 +52,7 @@
|
||||
<template v-if="!searchQuery || myDiaryRecipes.length > 0">
|
||||
<div class="section-header" @click="showMyRecipes = !showMyRecipes">
|
||||
<span>📖 我的配方 ({{ myDiaryRecipes.length }})</span>
|
||||
<span v-if="!auth.isAdmin && sharedCount > 0" class="contrib-badge">已贡献 {{ sharedCount }} 条公共配方</span>
|
||||
<span v-if="!auth.isAdmin && sharedCount.total > 0" class="contrib-badge">已贡献 {{ sharedCount.adopted }}/{{ sharedCount.total }} 条</span>
|
||||
<span class="toggle-icon">{{ showMyRecipes ? '▾' : '▸' }}</span>
|
||||
</div>
|
||||
<div v-if="showMyRecipes" class="recipe-grid">
|
||||
@@ -192,7 +192,7 @@ const selectedDiaryRecipe = ref(null)
|
||||
const showMyRecipes = ref(false)
|
||||
const showFavorites = ref(false)
|
||||
const catIdx = ref(0)
|
||||
const sharedCount = ref(0)
|
||||
const sharedCount = ref({ adopted: 0, total: 0 })
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
@@ -209,7 +209,7 @@ onMounted(async () => {
|
||||
const cRes = await api('/api/me/contribution')
|
||||
if (cRes.ok) {
|
||||
const data = await cRes.json()
|
||||
sharedCount.value = data.shared_count || 0
|
||||
sharedCount.value = { adopted: data.adopted_count || 0, total: data.shared_count || 0 }
|
||||
}
|
||||
} catch {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user