|
|
|
@ -9,12 +9,16 @@ import { PersonalConverse } from './Converse';
|
|
|
|
|
import { FriendPanel } from './Friends';
|
|
|
|
|
import { PluginsPanel } from './Plugins';
|
|
|
|
|
import { PersonalSidebar } from './Sidebar';
|
|
|
|
|
import { useGlobalConfigStore } from 'tailchat-shared';
|
|
|
|
|
|
|
|
|
|
export const Personal: React.FC = React.memo(() => {
|
|
|
|
|
const [lastVisitPanelUrl, setLastVisitPanelUrl] = useUserSessionPreference(
|
|
|
|
|
'personLastVisitPanelUrl'
|
|
|
|
|
);
|
|
|
|
|
const location = useLocation();
|
|
|
|
|
const disablePluginStore = useGlobalConfigStore(
|
|
|
|
|
(state) => state.disablePluginStore
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
setLastVisitPanelUrl(location.pathname);
|
|
|
|
@ -24,7 +28,9 @@ export const Personal: React.FC = React.memo(() => {
|
|
|
|
|
<PageContent data-tc-role="content-personal" sidebar={<PersonalSidebar />}>
|
|
|
|
|
<Routes>
|
|
|
|
|
<Route path="/friends" element={<FriendPanel />} />
|
|
|
|
|
<Route path="/plugins" element={<PluginsPanel />} />
|
|
|
|
|
{!disablePluginStore && (
|
|
|
|
|
<Route path="/plugins" element={<PluginsPanel />} />
|
|
|
|
|
)}
|
|
|
|
|
<Route path="/converse/:converseId" element={<PersonalConverse />} />
|
|
|
|
|
{pluginCustomPanel
|
|
|
|
|
.filter((p) => p.position === 'personal')
|
|
|
|
|