聊天窗口头部的头像和昵称此前只是静态展示,只有右侧"i"图标能展开 详情栏;现在点击头像或名称同样会触发 onToggleDetail,单聊群聊均 生效。 按产品决定移除设置里的"关于 MeetingIM"页面(桌面目录、移动端"我的" 二级设置列表两处入口一并去掉),该页面唯一内容是版本号和一个后端 本就不支持 platform=web 的检查更新按钮,删除后 AboutPage.tsx 和 仅被它使用的 lib/api/app.ts 一并清理为死代码。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
105 lines
5.0 KiB
TypeScript
105 lines
5.0 KiB
TypeScript
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
import { Navigate, createBrowserRouter, RouterProvider } from 'react-router-dom';
|
|
|
|
import { AppShell } from '@/app/AppShell';
|
|
import { RequireAuth } from '@/app/RequireAuth';
|
|
import { EnterpriseRegisterPage } from '@/features/auth/EnterpriseRegisterPage';
|
|
import { LoginPage } from '@/features/auth/LoginPage';
|
|
import { RegisterPage } from '@/features/auth/RegisterPage';
|
|
import { ResetPasswordPage } from '@/features/auth/ResetPasswordPage';
|
|
import { TenantEntryPage } from '@/features/auth/TenantEntryPage';
|
|
import { TenantFeedbackPage } from '@/features/auth/TenantFeedbackPage';
|
|
import { CallHistoryView } from '@/features/calls/CallHistoryView';
|
|
import { BlocklistView } from '@/features/contacts/BlocklistView';
|
|
import { ContactsLayout } from '@/features/contacts/ContactsLayout';
|
|
import { EmptyContactsMain } from '@/features/contacts/EmptyContactsMain';
|
|
import { FriendProfileView } from '@/features/contacts/FriendProfileView';
|
|
import { GroupListView } from '@/features/contacts/GroupListView';
|
|
import { NewFriendsView } from '@/features/contacts/NewFriendsView';
|
|
import { FavoritesLayout } from '@/features/favorites/FavoritesLayout';
|
|
import { ConversationView } from '@/features/messages/ConversationView';
|
|
import { EmptyMain } from '@/features/messages/EmptyMain';
|
|
import { MessagesLayout } from '@/features/messages/MessagesLayout';
|
|
import { GeneralSettingsPage } from '@/features/settings/GeneralSettingsPage';
|
|
import { NotificationsSettingsPage } from '@/features/settings/NotificationsSettingsPage';
|
|
import { PrivacySettingsPage } from '@/features/settings/PrivacySettingsPage';
|
|
import { ProfileSettingsPage } from '@/features/settings/ProfileSettingsPage';
|
|
import { SecuritySettingsPage } from '@/features/settings/SecuritySettingsPage';
|
|
import { SettingsHome } from '@/features/settings/SettingsHome';
|
|
import { SettingsLayout } from '@/features/settings/SettingsLayout';
|
|
import { SystemMessagesView } from '@/features/system/SystemMessagesView';
|
|
|
|
const queryClient = new QueryClient();
|
|
|
|
const router = createBrowserRouter([
|
|
{ path: 'tenant', element: <TenantEntryPage /> },
|
|
{ path: 'login', element: <LoginPage /> },
|
|
{ path: 'register', element: <RegisterPage /> },
|
|
{ path: 'reset-password', element: <ResetPasswordPage /> },
|
|
{ path: 'enterprise-register', element: <EnterpriseRegisterPage /> },
|
|
{ path: 'feedback', element: <TenantFeedbackPage /> },
|
|
{
|
|
element: <RequireAuth />,
|
|
children: [
|
|
{
|
|
element: <AppShell />,
|
|
children: [
|
|
{ index: true, element: <Navigate to="/messages" replace /> },
|
|
{
|
|
path: 'messages',
|
|
element: <MessagesLayout />,
|
|
children: [
|
|
{ index: true, element: <EmptyMain /> },
|
|
{ path: 'system', element: <SystemMessagesView /> },
|
|
{ path: ':topicId', element: <ConversationView /> },
|
|
],
|
|
},
|
|
{
|
|
path: 'contacts',
|
|
element: <ContactsLayout />,
|
|
children: [
|
|
{ index: true, element: <EmptyContactsMain /> },
|
|
{ path: 'requests', element: <NewFriendsView /> },
|
|
{ path: 'groups', element: <GroupListView /> },
|
|
{ path: 'blocklist', element: <BlocklistView /> },
|
|
{ path: ':userId', element: <FriendProfileView /> },
|
|
],
|
|
},
|
|
{ path: 'favorites', element: <FavoritesLayout /> },
|
|
// README §9.2's dedicated file-assistant browser (categories, storage quota, upload
|
|
// progress) has NO backing REST API at all (confirmed via a research pass -- the design
|
|
// spec's own state-management notes admit reuse of existing APIs, i.e. reading the `slf`
|
|
// topic's messages, same as any other conversation) -- redirecting into the real
|
|
// conversation on that topic is honest; a fake quota card with invented numbers isn't.
|
|
{ path: 'files', element: <Navigate to="/messages/slf" replace /> },
|
|
{ path: 'calls', element: <CallHistoryView /> },
|
|
{
|
|
path: 'settings',
|
|
element: <SettingsLayout />,
|
|
children: [
|
|
{ index: true, element: <SettingsHome /> },
|
|
{ path: 'profile', element: <ProfileSettingsPage /> },
|
|
{ path: 'security', element: <SecuritySettingsPage /> },
|
|
{ path: 'notifications', element: <NotificationsSettingsPage /> },
|
|
{ path: 'privacy', element: <PrivacySettingsPage /> },
|
|
{ path: 'general', element: <GeneralSettingsPage /> },
|
|
],
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
// A stale bookmark/link to a route renamed during this redesign should land somewhere the app
|
|
// itself resolves (tenant/login/messages, per RequireAuth's own gating), not React Router's
|
|
// generic unstyled default error boundary.
|
|
{ path: '*', element: <Navigate to="/" replace /> },
|
|
]);
|
|
|
|
export default function App() {
|
|
return (
|
|
<QueryClientProvider client={queryClient}>
|
|
<RouterProvider router={router} />
|
|
</QueryClientProvider>
|
|
);
|
|
}
|