fix(studio): Phase0 卖相批——退出登录入口/品牌渐变/Inter字体/字号token/创作页诚实空态

- 退出登录入口(Project.vue):接既有 userStore.logout()(不重实现),isRealLogin() 门控仅登录态显示,二次确认→replace('/feed');闭合 §7「退出登录无入口」孤儿红线
- 主按钮品牌渐变(AppButton.vue):.app-btn--primary 纯色青→135° cyan→green 渐变+weight 820+深色字#061014,对齐 demo
- 品牌字体(reset.css + public/fonts):self-host Inter 拉丁子集 400/600/700 woff2,@font-face font-display:swap,'Inter' 前置字体栈(中文兜底 PingFang SC/微软雅黑)
- 字号阶梯(tokens.css):新增 --fs-h1/h2/body/caption,additive
- 创作页诚实空态(Create.vue):W-CLEAN 后模板列表返空属迁移非故障,区分"升级中"与"⚠加载失败"不再误报,空态给"去游戏流"出口

真机走查实证(staging :4173 CDP 截图双证):退出登录可见可登出/主按钮青绿渐变/Inter真渲/创作页诚实文案 全生效
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
zizi 2026-06-16 06:43:12 +00:00
parent 188511d2ce
commit 42342e8c53
8 changed files with 109 additions and 10 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -101,10 +101,13 @@ function onClick(ev: MouseEvent) {
width: 100%;
}
/* —— 类型primary 实心青(深底黑字保证对比)—— */
/* primary 绿 demo:228
背景 135° cyangreen 渐变 + 重字重 820 + 深色高对比字#061014
primary 用此渐变与字重ghost/danger/plain 不受影响 */
.app-btn--primary {
background: var(--cyan);
color: #04222a;
background: linear-gradient(135deg, var(--cyan), var(--green));
color: #061014;
font-weight: 820;
}
/* ghost 透明描边青 */
.app-btn--ghost {

View File

@ -3,6 +3,32 @@
* 目标抹平浏览器默认差异锁定深色底禁横向滚动统一盒模型与字体
*/
/* 品牌字体 Interself-host 拉丁子集对齐 demo:35 首选 Inter
仅拉丁子集数字/英文/计数/作者名中文由下方 font-family 兜底 PingFang SC / Microsoft YaHei
font-display:swap字体未就绪先用系统字渲染加载完替换避免 FOIT 阻塞首屏文字
字重三档400 常规 / 600 中粗次级标题/ 700 标题文件存 public/fonts相对 base 引用 */
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/inter-latin-400-normal.woff2') format('woff2');
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 600;
font-display: swap;
src: url('/fonts/inter-latin-600-normal.woff2') format('woff2');
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/inter-latin-700-normal.woff2') format('woff2');
}
/* 统一盒模型:所有元素含 padding/border 计入宽高,布局更可控 */
*,
*::before,
@ -27,8 +53,8 @@ body {
/* D4 深色底 + 主文字色(引用 token */
background: var(--bg);
color: var(--ink);
/* 移动端系统字体栈,无需引入外部字体 */
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
/* 品牌字体 Inter 前置(拉丁优先),中文兜底 PingFang SC / Microsoft YaHei其余系统字体兜底 */
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', sans-serif;
font-size: 14px;
line-height: 1.5;

View File

@ -23,6 +23,13 @@
--mask: rgba(7, 9, 17, 0.72); /* 遮罩/弹层背景 */
--shadow: 0 8px 24px rgba(0, 0, 0, 0.45); /* 浮层阴影 */
/* 字号阶梯type scale对齐 demo:66-69纯新增 token组件可渐进改引不强制全量替换
统一标题/正文/辅助字号消除组件散落硬编码便于后续换肤与一致性维护 */
--fs-h1: clamp(24px, 5vw, 32px); /* 一级标题(大屏渐增,移动端封顶 32px */
--fs-h2: 19px; /* 二级标题 */
--fs-body: 14px; /* 正文(与 body 基线 14px 一致) */
--fs-caption: 12px; /* 辅助说明/计数/时间 */
/* —— TabBar / 安全区相关 —— */
--tabbar-h: 52px; /* 底部 TabBar 高度 */
--safe-bottom: env(safe-area-inset-bottom, 0px); /* iOS 底部安全区 */

View File

@ -78,6 +78,15 @@ function useExample() {
if (ex) prompt.value = ex
}
/**
* 暂无玩法模板时的有用出口去游戏流逛逛
* 背景W-CLEAN2026-06-12下架旧玩法模板层模板体系迁移中新版一句话生成接 W-G1
* 后端 template/list 暂返空数组非故障此时创作流暂不可完成给玩家一个不卡死的出口
*/
function goFeed() {
router.push('/feed')
}
/**
* 提交生成创作者闭环核心动作
* 步骤建草稿项目 projectId 作为 gameId 投递生成任务 跳进度页
@ -134,15 +143,25 @@ onMounted(loadTemplates)
<span class="tpl-loading-text">模板加载中</span>
</div>
<!-- 加载失败 / -->
<!-- 真加载失败网络/服务异常可重试 -->
<EmptyState
v-else-if="tplError || createStore.templates.length === 0"
v-else-if="tplError"
icon="⚠"
title="模板加载失败"
description="网络异常或服务未就绪,请重试"
action-text="重新加载"
@action="loadTemplates"
/>
<!-- 非故障W-CLEAN 后玩法模板体系升级中新版一句话创作接 W-G1 待上线
诚实区分升级中加载失败不误报故障给一个去游戏流的出口 -->
<EmptyState
v-else-if="createStore.templates.length === 0"
icon="✨"
title="玩法模板体系升级中"
description="新版「一句话创作」即将上线,先去游戏流逛逛吧"
action-text="去游戏流"
@action="goFeed"
/>
<!-- 模板横向卡片列表3-5 -->
<div v-else class="tpl-list">

View File

@ -14,16 +14,49 @@
import { onMounted, ref } from 'vue'
import { useRouter } from 'vue-router'
import { storeToRefs } from 'pinia'
import { showConfirmDialog } from 'vant'
import { useProjectStore } from '../../store/project'
import { useUserStore } from '../../store/user'
import { EmptyState, LoadingBar, AppButton } from '../../components'
import StatusBadge from './StatusBadge.vue'
import { STATUS_FILTERS } from './status'
const router = useRouter()
const projectStore = useProjectStore()
// store退 logout()
const userStore = useUserStore()
// store
const { myList, loading } = storeToRefs(projectStore)
/**
* 是否真实登录 localStorage token 才算§9.2
* 用作退出登录入口的唯一显隐判据匿名态/staging env-token 态恒 false不渲染登出入口零中断
* 用普通常量而非 computed本页 onMounted 即进入登录态在本页生命周期内不会变化登出后立即跳走 /feed
*/
const showLogout = userStore.isRealLogin()
/**
* 退出登录二次确认 调既有 userStore.logout() 清本地会话 5 LS replace 到游戏流
* replace 而非 push登出后不应能返回到受保护的我的项目页避免回退即触发守卫再跳登录的抖动
*/
async function onLogout() {
try {
await showConfirmDialog({
title: '退出登录',
message: '退出后需重新登录才能查看你的项目与创作,确定退出吗?',
confirmButtonText: '退出登录',
cancelButtonText: '取消',
})
} catch {
// showConfirmDialog reject
return
}
// + localStorage
userStore.logout()
//
router.replace('/feed')
}
/** 当前选中的状态筛选值undefined=全部)。默认全部。 */
const activeStatus = ref<number | undefined>(undefined)
@ -77,10 +110,14 @@ onMounted(() => {
<template>
<div class="proj-list">
<!-- 顶部标题栏 + 新建入口 -->
<!-- 顶部标题栏 + 新建入口+ 退出登录仅真实登录态显示闭合 §7退出登录无入口孤儿 -->
<header class="proj-list__head">
<h1 class="proj-list__title">我的项目</h1>
<AppButton type="ghost" size="small" @click="goCreate">+ 新建</AppButton>
<div class="proj-list__actions">
<!-- 退出登录仅真实登录用户可见匿名/批跑 env-token 态不渲染点击直连既有 logout() -->
<AppButton v-if="showLogout" type="ghost" size="small" @click="onLogout">退出登录</AppButton>
<AppButton type="ghost" size="small" @click="goCreate">+ 新建</AppButton>
</div>
</header>
<!-- 状态筛选页签横向滚动覆盖 7 + 全部 -->
@ -170,10 +207,17 @@ onMounted(() => {
padding: 16px 16px 8px;
}
.proj-list__title {
font-size: 20px;
/* 示范引用字号阶梯 token页面标题对齐 --fs-h2 19px其余组件可后续渐进迁移 */
font-size: var(--fs-h2);
font-weight: 700;
margin: 0;
}
/* 顶部操作区:退出登录 + 新建并排gap 防贴死) */
.proj-list__actions {
display: flex;
align-items: center;
gap: 8px;
}
/* 状态筛选页签:横向可滚动 */
.proj-list__filters {