From 27447a168b166560dfef966dda5ac5abb58bf99c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=BA=94=E9=A6=99=E4=B8=B8=E5=AD=90?= <15518898337@163.com>
Date: Tue, 23 Jun 2026 20:27:00 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=88=9B=E4=BD=9C=E9=A1=B5?=
=?UTF-8?q?=E5=85=A5=E5=8F=A3=E5=92=8C=E9=80=89=E4=B8=AD=E6=80=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
隐藏创作桌面侧栏推荐和发现入口
调整创作页左侧导航、品牌区和按钮选中态为 IP 主题扁平效果
更新桌面导航相关测试断言
---
...gEntryFlowShell.agent.interaction.test.tsx | 44 ++++---
.../RpgEntryHomeView.recharge.test.tsx | 17 ++-
src/components/rpg-entry/RpgEntryHomeView.tsx | 9 +-
src/index.css | 108 ++++++++++--------
4 files changed, 107 insertions(+), 71 deletions(-)
diff --git a/src/components/rpg-entry/RpgEntryFlowShell.agent.interaction.test.tsx b/src/components/rpg-entry/RpgEntryFlowShell.agent.interaction.test.tsx
index dd0f4d92a..7bea6c993 100644
--- a/src/components/rpg-entry/RpgEntryFlowShell.agent.interaction.test.tsx
+++ b/src/components/rpg-entry/RpgEntryFlowShell.agent.interaction.test.tsx
@@ -9426,8 +9426,7 @@ test('creation home community opens in place without switching to profile', asyn
expect(screen.queryByText('陶泥号')).toBeNull();
});
-test('creation home desktop rail can return to platform tabs', async () => {
- const user = userEvent.setup();
+test('creation home desktop rail hides recommend and discover entries', async () => {
mockDesktopPlatformLayout();
window.history.replaceState(null, '', '/creation');
const { container } = render();
@@ -9437,17 +9436,24 @@ test('creation home desktop rail can return to platform tabs', async () => {
});
const nav = container.querySelector('.platform-desktop-rail');
expect(nav).toBeTruthy();
-
- await user.click(within(nav as HTMLElement).getByRole('button', { name: '推荐' }));
-
- await waitFor(() => {
- expect(screen.queryByRole('main', { name: '陶泥儿创作主页' })).toBeNull();
- });
- expect(window.location.pathname).toBe('/');
+ expect(
+ within(nav as HTMLElement).queryByRole('button', { name: '推荐' }),
+ ).toBeNull();
+ expect(
+ within(nav as HTMLElement).queryByRole('button', { name: '发现' }),
+ ).toBeNull();
+ expect(
+ within(nav as HTMLElement).getByRole('button', { name: '创作' }),
+ ).toBeTruthy();
+ expect(
+ within(nav as HTMLElement).getByRole('button', { name: '项目' }),
+ ).toBeTruthy();
+ expect(
+ within(nav as HTMLElement).getByRole('button', { name: '我的' }),
+ ).toBeTruthy();
});
-test('project page keeps desktop rail and can return to platform tabs', async () => {
- const user = userEvent.setup();
+test('project page keeps desktop rail with recommend and discover hidden', async () => {
mockDesktopPlatformLayout();
window.history.replaceState(null, '', '/project');
const { container } = render();
@@ -9470,13 +9476,15 @@ test('project page keeps desktop rail and can return to platform tabs', async ()
expect(createNavButton.className).not.toContain(
'platform-desktop-rail__button--primary',
);
-
- await user.click(within(nav as HTMLElement).getByRole('button', { name: '推荐' }));
-
- await waitFor(() => {
- expect(screen.queryByRole('main', { name: '项目' })).toBeNull();
- });
- expect(window.location.pathname).toBe('/');
+ expect(
+ within(nav as HTMLElement).queryByRole('button', { name: '推荐' }),
+ ).toBeNull();
+ expect(
+ within(nav as HTMLElement).queryByRole('button', { name: '发现' }),
+ ).toBeNull();
+ expect(
+ within(nav as HTMLElement).getByRole('button', { name: '我的' }),
+ ).toBeTruthy();
});
test('desktop project tab switch clears creation primary styling', async () => {
diff --git a/src/components/rpg-entry/RpgEntryHomeView.recharge.test.tsx b/src/components/rpg-entry/RpgEntryHomeView.recharge.test.tsx
index 1e3c422fc..f5148ec59 100644
--- a/src/components/rpg-entry/RpgEntryHomeView.recharge.test.tsx
+++ b/src/components/rpg-entry/RpgEntryHomeView.recharge.test.tsx
@@ -3856,6 +3856,15 @@ test('desktop nav shows creation and projects without draft entry', async () =>
expect(
within(nav as HTMLElement).getByRole('button', { name: '项目' }),
).toBeTruthy();
+ expect(
+ within(nav as HTMLElement).getByRole('button', { name: '我的' }),
+ ).toBeTruthy();
+ expect(
+ within(nav as HTMLElement).queryByRole('button', { name: '推荐' }),
+ ).toBeNull();
+ expect(
+ within(nav as HTMLElement).queryByRole('button', { name: '发现' }),
+ ).toBeNull();
expect(
within(nav as HTMLElement).queryByRole('button', {
name: '草稿,有新草稿',
@@ -3909,7 +3918,13 @@ test('desktop recommend page reuses compact workbench chrome', () => {
).toBe('/branding/taonier-product-ip.png');
expect(topbar?.querySelector('.creation-home-brand-lockup')).toBeNull();
expect(
- within(leftbar as HTMLElement).getByRole('button', { name: '推荐' }),
+ within(leftbar as HTMLElement).queryByRole('button', { name: '推荐' }),
+ ).toBeNull();
+ expect(
+ within(leftbar as HTMLElement).queryByRole('button', { name: '发现' }),
+ ).toBeNull();
+ expect(
+ within(leftbar as HTMLElement).getByRole('button', { name: '创作' }),
).toBeTruthy();
expect(
within(topbar as HTMLElement).getByPlaceholderText(
diff --git a/src/components/rpg-entry/RpgEntryHomeView.tsx b/src/components/rpg-entry/RpgEntryHomeView.tsx
index f0a2c04fe..cb1470926 100644
--- a/src/components/rpg-entry/RpgEntryHomeView.tsx
+++ b/src/components/rpg-entry/RpgEntryHomeView.tsx
@@ -327,6 +327,10 @@ const PLATFORM_DESKTOP_NAV_TABS: PlatformNavTab[] = [
'projects',
'profile',
];
+const HIDDEN_DESKTOP_CREATION_NAV_TABS = new Set([
+ 'home',
+ 'category',
+]);
const CREATION_HOME_NAV_ICON_SRC: Record = {
home: '/creation-home/nav-recommend.png',
category: '/creation-home/nav-discover.png',
@@ -2897,9 +2901,10 @@ export function RpgEntryHomeView({
);
const visibleDesktopNavTabs = useMemo(
() =>
- isAuthenticated
+ (isAuthenticated
? PLATFORM_DESKTOP_NAV_TABS
- : ['home', 'category', 'create', 'projects', 'profile'],
+ : ['home', 'category', 'create', 'projects', 'profile']
+ ).filter((tab) => !HIDDEN_DESKTOP_CREATION_NAV_TABS.has(tab)),
[isAuthenticated],
);
const publicUserCode = buildPublicUserCode(authUi?.user);
diff --git a/src/index.css b/src/index.css
index e814989e3..283343c15 100644
--- a/src/index.css
+++ b/src/index.css
@@ -3307,6 +3307,9 @@ html[data-mobile-keyboard-open='true'] .platform-mobile-bottom-dock {
--creation-clay: #c76532;
--creation-clay-dark: #914315;
--creation-clay-soft: #ead2bf;
+ --creation-ip: #c7653d;
+ --creation-ip-soft: #fff2e7;
+ --creation-ip-border: rgba(199, 101, 61, 0.32);
--creation-ink: #26170f;
--creation-muted: #87756a;
min-height: 0;
@@ -3383,9 +3386,7 @@ html[data-mobile-keyboard-open='true'] .platform-mobile-bottom-dock {
padding: 0 2rem 0 1.35rem !important;
font-size: 1.02rem !important;
letter-spacing: 0.08em;
- box-shadow:
- 0 16px 28px rgba(130, 66, 24, 0.18),
- inset 0 1px 0 rgba(255, 255, 255, 0.42);
+ box-shadow: 0 10px 22px rgba(130, 66, 24, 0.08);
}
.creation-landing__button-art {
@@ -3399,21 +3400,18 @@ html[data-mobile-keyboard-open='true'] .platform-mobile-bottom-dock {
mix-blend-mode: multiply;
}
-.creation-landing__hero-action--primary {
- border: 1px solid rgba(157, 74, 22, 0.44) !important;
- background:
- radial-gradient(circle at 30% 18%, rgba(255, 194, 128, 0.58), transparent 42%),
- linear-gradient(180deg, #d97937 0%, #bd5b20 100%) !important;
- color: #fff9f0 !important;
+.creation-landing__hero-action--primary,
+.creation-landing__hero-action--secondary {
+ border: 1px solid var(--creation-ip-border) !important;
+ background: rgba(255, 250, 244, 0.82) !important;
+ color: #8b5738 !important;
+ box-shadow: 0 10px 22px rgba(130, 66, 24, 0.08);
}
-.creation-landing__hero-action--secondary {
- border: 1px solid rgba(209, 178, 151, 0.9) !important;
- background: rgba(255, 250, 244, 0.78) !important;
- color: #8b5738 !important;
- box-shadow:
- 0 12px 24px rgba(130, 66, 24, 0.08),
- inset 0 1px 0 rgba(255, 255, 255, 0.88);
+.creation-landing__hero-action--primary:hover:not(:disabled),
+.creation-landing__hero-action--secondary:hover:not(:disabled) {
+ border-color: rgba(199, 101, 61, 0.48) !important;
+ background: var(--creation-ip-soft) !important;
}
.creation-landing__hero-board {
@@ -11810,29 +11808,37 @@ button.image-canvas-editor__reference-chip:disabled {
.platform-desktop-shell--workbench .platform-brand-logo {
align-self: center;
+ gap: 0.1rem;
}
.platform-desktop-shell--workbench .creation-home-brand-lockup {
align-self: flex-start;
- min-height: 3.28rem;
- padding-left: 0.28rem;
+ min-height: 4.18rem;
+ padding-left: 0.02rem;
}
.platform-desktop-shell--workbench .platform-brand-logo__image {
- width: 2.82rem;
- height: 2.82rem;
+ width: 4.12rem;
+ height: 4.12rem;
flex: 0 0 auto;
- filter: drop-shadow(0 0.36rem 0.34rem rgba(112, 62, 32, 0.18));
+ filter: drop-shadow(0 0.5rem 0.4rem rgba(112, 62, 32, 0.2));
+}
+
+.platform-desktop-shell--workbench .platform-brand-logo__copy {
+ gap: 0.11rem;
+ transform: translateY(0.02rem);
}
.platform-desktop-shell--workbench .platform-brand-logo__title {
- font-size: 1.38rem;
+ font-size: 1.46rem;
color: #4a220f;
+ letter-spacing: 0.025em;
}
.platform-desktop-shell--workbench .platform-brand-logo__subtitle {
color: #9b5a35;
- font-size: 0.46rem;
+ font-size: 0.48rem;
+ letter-spacing: 0.07em;
}
.platform-desktop-shell--workbench
@@ -11938,7 +11944,7 @@ button.image-canvas-editor__reference-chip:disabled {
.platform-desktop-shell--workbench .platform-desktop-rail {
align-self: flex-start;
- width: 7.05rem;
+ width: 7.6rem;
margin: 1.12rem auto 0;
border-color: rgba(220, 192, 168, 0.7);
border-radius: 1.55rem;
@@ -11950,61 +11956,63 @@ button.image-canvas-editor__reference-chip:disabled {
}
.platform-desktop-shell--workbench .platform-desktop-rail__button {
- min-height: 2.88rem;
+ min-height: 3.18rem;
display: flex;
flex-direction: row;
+ align-items: center;
justify-content: flex-start;
- gap: 0.34rem;
- border-radius: 0.82rem;
- padding: 0 0.34rem;
+ gap: 0.42rem;
+ border-radius: 0.96rem;
+ padding: 0 0.42rem;
text-align: left;
}
.platform-desktop-shell--workbench .platform-desktop-rail__button--primary {
- min-height: 2.88rem;
+ min-height: 3.18rem;
}
.platform-desktop-shell--workbench .platform-desktop-rail__icon-shell {
- width: 2.08rem;
- height: 2.08rem;
+ width: 2.44rem;
+ height: 2.44rem;
flex: 0 0 auto;
- border-radius: 0.74rem;
+ border-radius: 0.9rem;
background: transparent;
box-shadow: none;
}
.platform-desktop-shell--workbench .platform-desktop-rail__button--active .platform-desktop-rail__icon-shell {
- background:
- radial-gradient(circle at 35% 22%, rgba(255, 196, 133, 0.72), transparent 42%),
- linear-gradient(180deg, #df884b 0%, #c6652a 100%);
- box-shadow:
- 0 0.62rem 1rem rgba(139, 73, 32, 0.18),
- inset 0 1px 0 rgba(255, 255, 255, 0.5);
+ background: #fff2e7;
+ box-shadow: none;
}
.platform-desktop-shell--workbench .platform-desktop-rail__button--active .platform-desktop-rail__icon {
- color: #fffaf3;
+ color: #c7653d;
}
.platform-desktop-shell--workbench .creation-home-nav-art {
display: block;
- width: 1.62rem;
- height: 1.62rem;
+ width: 2.12rem;
+ height: 2.12rem;
object-fit: contain;
object-position: center;
filter: drop-shadow(0 0.3rem 0.28rem rgba(112, 62, 32, 0.14));
mix-blend-mode: multiply;
}
+.platform-desktop-shell--workbench .platform-desktop-rail__label {
+ min-width: 0;
+ color: #70452d;
+ font-size: 0.76rem !important;
+ font-weight: 760 !important;
+ letter-spacing: 0.04em !important;
+ line-height: 1.05;
+}
+
.platform-desktop-shell--workbench
.platform-desktop-rail__button--active
.creation-home-nav-art {
- filter:
- saturate(0.34)
- brightness(1.68)
- contrast(0.82)
- drop-shadow(0 0.22rem 0.2rem rgba(112, 62, 32, 0.18));
- mix-blend-mode: screen;
+ filter: drop-shadow(0 0.24rem 0.22rem rgba(112, 62, 32, 0.12));
+ mix-blend-mode: multiply;
}
.platform-desktop-shell--workbench .platform-desktop-rail__icon {
@@ -12012,13 +12020,13 @@ button.image-canvas-editor__reference-chip:disabled {
}
.platform-desktop-shell--workbench .platform-desktop-rail__button--active {
- border-color: transparent;
- background: transparent;
+ border-color: rgba(199, 101, 61, 0.22);
+ background: rgba(255, 242, 231, 0.74);
box-shadow: none;
}
.platform-desktop-shell--workbench .platform-desktop-rail__button--active .platform-desktop-rail__label {
- color: #c15f28;
+ color: #c7653d;
}
.platform-desktop-shell--workbench .platform-desktop-rail__label {