|
|
@ -1,5 +1,5 @@
|
|
|
|
import { Alignment, Button, Classes, HTMLSelect, Intent, Navbar, Position, ProgressBar, Switch, Tooltip } from '@blueprintjs/core';
|
|
|
|
import { Alignment, Button, Classes, HTMLSelect, Intent, Navbar, Position, ProgressBar, Switch, Tooltip } from '@blueprintjs/core';
|
|
|
|
import { observable } from 'mobx';
|
|
|
|
import { action, observable } from 'mobx';
|
|
|
|
import { inject, observer } from 'mobx-react';
|
|
|
|
import { inject, observer } from 'mobx-react';
|
|
|
|
import * as React from 'react';
|
|
|
|
import * as React from 'react';
|
|
|
|
import { end } from 'xaop';
|
|
|
|
import { end } from 'xaop';
|
|
|
@ -91,6 +91,7 @@ export class TopPanel extends React.Component<{ store?: TopPanelStore; }, {}>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.props.store.onToggleTheme();
|
|
|
|
this.props.store.onToggleTheme();
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
@action
|
|
|
|
handleLoginOut = async () =>
|
|
|
|
handleLoginOut = async () =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!app.Saved)
|
|
|
|
if (!app.Saved)
|
|
|
@ -98,13 +99,17 @@ export class TopPanel extends React.Component<{ store?: TopPanelStore; }, {}>
|
|
|
|
let status = await AppConfirm.show({ message: "您当前图纸还未保存,是否继续?" });
|
|
|
|
let status = await AppConfirm.show({ message: "您当前图纸还未保存,是否继续?" });
|
|
|
|
if (!status) return;
|
|
|
|
if (!status) return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.props.store.isLogin = false;
|
|
|
|
|
|
|
|
let data = await Post(SignUrl.loginOut);
|
|
|
|
let data = await Post(SignUrl.loginOut);
|
|
|
|
if (data.err_code === RequestStatus.Ok)
|
|
|
|
if (data.err_code === RequestStatus.Ok)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
DownPanelStore.GetInstance().isLayout = false;
|
|
|
|
DownPanelStore.GetInstance().isLayout = false;
|
|
|
|
userConfigStore.ClearUserData();
|
|
|
|
userConfigStore.ClearUserData();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (IsOpenChat.get())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
IsOpenChat.set(false);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.props.store.isLogin = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
render()
|
|
|
|
render()
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -155,7 +160,7 @@ export class TopPanel extends React.Component<{ store?: TopPanelStore; }, {}>
|
|
|
|
onClick={() => window.open("https://jq.qq.com/?_wv=1027&k=GiGl8Vlp")}
|
|
|
|
onClick={() => window.open("https://jq.qq.com/?_wv=1027&k=GiGl8Vlp")}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
<ChatButton />
|
|
|
|
{this.props.store.isLogin && <ChatButton />}
|
|
|
|
{
|
|
|
|
{
|
|
|
|
IsOpenChat.get() && <Button
|
|
|
|
IsOpenChat.get() && <Button
|
|
|
|
className={"TopPanel_Btn04"}
|
|
|
|
className={"TopPanel_Btn04"}
|
|
|
|