项目文件夹

文件
wehub-resource-sync 2114b14ee0
Sync main into demo / sync (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:35:26 +08:00

1685 行
61 KiB
TypeScript

此文件含有模棱两可的 Unicode 字符
此文件含有可能会与其他字符混淆的 Unicode 字符。 如果您是想特意这样的,可以安全地忽略该警告。 使用 Escape 按钮显示他们。
import type { NavigationDeclaration, ScrollContainerDeclaration } from './navigation.types';
const MAIN_SCROLL: ScrollContainerDeclaration[] = [
{ name: 'main', direction: 'vertical', description: '主内容区' },
];
const NO_SCROLL: ScrollContainerDeclaration[] = [];
export const NAVIGATION_DECLARATION = {
app: 'redbook',
routes: [
// =========================
// Main tabs
// =========================
{
path: '/',
component: 'HomePage',
params: {},
entryPoint: 'home',
scrollContainers: MAIN_SCROLL,
uiStates: [
// 首页必须带 tab 才是合法状态;入口由 MemoryRouter 初始路由保证为 "/?tab=discover"
{ id: 'home.tab.discover', search: { tab: 'discover' }, description: '首页-发现' },
{
id: 'home.tab.follow',
search: { tab: 'follow' },
description: '首页-关注',
actions: [
{
id: 'home.follow.userFollow.toggle',
label: '切换关注(关注流-作者)',
behavior: 'toggle',
scope: 'item',
paramsSchema: { userId: 'string', to: 'boolean' },
},
],
},
{ id: 'home.tab.city', search: { tab: 'city' }, description: '首页-同城' },
{ id: 'home.tab.discover.modal.publish', search: { tab: 'discover', modal: 'publish' }, description: '首页-发现-发布面板' },
{ id: 'home.tab.follow.modal.publish', search: { tab: 'follow', modal: 'publish' }, description: '首页-关注-发布面板' },
{ id: 'home.tab.city.modal.publish', search: { tab: 'city', modal: 'publish' }, description: '首页-同城-发布面板' },
{ id: 'home.tab.discover.menu.drawer', search: { tab: 'discover', menu: 'drawer' }, description: '首页-发现-侧边抽屉' },
{ id: 'home.tab.follow.menu.drawer', search: { tab: 'follow', menu: 'drawer' }, description: '首页-关注-侧边抽屉' },
{ id: 'home.tab.city.menu.drawer', search: { tab: 'city', menu: 'drawer' }, description: '首页-同城-侧边抽屉' },
],
queryParams: {},
description: '首页(发现/关注/同城 Tab 已迁到 URL;发布面板/抽屉也已迁到 URL)',
},
{
path: '/market',
component: 'ShopPage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [
{ id: 'market.base', search: {}, description: '市集' },
{ id: 'market.modal.publish', search: { modal: 'publish' }, description: '市集-发布面板' },
],
queryParams: {},
description: '市集',
},
{
path: '/message',
component: 'MessagePage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [
{ id: 'message.base', search: {}, description: '消息' },
{ id: 'message.modal.publish', search: { modal: 'publish' }, description: '消息-发布面板' },
],
queryParams: {},
description: '消息',
},
{
path: '/me',
component: 'MePage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [
{ id: 'me.tab.notes.public', search: { tab: 'notes', sub: 'public' }, description: '我-笔记-公开' },
{ id: 'me.tab.notes.private', search: { tab: 'notes', sub: 'private' }, description: '我-笔记-私密' },
{ id: 'me.tab.notes.collection', search: { tab: 'notes', sub: 'collection' }, description: '我-笔记-合集' },
{ id: 'me.tab.collects', search: { tab: 'collects' }, description: '我-收藏' },
{ id: 'me.tab.likes', search: { tab: 'likes' }, description: '我-赞过' },
{ id: 'me.tab.comments', search: { tab: 'comments' }, description: '我-评论' },
{ id: 'me.tab.notes.public.modal.publish', search: { tab: 'notes', sub: 'public', modal: 'publish' }, description: '我-笔记-公开-发布面板' },
{ id: 'me.tab.notes.private.modal.publish', search: { tab: 'notes', sub: 'private', modal: 'publish' }, description: '我-笔记-私密-发布面板' },
{ id: 'me.tab.notes.collection.modal.publish', search: { tab: 'notes', sub: 'collection', modal: 'publish' }, description: '我-笔记-合集-发布面板' },
{ id: 'me.tab.collects.modal.publish', search: { tab: 'collects', modal: 'publish' }, description: '我-收藏-发布面板' },
{ id: 'me.tab.likes.modal.publish', search: { tab: 'likes', modal: 'publish' }, description: '我-赞过-发布面板' },
{ id: 'me.tab.comments.modal.publish', search: { tab: 'comments', modal: 'publish' }, description: '我-评论-发布面板' },
{ id: 'me.tab.notes.public.menu.drawer', search: { tab: 'notes', sub: 'public', menu: 'drawer' }, description: '我-笔记-公开-侧边抽屉' },
{ id: 'me.tab.notes.private.menu.drawer', search: { tab: 'notes', sub: 'private', menu: 'drawer' }, description: '我-笔记-私密-侧边抽屉' },
{ id: 'me.tab.notes.collection.menu.drawer', search: { tab: 'notes', sub: 'collection', menu: 'drawer' }, description: '我-笔记-合集-侧边抽屉' },
{ id: 'me.tab.collects.menu.drawer', search: { tab: 'collects', menu: 'drawer' }, description: '我-收藏-侧边抽屉' },
{ id: 'me.tab.likes.menu.drawer', search: { tab: 'likes', menu: 'drawer' }, description: '我-赞过-侧边抽屉' },
{ id: 'me.tab.comments.menu.drawer', search: { tab: 'comments', menu: 'drawer' }, description: '我-评论-侧边抽屉' },
],
queryParams: {},
description: '我(个人中心)',
},
// =========================
// Detail / profile / chat
// =========================
{
path: '/note/:id',
component: 'DetailPage',
params: { id: 'string' },
entryPoint: 'deepLink',
scrollContainers: MAIN_SCROLL,
uiStates: [
{
id: 'noteDetail.base',
search: {},
description: '笔记详情',
actions: [
{
id: 'note.item.like.toggle',
label: '切换点赞(笔记)',
behavior: 'toggle',
scope: 'item',
paramsSchema: { noteId: 'string', to: 'boolean' },
},
{
id: 'note.item.collect.toggle',
label: '切换收藏(笔记)',
behavior: 'toggle',
scope: 'item',
paramsSchema: { noteId: 'string', to: 'boolean' },
},
{
id: 'note.detail.authorFollow.toggle',
label: '切换关注(作者)',
behavior: 'toggle',
scope: 'item',
paramsSchema: { userId: 'string', to: 'boolean' },
},
{
id: 'note.comment.submit',
label: '发送评论',
behavior: 'submit',
paramsSchema: { value: 'string', replyToCommentId: 'string' },
},
{
id: 'note.comment.item.like.toggle',
label: '切换评论点赞',
behavior: 'toggle',
scope: 'item',
paramsSchema: { commentId: 'string', to: 'boolean' },
},
{
id: 'note.comment.reply.start',
label: '开始回复评论',
behavior: 'other',
scope: 'item',
paramsSchema: { commentId: 'string', username: 'string' },
},
{ id: 'note.comment.reply.cancel', label: '取消回复', behavior: 'other' },
{ id: 'note.comment.sortMenu.toggle', label: '切换评论排序菜单', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'note.comment.sort.select.default', label: '评论排序-默认', behavior: 'select' },
{ id: 'note.comment.sort.select.latest', label: '评论排序-最新', behavior: 'select' },
{ id: 'note.comment.sort.select.hot', label: '评论排序-最多点赞', behavior: 'select' },
],
},
{ id: 'noteDetail.modal.share', search: { modal: 'share' }, description: '笔记详情-分享面板' },
],
queryParams: {},
description: '笔记详情',
},
{
path: '/user/:userId',
component: 'UserPage',
params: { userId: 'string' },
entryPoint: 'deepLink',
scrollContainers: MAIN_SCROLL,
uiStates: [
{
id: 'user.base',
search: {},
description: '用户主页',
actions: [
{
id: 'user.page.follow.toggle',
label: '切换关注(用户主页)',
behavior: 'toggle',
scope: 'item',
paramsSchema: { userId: 'string', to: 'boolean' },
},
{ id: 'user.page.tab.select.works', label: '切换用户主页 Tab-笔记', behavior: 'select' },
{ id: 'user.page.tab.select.collects', label: '切换用户主页 Tab-收藏', behavior: 'select' },
],
},
],
queryParams: { name: 'string', avatar: 'string' },
description: '用户主页',
},
{
path: '/chat/:userId',
component: 'ChatPage',
params: { userId: 'string' },
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [{ id: 'chat.base', search: {}, description: '聊天' }],
queryParams: {},
description: '聊天',
},
{
path: '/chat/:userId/settings',
component: 'ChatSettingsPage',
params: { userId: 'string' },
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [
{
id: 'chatSettings.base',
search: {},
description: '聊天设置',
actions: [
{ id: 'chat.settings.pinned.toggle', label: '切换聊天置顶', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'chat.settings.muted.toggle', label: '切换消息免打扰', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'chat.settings.blacklist.toggle', label: '切换加入黑名单', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
],
},
],
queryParams: {},
description: '聊天设置',
},
// =========================
// Publish (text)
// =========================
{
path: '/publish/text',
component: 'PublishTextEntryPage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [{ id: 'publishTextEntry.base', search: {}, description: '写文字(输入)' }],
queryParams: {},
description: '写文字(输入)',
},
{
path: '/publish/text/template',
component: 'PublishTextTemplatePage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [{ id: 'publishTextTemplate.base', search: {}, description: '写文字(选择模板)' }],
queryParams: {},
description: '写文字(选择模板)',
},
{
path: '/publish/text/final',
component: 'PublishTextFinalPage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [{
id: 'publishTextFinal.base',
search: {},
description: '写文字(发布确认)',
actions: [
{ id: 'publish.text.submit', label: '发布笔记', behavior: 'submit' },
],
}],
queryParams: {},
description: '写文字(发布确认)',
},
// =========================
// Search
// =========================
{
path: '/search',
component: 'SearchPage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [
{ id: 'search.base', search: {}, description: '搜索-默认' },
{ id: 'search.tab.all', search: { tab: 'searchpage_all' }, description: '搜索-全部' },
{ id: 'search.tab.all.sort.comprehensive', search: { tab: 'searchpage_all', sort: 'comprehensive' }, description: '搜索-全部-综合排序' },
{ id: 'search.tab.all.sort.latest', search: { tab: 'searchpage_all', sort: 'latest' }, description: '搜索-全部-最新排序' },
{ id: 'search.tab.all.sort.likes', search: { tab: 'searchpage_all', sort: 'likes' }, description: '搜索-全部-最多点赞排序' },
{ id: 'search.tab.all.sort.comments', search: { tab: 'searchpage_all', sort: 'comments' }, description: '搜索-全部-最多评论排序' },
{ id: 'search.tab.all.sort.collects', search: { tab: 'searchpage_all', sort: 'collects' }, description: '搜索-全部-最多收藏排序' },
{ id: 'search.tab.all.panel.filter.comprehensive', search: { tab: 'searchpage_all', panel: 'filter', sort: 'comprehensive' }, description: '搜索-全部-筛选面板-综合排序' },
{ id: 'search.tab.all.panel.filter.latest', search: { tab: 'searchpage_all', panel: 'filter', sort: 'latest' }, description: '搜索-全部-筛选面板-最新排序' },
{ id: 'search.tab.all.panel.filter.likes', search: { tab: 'searchpage_all', panel: 'filter', sort: 'likes' }, description: '搜索-全部-筛选面板-最多点赞排序' },
{ id: 'search.tab.all.panel.filter.comments', search: { tab: 'searchpage_all', panel: 'filter', sort: 'comments' }, description: '搜索-全部-筛选面板-最多评论排序' },
{ id: 'search.tab.all.panel.filter.collects', search: { tab: 'searchpage_all', panel: 'filter', sort: 'collects' }, description: '搜索-全部-筛选面板-最多收藏排序' },
{ id: 'search.tab.user', search: { tab: 'users' }, description: '搜索-用户' },
{ id: 'search.tab.product', search: { tab: 'products' }, description: '搜索-商品' },
{ id: 'search.tab.image', search: { tab: 'images' }, description: '搜索-图片' },
{ id: 'search.tab.qa', search: { tab: 'searchpage_ask' }, description: '搜索-问一问' },
],
queryParams: { q: 'string' },
description: '搜索',
},
// =========================
// Settings
// =========================
{
path: '/settings',
component: 'SettingsPage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [{ id: 'settings.base', search: {}, description: '设置' }],
queryParams: {},
description: '设置',
},
{
path: '/settings/storage',
component: 'StoragePage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [
{
id: 'settingsStorage.base',
search: {},
description: '存储空间',
actions: [
{ id: 'settings.storage.clear', label: '清理缓存', behavior: 'submit' },
],
},
],
queryParams: {},
description: '存储空间',
},
{
path: '/settings/account',
component: 'AccountSecurityPage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [{ id: 'settingsAccount.base', search: {}, description: '账号与安全' }],
queryParams: {},
description: '账号与安全',
},
{
path: '/settings/general',
component: 'GeneralSettingsPage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [
{
id: 'settingsGeneral.base',
search: {},
description: '通用设置',
actions: [
{ id: 'settings.general.useSystemFont.toggle', label: '切换使用系统默认字体', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'settings.general.playAudio.toggle', label: '切换默认播放图文笔记声音', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'settings.general.autoRefresh.toggle', label: '切换允许自动刷新', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'settings.general.muteVideo.toggle', label: '切换视频和直播默认静音', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'settings.general.mobileDownload.toggle', label: '切换使用移动流量下载内容', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'settings.general.videoHDR.toggle', label: '切换视频 HDR 效果', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'settings.general.imageHDR.toggle', label: '切换图片 HDR 效果', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'settings.general.mobileNetwork.toggle', label: '切换使用移动网络改善浏览体验', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'settings.general.history.toggle', label: '切换浏览记录', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'settings.general.videoInteraction.toggle', label: '切换视频底部互动按钮展示', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'settings.general.preUpload.toggle', label: '切换允许发布时提前上传视频', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
],
},
],
queryParams: {},
description: '通用设置',
},
{
path: '/settings/notification',
component: 'NotificationSettingsPage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [
{
id: 'settingsNotification.base',
search: {},
description: '通知设置',
actions: [
{ id: 'settings.notification.receiveMsg.toggle', label: '切换接收消息通知', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'settings.notification.likeCollect.toggle', label: '切换赞和收藏通知', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'settings.notification.newFollow.toggle', label: '切换新增关注通知', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'settings.notification.comment.toggle', label: '切换评论通知', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'settings.notification.atMe.toggle', label: '切换@通知', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'settings.notification.storeNotif.toggle', label: '切换购物及售后通知', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
],
},
],
queryParams: {},
description: '通知设置',
},
{
path: '/settings/notification/private',
component: 'PrivateMessageSettingsPage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [
{
id: 'settingsNotificationPrivate.base',
search: {},
description: '私信通知设置',
actions: [
{ id: 'settings.notification.private.privateChat.toggle', label: '切换私聊通知', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'settings.notification.private.groupChat.toggle', label: '切换群聊通知', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'settings.notification.private.strangers.toggle', label: '切换陌生人私信通知', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
],
},
],
queryParams: {},
description: '私信通知设置',
},
{
path: '/settings/notification/follow',
component: 'FollowUpdatesPage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [
{
id: 'settingsNotificationFollow.base',
search: {},
description: '关注作者的更新提醒',
actions: [
{ id: 'settings.notification.follow.updates.toggle', label: '切换关注作者的更新', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'settings.notification.follow.unreadReminder.toggle', label: '切换关注未读提醒', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
],
},
],
queryParams: {},
description: '关注作者的更新提醒',
},
{
path: '/settings/notification/live',
component: 'LiveStreamReminderPage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [
{
id: 'settingsNotificationLive.base',
search: {},
description: '开播提醒设置',
actions: [
{ id: 'settings.notification.live.reminder.toggle', label: '切换开播提醒', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
],
},
],
queryParams: {},
description: '开播提醒设置',
},
{
path: '/settings/notification/content',
component: 'ContentRecommendationPage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [
{
id: 'settingsNotificationContent.base',
search: {},
description: '内容推荐设置',
actions: [
{ id: 'settings.notification.content.select.all', label: '选择内容推荐:全部', behavior: 'select' },
{ id: 'settings.notification.content.select.interested', label: '选择内容推荐:仅感兴趣的笔记', behavior: 'select' },
{ id: 'settings.notification.content.select.hotspots', label: '选择内容推荐:仅社区热点', behavior: 'select' },
{ id: 'settings.notification.content.select.none', label: '选择内容推荐:不接收', behavior: 'select' },
],
},
],
queryParams: {},
description: '内容推荐设置',
},
{
path: '/settings/notification/user',
component: 'UserRecommendationPage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [
{
id: 'settingsNotificationUser.base',
search: {},
description: '用户推荐设置',
actions: [
{ id: 'settings.notification.user.select.all', label: '选择用户推荐:全部', behavior: 'select' },
{ id: 'settings.notification.user.select.know', label: '选择用户推荐:仅我可能认识的人', behavior: 'select' },
{ id: 'settings.notification.user.select.like', label: '选择用户推荐:仅我可能喜欢的作者', behavior: 'select' },
{ id: 'settings.notification.user.select.none', label: '选择用户推荐:不接收', behavior: 'select' },
],
},
],
queryParams: {},
description: '用户推荐设置',
},
{
path: '/settings/notification/other',
component: 'OtherNotificationsPage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [
{
id: 'settingsNotificationOther.base',
search: {},
description: '其他通知设置',
actions: [
{ id: 'settings.notification.other.hotList.toggle', label: '切换热榜推送', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'settings.notification.other.topicRec.toggle', label: '切换话题推荐', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
],
},
],
queryParams: {},
description: '其他通知设置',
},
{
path: '/settings/notification/banner',
component: 'InAppBannerPage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [
{
id: 'settingsNotificationBanner.base',
search: {},
description: 'App 内通知横幅设置',
actions: [
{ id: 'settings.notification.banner.liveStream.toggle', label: '切换直播开播提醒横幅', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'settings.notification.banner.messages.toggle', label: '切换消息横幅', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
],
},
],
queryParams: {},
description: 'App 内通知横幅设置',
},
{
path: '/settings/language',
component: 'LanguageSettingsPage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [
{
id: 'settingsLanguage.base',
search: {},
description: '多语言和翻译',
actions: [
{ id: 'settings.language.select.zhCN', label: '选择简体中文', behavior: 'select' },
{ id: 'settings.language.select.zhTW', label: '选择繁体中文', behavior: 'select' },
{ id: 'settings.language.select.enUS', label: '选择英文', behavior: 'select' },
],
},
],
queryParams: {},
description: '多语言和翻译',
},
{
path: '/settings/privacy',
component: 'PrivacySettingsPage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [
{
id: 'settingsPrivacy.base',
search: {},
description: '隐私设置',
actions: [
{ id: 'settings.privacy.oneClickProtect.toggle', label: '切换一键防护', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'settings.privacy.showChatStatus.toggle', label: '切换展示聊天标识', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'settings.privacy.onlyFollowComment.toggle', label: '切换只允许关注的人评论', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'settings.privacy.onlyFollowDanmaku.toggle', label: '切换只允许关注的人发弹幕', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'settings.privacy.onlyFollowAt.toggle', label: '切换只允许关注的人@我', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'settings.privacy.allowDownload.toggle', label: '切换允许下载全部笔记', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'settings.privacy.recommendPeople.toggle', label: '切换给我推荐可能认识的人', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
],
},
],
queryParams: {},
description: '隐私设置',
},
{
path: '/settings/privacy/online-status',
component: 'OnlineStatusPage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [
{
id: 'settingsPrivacyOnlineStatus.base',
search: {},
description: '在线状态设置',
actions: [
{ id: 'settings.privacy.onlineStatus.select.public', label: '选择在线状态:公开', behavior: 'select' },
{ id: 'settings.privacy.onlineStatus.select.friends', label: '选择在线状态:好友', behavior: 'select' },
{ id: 'settings.privacy.onlineStatus.select.closed', label: '选择在线状态:关闭', behavior: 'select' },
],
},
],
queryParams: {},
description: '在线状态设置',
},
{
path: '/settings/privacy/message-permission',
component: 'MessagePermissionPage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [
{
id: 'settingsPrivacyMessagePermission.base',
search: {},
description: '谁可以私信我',
actions: [
{ id: 'settings.privacy.messagePermission.select.default', label: '选择谁可以私信我:默认', behavior: 'select' },
{ id: 'settings.privacy.messagePermission.select.following', label: '选择谁可以私信我:我关注的人', behavior: 'select' },
{ id: 'settings.privacy.messagePermission.select.mutual', label: '选择谁可以私信我:互相关注的人', behavior: 'select' },
{ id: 'settings.privacy.messagePermission.select.none', label: '选择谁可以私信我:禁止私信', behavior: 'select' },
],
},
],
queryParams: {},
description: '谁可以私信我',
},
{
path: '/settings/privacy/collect',
component: 'CollectPrivacyPage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [
{
id: 'settingsPrivacyCollect.base',
search: {},
description: '我的收藏公开设置',
actions: [
{ id: 'settings.privacy.collect.public.toggle', label: '切换公开我的收藏', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
],
},
],
queryParams: {},
description: '我的收藏公开设置',
},
{
path: '/settings/privacy/comment',
component: 'CommentPrivacyPage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [
{
id: 'settingsPrivacyComment.base',
search: {},
description: '我的评价公开设置',
actions: [
{ id: 'settings.privacy.comment.location.toggle', label: '切换公开评价-地点', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
],
},
],
queryParams: {},
description: '我的评价公开设置',
},
{
path: '/settings/privacy/find-me',
component: 'FindMeWayPage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [
{
id: 'settingsPrivacyFindMe.base',
search: {},
description: '找到我的方式',
actions: [
{ id: 'settings.privacy.findMe.recommendToOthers.toggle', label: '切换把我推荐给可能认识的人', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'settings.privacy.findMe.showInRelations.toggle', label: '切换把我展示在他人关系列表', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'settings.privacy.findMe.hideNotesNearby.toggle', label: '切换在附近页隐藏我的笔记', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'settings.privacy.findMe.hideNotesVisualSearch.toggle', label: '切换在识图页隐藏我的笔记', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
],
},
],
queryParams: {},
description: '找到我的方式',
},
{
path: '/settings/privacy/follow-list',
component: 'FollowListPrivacyPage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [
{
id: 'settingsPrivacyFollowList.base',
search: {},
description: '关注与粉丝列表隐私',
actions: [
{ id: 'settings.privacy.followList.hideFollowing.toggle', label: '切换隐藏我的关注列表', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'settings.privacy.followList.hideFollowers.toggle', label: '切换隐藏我的粉丝列表', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
],
},
],
queryParams: {},
description: '关注与粉丝列表隐私',
},
{
path: '/settings/privacy/system-permission',
component: 'SystemPermissionPage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [{ id: 'settingsPrivacySystemPermission.base', search: {}, description: '系统权限管理' }],
queryParams: {},
description: '系统权限管理',
},
{
path: '/settings/privacy/personalization',
component: 'PersonalizationPage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [
{
id: 'settingsPrivacyPersonalization.base',
search: {},
description: '个性化选项',
actions: [
{ id: 'settings.privacy.personalization.recommendation.toggle', label: '切换开启个性化推荐', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
{ id: 'settings.privacy.personalization.ads.toggle', label: '切换开启广告个性化推荐', behavior: 'toggle', paramsSchema: { to: 'boolean' } },
],
},
],
queryParams: {},
description: '个性化选项',
},
// =========================
// Misc
// =========================
{
path: '/edit-profile',
component: 'EditProfilePage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [{ id: 'editProfile.base', search: {}, description: '编辑资料' }],
queryParams: {},
description: '编辑资料',
},
{
path: '/user/allUser',
component: 'FollowListPage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [{ id: 'followList.base', search: {}, description: '关注/粉丝列表' }],
queryParams: { type: 'string' },
description: '关注/粉丝列表',
},
{
path: '/message/likes',
component: 'LikesAndCollectionsPage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [{ id: 'messageLikes.base', search: {}, description: '赞和收藏' }],
queryParams: {},
description: '赞和收藏',
},
{
path: '/message/followers',
component: 'NewFollowersPage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [{ id: 'messageFollowers.base', search: {}, description: '新增关注' }],
queryParams: {},
description: '新增关注',
},
{
path: '/message/comments',
component: 'CommentsAndAtPage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [{ id: 'messageComments.base', search: {}, description: '评论和@' }],
queryParams: {},
description: '评论和@',
},
{
path: '/addfriend',
component: 'AddFriendPage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [{ id: 'addFriend.base', search: {}, description: '添加好友' }],
queryParams: {},
description: '添加好友',
},
{
path: '/history',
component: 'HistoryPage',
params: {},
entryPoint: 'none',
scrollContainers: MAIN_SCROLL,
uiStates: [{ id: 'history.base', search: {}, description: '浏览记录' }],
queryParams: {},
description: '浏览记录',
},
],
transitions: [
// =========================
// 底部 Tab 切换
// =========================
{
id: 'tab.home',
// 覆盖层(modal/menu)打开时 TabBar 入口不可用;避免图上出现“发布面板直接切 Tab”的错误边
from: [
{ path: '/market', search: { modal: null } },
{ path: '/message', search: { modal: null } },
{ path: '/me', search: { tab: '*', modal: null, menu: null } },
],
to: '/',
search: { tab: 'discover' },
searchParams: {},
mode: 'replace',
params: {},
label: '切换到首页',
ui: { placement: 'tabbar', icon: 'tab_home', gesture: 'tap' },
},
{
id: 'tab.market',
from: [
{ path: '/', search: { tab: '*', modal: null, menu: null } },
{ path: '/message', search: { modal: null } },
{ path: '/me', search: { tab: '*', modal: null, menu: null } },
],
to: '/market',
search: {},
searchParams: {},
mode: 'replace',
params: {},
label: '切换到市集',
ui: { placement: 'tabbar', icon: 'tab_market', gesture: 'tap' },
},
{
id: 'tab.message',
from: [
{ path: '/', search: { tab: '*', modal: null, menu: null } },
{ path: '/market', search: { modal: null } },
{ path: '/me', search: { tab: '*', modal: null, menu: null } },
],
to: '/message',
search: {},
searchParams: {},
mode: 'replace',
params: {},
label: '切换到消息',
ui: { placement: 'tabbar', icon: 'tab_message', gesture: 'tap' },
},
{
id: 'tab.me',
from: [
{ path: '/', search: { modal: null, menu: null } },
{ path: '/market', search: { modal: null } },
{ path: '/message', search: { modal: null } },
],
to: '/me',
search: { tab: 'notes', sub: 'public' },
searchParams: {},
mode: 'replace',
params: {},
label: '切换到我',
ui: { placement: 'tabbar', icon: 'tab_me', gesture: 'tap' },
},
// =========================
// 发布面板(TabBar +
// =========================
{
id: 'home.modal.publish.open',
from: [{ path: '/', search: { tab: '*', modal: null, menu: null } }],
to: '/',
search: { modal: 'publish' },
searchParams: {},
preserveParams: ['tab'],
mode: 'push',
params: {},
label: '打开发布面板(首页)',
ui: { placement: 'tabbar', icon: 'tab_publish', gesture: 'tap' },
},
{
id: 'market.modal.publish.open',
from: [{ path: '/market', search: { modal: null } }],
to: '/market',
search: { modal: 'publish' },
searchParams: {},
mode: 'push',
params: {},
label: '打开发布面板(市集)',
ui: { placement: 'tabbar', icon: 'tab_publish', gesture: 'tap' },
},
{
id: 'message.modal.publish.open',
from: [{ path: '/message', search: { modal: null } }],
to: '/message',
search: { modal: 'publish' },
searchParams: {},
mode: 'push',
params: {},
label: '打开发布面板(消息)',
ui: { placement: 'tabbar', icon: 'tab_publish', gesture: 'tap' },
},
{
id: 'me.modal.publish.open',
from: [{ path: '/me', search: { tab: '*', modal: null, menu: null } }],
to: '/me',
search: { modal: 'publish' },
searchParams: {},
preserveParams: ['tab', 'sub'],
mode: 'push',
params: {},
label: '打开发布面板(我)',
ui: { placement: 'tabbar', icon: 'tab_publish', gesture: 'tap' },
},
// =========================
// 通用打开类跳转
// =========================
{
id: 'search.open',
// 发布面板/抽屉等覆盖层打开时,底层入口不可用
from: [{ path: '/', search: { tab: '*', modal: null, menu: null } }],
to: '/search',
search: {},
searchParams: {},
mode: 'push',
params: {},
label: '打开搜索',
ui: { placement: 'topbar', icon: 'search', gesture: 'tap' },
},
{
id: 'search.query.submit.push',
from: [{ path: '/search', search: { q: null } }],
to: '/search',
search: { panel: null },
searchParams: { q: 'string', tab: 'string', sort: 'string' },
mode: 'push',
params: {},
label: '提交搜索关键词(从落地页-Push)',
ui: { placement: 'topbar', icon: 'search_submit', gesture: 'tap' },
},
{
id: 'search.query.submit.replace',
from: ['/search'],
to: '/search',
search: { panel: null },
searchParams: { q: 'string', tab: 'string', sort: 'string' },
mode: 'replace',
params: {},
label: '提交搜索关键词(从结果页-Replace)',
ui: { placement: 'topbar', icon: 'search_submit', gesture: 'tap' },
},
{
id: 'search.tab.switch',
from: ['/search'],
to: '/search',
search: { panel: null },
searchParams: { tab: 'string', sort: 'string' },
preserveParams: ['q'],
mode: 'replace',
params: {},
label: '切换搜索 Tab',
ui: { placement: 'topbar', icon: 'search_tab', gesture: 'tap' },
},
{
id: 'search.filter.open',
from: [{ path: '/search', search: { tab: 'searchpage_all', panel: null } }],
to: '/search',
search: { panel: 'filter' },
searchParams: { sort: 'string' },
preserveParams: ['q', 'tab'],
mode: 'replace',
params: {},
label: '打开筛选面板',
ui: { placement: 'topbar', icon: 'search_filter', gesture: 'tap' },
},
{
id: 'search.sort.switch',
from: [{ path: '/search', search: { tab: 'searchpage_all', panel: 'filter' } }],
to: '/search',
search: { panel: 'filter' },
searchParams: { sort: 'string' },
preserveParams: ['q', 'tab'],
mode: 'replace',
params: {},
label: '切换搜索排序依据(面板内)',
ui: { placement: 'content', icon: 'search_sort', gesture: 'tap' },
},
{
id: 'search.sort.apply',
from: [
{ path: '/search', search: { tab: 'searchpage_all', panel: null } },
{ path: '/search', search: { tab: 'searchpage_all', panel: 'filter' } },
],
to: '/search',
search: { panel: null },
searchParams: { sort: 'string' },
preserveParams: ['q', 'tab'],
mode: 'replace',
params: {},
label: '应用搜索排序',
ui: { placement: 'content', icon: 'search_sort_apply', gesture: 'tap' },
},
{
id: 'search.clear',
from: ['/search'],
to: '/search',
search: { q: null, tab: null, panel: null, sort: null },
searchParams: {},
mode: 'replace',
params: {},
label: '清空搜索条件',
ui: { placement: 'topbar', icon: 'search_clear', gesture: 'tap' },
},
{
id: 'home.tab.switch',
// 覆盖层打开时,顶部 Tab 不可点
from: [{ path: '/', search: { tab: '*', modal: null, menu: null } }],
to: '/',
search: { modal: null, menu: null },
searchParams: { tab: 'string' },
mode: 'replace',
params: {},
label: '切换首页 Tab',
ui: { placement: 'topbar', icon: 'home_tab', gesture: 'tap' },
},
{
id: 'note.open',
from: [
{ path: '/', search: { tab: '*', modal: null, menu: null } },
{ path: '/me', search: { tab: '*', modal: null, menu: null } },
{ path: '/search', search: { tab: '*', panel: null } },
'/user/:userId',
'/history',
],
to: '/note/:id',
search: {},
searchParams: {},
mode: 'push',
params: { id: 'string' },
label: '打开笔记详情',
ui: { placement: 'content', icon: 'note', gesture: 'tap' },
},
{
id: 'note.share.open',
from: ['/note/:id'],
to: '/note/:id',
search: { modal: 'share' },
searchParams: {},
mode: 'push',
params: { id: 'string' },
label: '打开分享面板',
ui: { placement: 'topbar', icon: 'share', gesture: 'tap' },
},
{
id: 'user.open',
from: [
{ path: '/', search: { tab: '*', modal: null, menu: null } },
'/note/:id',
'/search',
'/user/allUser',
'/addfriend',
],
to: '/user/:userId',
search: {},
searchParams: { name: 'string', avatar: 'string' },
mode: 'push',
params: { userId: 'string' },
label: '打开用户主页',
ui: { placement: 'content', icon: 'user', gesture: 'tap' },
},
{
id: 'chat.open',
from: ['/message', '/user/:userId'],
to: '/chat/:userId',
search: {},
searchParams: {},
mode: 'push',
params: { userId: 'string' },
label: '打开聊天',
ui: { placement: 'content', icon: 'chat', gesture: 'tap' },
},
{
id: 'chat.settings.open',
from: ['/chat/:userId'],
to: '/chat/:userId/settings',
search: {},
searchParams: {},
mode: 'push',
params: { userId: 'string' },
label: '打开聊天设置',
ui: { placement: 'topbar', icon: 'chat_settings', gesture: 'tap' },
},
// =========================
// 消息页入口
// =========================
{
id: 'message.likes.open',
from: ['/message'],
to: '/message/likes',
search: {},
searchParams: {},
mode: 'push',
params: {},
label: '打开赞和收藏',
ui: { placement: 'content', icon: 'message_likes', gesture: 'tap' },
},
{
id: 'message.followers.open',
from: ['/message'],
to: '/message/followers',
search: {},
searchParams: {},
mode: 'push',
params: {},
label: '打开新增关注',
ui: { placement: 'content', icon: 'message_followers', gesture: 'tap' },
},
{
id: 'message.comments.open',
from: ['/message'],
to: '/message/comments',
search: {},
searchParams: {},
mode: 'push',
params: {},
label: '打开评论和@',
ui: { placement: 'content', icon: 'message_comments', gesture: 'tap' },
},
// =========================
// 个人页/抽屉入口
// =========================
{
id: 'me.tab.notes.public',
from: [{ path: '/me', search: { tab: '*' } }],
to: '/me',
search: { tab: 'notes', sub: 'public', menu: null, modal: null },
searchParams: {},
mode: 'replace',
params: {},
label: '切换我页-笔记-公开',
ui: { placement: 'content', icon: 'me_tab_notes_public', gesture: 'tap' },
},
{
id: 'me.tab.notes.private',
from: [{ path: '/me', search: { tab: '*' } }],
to: '/me',
search: { tab: 'notes', sub: 'private', menu: null, modal: null },
searchParams: {},
mode: 'replace',
params: {},
label: '切换我页-笔记-私密',
ui: { placement: 'content', icon: 'me_tab_notes_private', gesture: 'tap' },
},
{
id: 'me.tab.notes.collection',
from: [{ path: '/me', search: { tab: '*' } }],
to: '/me',
search: { tab: 'notes', sub: 'collection', menu: null, modal: null },
searchParams: {},
mode: 'replace',
params: {},
label: '切换我页-笔记-合集',
ui: { placement: 'content', icon: 'me_tab_notes_collection', gesture: 'tap' },
},
{
id: 'me.tab.collects',
from: [{ path: '/me', search: { tab: '*' } }],
to: '/me',
search: { tab: 'collects', sub: null, menu: null, modal: null },
searchParams: {},
mode: 'replace',
params: {},
label: '切换我页-收藏',
ui: { placement: 'content', icon: 'me_tab_collects', gesture: 'tap' },
},
{
id: 'me.tab.likes',
from: [{ path: '/me', search: { tab: '*' } }],
to: '/me',
search: { tab: 'likes', sub: null, menu: null, modal: null },
searchParams: {},
mode: 'replace',
params: {},
label: '切换我页-赞过',
ui: { placement: 'content', icon: 'me_tab_likes', gesture: 'tap' },
},
{
id: 'me.tab.comments',
from: [{ path: '/me', search: { tab: '*' } }],
to: '/me',
search: { tab: 'comments', sub: null, menu: null, modal: null },
searchParams: {},
mode: 'replace',
params: {},
label: '切换我页-评论',
ui: { placement: 'content', icon: 'me_tab_comments', gesture: 'tap' },
},
{
id: 'home.drawer.open',
// 覆盖层打开时,顶部菜单入口不可点
from: [{ path: '/', search: { tab: '*', modal: null, menu: null } }],
to: '/',
search: { menu: 'drawer' },
searchParams: {},
preserveParams: ['tab'],
mode: 'push',
params: {},
label: '打开侧边抽屉(首页)',
ui: { placement: 'topbar', icon: 'drawer', gesture: 'tap' },
},
{
id: 'me.drawer.open',
from: [{ path: '/me', search: { tab: '*' } }],
to: '/me',
search: { menu: 'drawer' },
searchParams: {},
preserveParams: ['tab', 'sub'],
mode: 'push',
params: {},
label: '打开侧边抽屉(我)',
ui: { placement: 'topbar', icon: 'drawer', gesture: 'tap' },
},
{
id: 'followList.open',
from: [{ path: '/me', search: { tab: '*' } }],
to: '/user/allUser',
search: {},
searchParams: { type: 'string' },
mode: 'push',
params: {},
label: '打开关注/粉丝列表',
ui: { placement: 'content', icon: 'follow_list', gesture: 'tap' },
},
{
id: 'editProfile.open',
from: [{ path: '/me', search: { tab: '*' } }, '/user/:userId'],
to: '/edit-profile',
search: {},
searchParams: {},
mode: 'push',
params: {},
label: '打开编辑资料',
ui: { placement: 'content', icon: 'edit_profile', gesture: 'tap' },
},
{
id: 'history.open',
from: [{ path: '/me', search: { tab: '*' } }],
to: '/history',
search: {},
searchParams: {},
mode: 'push',
params: {},
label: '打开浏览记录',
ui: { placement: 'content', icon: 'history', gesture: 'tap' },
},
{
id: 'history.open.fromDrawer',
from: [
{ path: '/me', search: { tab: 'notes', sub: 'public', menu: 'drawer' } },
{ path: '/me', search: { tab: 'notes', sub: 'private', menu: 'drawer' } },
{ path: '/me', search: { tab: 'notes', sub: 'collection', menu: 'drawer' } },
{ path: '/me', search: { tab: 'collects', menu: 'drawer' } },
{ path: '/me', search: { tab: 'likes', menu: 'drawer' } },
{ path: '/me', search: { tab: 'comments', menu: 'drawer' } },
{ path: '/', search: { tab: 'discover', menu: 'drawer' } },
{ path: '/', search: { tab: 'follow', menu: 'drawer' } },
{ path: '/', search: { tab: 'city', menu: 'drawer' } },
],
to: '/history',
search: {},
searchParams: {},
mode: 'replace',
params: {},
label: '从侧边抽屉打开浏览记录',
ui: { placement: 'content', icon: 'history', gesture: 'tap' },
},
{
id: 'addFriend.open.fromDrawer',
from: [
{ path: '/me', search: { tab: 'notes', sub: 'public', menu: 'drawer' } },
{ path: '/me', search: { tab: 'notes', sub: 'private', menu: 'drawer' } },
{ path: '/me', search: { tab: 'notes', sub: 'collection', menu: 'drawer' } },
{ path: '/me', search: { tab: 'collects', menu: 'drawer' } },
{ path: '/me', search: { tab: 'likes', menu: 'drawer' } },
{ path: '/me', search: { tab: 'comments', menu: 'drawer' } },
{ path: '/', search: { tab: 'discover', menu: 'drawer' } },
{ path: '/', search: { tab: 'follow', menu: 'drawer' } },
{ path: '/', search: { tab: 'city', menu: 'drawer' } },
],
to: '/addfriend',
search: {},
searchParams: {},
mode: 'replace',
params: {},
label: '从侧边抽屉打开添加好友',
ui: { placement: 'content', icon: 'add_friend', gesture: 'tap' },
},
// =========================
// 设置页入口
// =========================
{
id: 'settings.open',
from: [{ path: '/me', search: { tab: '*' } }],
to: '/settings',
search: {},
searchParams: {},
mode: 'push',
params: {},
label: '打开设置',
ui: { placement: 'content', icon: 'settings', gesture: 'tap' },
},
{
id: 'settings.open.fromDrawer',
from: [
{ path: '/me', search: { tab: 'notes', sub: 'public', menu: 'drawer' } },
{ path: '/me', search: { tab: 'notes', sub: 'private', menu: 'drawer' } },
{ path: '/me', search: { tab: 'notes', sub: 'collection', menu: 'drawer' } },
{ path: '/me', search: { tab: 'collects', menu: 'drawer' } },
{ path: '/me', search: { tab: 'likes', menu: 'drawer' } },
{ path: '/me', search: { tab: 'comments', menu: 'drawer' } },
{ path: '/', search: { tab: 'discover', menu: 'drawer' } },
{ path: '/', search: { tab: 'follow', menu: 'drawer' } },
{ path: '/', search: { tab: 'city', menu: 'drawer' } },
],
to: '/settings',
search: {},
searchParams: {},
mode: 'replace',
params: {},
label: '从侧边抽屉打开设置',
ui: { placement: 'content', icon: 'settings', gesture: 'tap' },
},
{
id: 'settings.open.fromAddFriend',
from: ['/addfriend'],
to: '/settings',
search: {},
searchParams: {},
mode: 'push',
params: {},
label: '从添加好友页打开设置',
ui: { placement: 'topbar', icon: 'settings', gesture: 'tap' },
},
{
id: 'settings.logout',
from: ['/settings'],
to: '/',
search: { tab: 'discover' },
searchParams: {},
mode: 'replace',
params: {},
label: '退出登录并返回首页',
ui: { placement: 'content', icon: 'logout', gesture: 'tap' },
},
{
id: 'settings.account.open',
from: ['/settings'],
to: '/settings/account',
search: {},
searchParams: {},
mode: 'push',
params: {},
label: '打开账号与安全',
ui: { placement: 'content', icon: 'settings_account', gesture: 'tap' },
},
{
id: 'settings.storage.open',
from: ['/settings'],
to: '/settings/storage',
search: {},
searchParams: {},
mode: 'push',
params: {},
label: '打开存储空间',
ui: { placement: 'content', icon: 'settings_storage', gesture: 'tap' },
},
{
id: 'settings.general.open',
from: ['/settings'],
to: '/settings/general',
search: {},
searchParams: {},
mode: 'push',
params: {},
label: '打开通用设置',
ui: { placement: 'content', icon: 'settings_general', gesture: 'tap' },
},
{
id: 'settings.notification.open',
from: ['/settings'],
to: '/settings/notification',
search: {},
searchParams: {},
mode: 'push',
params: {},
label: '打开通知设置',
ui: { placement: 'content', icon: 'settings_notification', gesture: 'tap' },
},
{
id: 'settings.language.open',
from: ['/settings'],
to: '/settings/language',
search: {},
searchParams: {},
mode: 'push',
params: {},
label: '打开多语言和翻译',
ui: { placement: 'content', icon: 'settings_language', gesture: 'tap' },
},
{
id: 'settings.privacy.open',
from: ['/settings'],
to: '/settings/privacy',
search: {},
searchParams: {},
mode: 'push',
params: {},
label: '打开隐私设置',
ui: { placement: 'content', icon: 'settings_privacy', gesture: 'tap' },
},
{
id: 'settings.notification.private.open',
from: ['/settings/notification'],
to: '/settings/notification/private',
search: {},
searchParams: {},
mode: 'push',
params: {},
label: '打开私信通知设置',
ui: { placement: 'content', icon: 'settings_notification_private', gesture: 'tap' },
},
{
id: 'settings.notification.follow.open',
from: ['/settings/notification'],
to: '/settings/notification/follow',
search: {},
searchParams: {},
mode: 'push',
params: {},
label: '打开关注作者的更新提醒',
ui: { placement: 'content', icon: 'settings_notification_follow', gesture: 'tap' },
},
{
id: 'settings.notification.live.open',
from: ['/settings/notification'],
to: '/settings/notification/live',
search: {},
searchParams: {},
mode: 'push',
params: {},
label: '打开开播提醒设置',
ui: { placement: 'content', icon: 'settings_notification_live', gesture: 'tap' },
},
{
id: 'settings.notification.content.open',
from: ['/settings/notification'],
to: '/settings/notification/content',
search: {},
searchParams: {},
mode: 'push',
params: {},
label: '打开内容推荐设置',
ui: { placement: 'content', icon: 'settings_notification_content', gesture: 'tap' },
},
{
id: 'settings.notification.user.open',
from: ['/settings/notification'],
to: '/settings/notification/user',
search: {},
searchParams: {},
mode: 'push',
params: {},
label: '打开用户推荐设置',
ui: { placement: 'content', icon: 'settings_notification_user', gesture: 'tap' },
},
{
id: 'settings.notification.other.open',
from: ['/settings/notification'],
to: '/settings/notification/other',
search: {},
searchParams: {},
mode: 'push',
params: {},
label: '打开其他通知设置',
ui: { placement: 'content', icon: 'settings_notification_other', gesture: 'tap' },
},
{
id: 'settings.notification.banner.open',
from: ['/settings/notification'],
to: '/settings/notification/banner',
search: {},
searchParams: {},
mode: 'push',
params: {},
label: '打开 App 内通知横幅设置',
ui: { placement: 'content', icon: 'settings_notification_banner', gesture: 'tap' },
},
{
id: 'settings.privacy.onlineStatus.open',
from: ['/settings/privacy'],
to: '/settings/privacy/online-status',
search: {},
searchParams: {},
mode: 'push',
params: {},
label: '打开在线状态设置',
ui: { placement: 'content', icon: 'settings_privacy_online_status', gesture: 'tap' },
},
{
id: 'settings.privacy.messagePermission.open',
from: ['/settings/privacy'],
to: '/settings/privacy/message-permission',
search: {},
searchParams: {},
mode: 'push',
params: {},
label: '打开谁可以私信我',
ui: { placement: 'content', icon: 'settings_privacy_message_permission', gesture: 'tap' },
},
{
id: 'settings.privacy.collect.open',
from: ['/settings/privacy'],
to: '/settings/privacy/collect',
search: {},
searchParams: {},
mode: 'push',
params: {},
label: '打开我的收藏公开设置',
ui: { placement: 'content', icon: 'settings_privacy_collect', gesture: 'tap' },
},
{
id: 'settings.privacy.comment.open',
from: ['/settings/privacy'],
to: '/settings/privacy/comment',
search: {},
searchParams: {},
mode: 'push',
params: {},
label: '打开我的评价公开设置',
ui: { placement: 'content', icon: 'settings_privacy_comment', gesture: 'tap' },
},
{
id: 'settings.privacy.findMe.open',
from: ['/settings/privacy'],
to: '/settings/privacy/find-me',
search: {},
searchParams: {},
mode: 'push',
params: {},
label: '打开找到我的方式',
ui: { placement: 'content', icon: 'settings_privacy_find_me', gesture: 'tap' },
},
{
id: 'settings.privacy.followList.open',
from: ['/settings/privacy'],
to: '/settings/privacy/follow-list',
search: {},
searchParams: {},
mode: 'push',
params: {},
label: '打开关注与粉丝列表隐私',
ui: { placement: 'content', icon: 'settings_privacy_follow_list', gesture: 'tap' },
},
{
id: 'settings.privacy.systemPermission.open',
from: ['/settings/privacy'],
to: '/settings/privacy/system-permission',
search: {},
searchParams: {},
mode: 'push',
params: {},
label: '打开系统权限管理',
ui: { placement: 'content', icon: 'settings_privacy_system_permission', gesture: 'tap' },
},
{
id: 'settings.privacy.personalization.open',
from: ['/settings/privacy'],
to: '/settings/privacy/personalization',
search: {},
searchParams: {},
mode: 'push',
params: {},
label: '打开个性化选项',
ui: { placement: 'content', icon: 'settings_privacy_personalization', gesture: 'tap' },
},
// =========================
// 发布链路(写文字)
// =========================
{
id: 'publish.text.open.fromSheet',
from: [
{ path: '/', search: { tab: 'discover', modal: 'publish' } },
{ path: '/', search: { tab: 'follow', modal: 'publish' } },
{ path: '/', search: { tab: 'city', modal: 'publish' } },
{ path: '/market', search: { modal: 'publish' } },
{ path: '/message', search: { modal: 'publish' } },
{ path: '/me', search: { tab: 'notes', sub: 'public', modal: 'publish' } },
{ path: '/me', search: { tab: 'notes', sub: 'private', modal: 'publish' } },
{ path: '/me', search: { tab: 'notes', sub: 'collection', modal: 'publish' } },
{ path: '/me', search: { tab: 'collects', modal: 'publish' } },
{ path: '/me', search: { tab: 'likes', modal: 'publish' } },
{ path: '/me', search: { tab: 'comments', modal: 'publish' } },
],
to: '/publish/text',
search: {},
searchParams: {},
mode: 'replace',
params: {},
label: '从发布面板进入写文字',
ui: { placement: 'content', icon: 'publish_text', gesture: 'tap' },
},
{
id: 'publish.text.template.open',
from: ['/publish/text'],
to: '/publish/text/template',
search: {},
searchParams: {},
mode: 'push',
params: {},
label: '进入模板选择',
ui: { placement: 'topbar', icon: 'publish_template', gesture: 'tap' },
},
{
id: 'publish.text.final.open',
from: ['/publish/text/template'],
to: '/publish/text/final',
search: {},
searchParams: {},
mode: 'push',
params: {},
label: '进入发布确认',
ui: { placement: 'topbar', icon: 'publish_final', gesture: 'tap' },
},
{
id: 'publish.text.finish',
from: ['/publish/text/final'],
to: '/',
search: { tab: 'discover' },
searchParams: {},
mode: 'replace',
params: {},
label: '发布完成并返回首页',
ui: { placement: 'content', icon: 'publish_submit', gesture: 'tap' },
},
],
capabilities: {
historyBack: true,
},
} as const satisfies NavigationDeclaration;
export type TransitionId = (typeof NAVIGATION_DECLARATION.transitions)[number]['id'];