|
|
|
@ -4,7 +4,6 @@ import * as React from 'react';
|
|
|
|
|
import { app } from '../../ApplicationServices/Application';
|
|
|
|
|
import { SignUrl } from '../../Common/HostUrl';
|
|
|
|
|
import { Post, RequestStatus } from '../../Common/Request';
|
|
|
|
|
import { StoreageKeys } from "../../Common/StoreageKeys";
|
|
|
|
|
import { FileServer } from '../../DatabaseServices/FileServer';
|
|
|
|
|
import { commandMachine } from '../../Editor/CommandMachine';
|
|
|
|
|
import { CommandState } from '../../Editor/CommandState';
|
|
|
|
@ -14,10 +13,8 @@ import { TopPanelStore } from '../Store/TopPanelStore';
|
|
|
|
|
import { SettingPanel } from './SettingPanel/SettingPanel';
|
|
|
|
|
import SoucePanel from './SourceManage/SoucePanel';
|
|
|
|
|
import { AppToaster } from './Toaster';
|
|
|
|
|
import { RemoveCustonCommand } from '../../Editor/CommandRegister';
|
|
|
|
|
import { CommandNames } from '../../Common/CommandNames';
|
|
|
|
|
import { appCache } from '../../Common/AppCache';
|
|
|
|
|
import { templateTagCommand } from '../../Add-on/Template/TemplateTagCommand';
|
|
|
|
|
import { userConfigStore } from '../Store/UserConfigStore';
|
|
|
|
|
|
|
|
|
|
interface TopPanelState
|
|
|
|
|
{
|
|
|
|
@ -77,11 +74,7 @@ export class TopPanel extends React.Component<{ store?: TopPanelStore; }, {}>
|
|
|
|
|
let data = await Post(SignUrl.loginOut);
|
|
|
|
|
if (data.err_code === RequestStatus.Ok)
|
|
|
|
|
{
|
|
|
|
|
RemoveCustonCommand();
|
|
|
|
|
localStorage.removeItem(StoreageKeys.IsLogin);
|
|
|
|
|
templateTagCommand.ClearTagList();
|
|
|
|
|
appCache.clear();
|
|
|
|
|
app.WebSocket.Close();
|
|
|
|
|
userConfigStore.ClearUserData();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
render()
|
|
|
|
|