|
|
|
@ -8,14 +8,18 @@ import { CompareIsEqual } from "../../../Add-on/BoardFindModify";
|
|
|
|
|
import { CustomNumContainer, CustomNumberItem } from "../../../Add-on/CustomNumber/CustomNumContainer";
|
|
|
|
|
import { CustomNumberStore } from "../../../Add-on/CustomNumber/CustomNumberPanel";
|
|
|
|
|
import { templateTagCommand } from "../../../Add-on/Template/TemplateTagCommand";
|
|
|
|
|
import { ConfigUrls } from "../../../Common/HostUrl";
|
|
|
|
|
import { KeyBoard } from "../../../Common/KeyEnum";
|
|
|
|
|
import { PostJson } from "../../../Common/Request";
|
|
|
|
|
import { commandReg } from "../../../Common/Utils";
|
|
|
|
|
import { CommandServer } from "../../../DatabaseServices/CommandServer";
|
|
|
|
|
import { userConfig } from "../../../Editor/UserConfig";
|
|
|
|
|
import { ECompareType } from "../../Store/BoardFindInterface";
|
|
|
|
|
import { IConfigStore } from "../../Store/BoardStore";
|
|
|
|
|
import { configListMapStore } from "../../Store/ConfigListMapStore";
|
|
|
|
|
import { userConfigStore } from "../../Store/UserConfigStore";
|
|
|
|
|
import { CommandList } from "../CommandPanel/CommandList";
|
|
|
|
|
import { AppConfirm } from "../Common/Confirm";
|
|
|
|
|
import { AppToaster } from "../Toaster";
|
|
|
|
|
import { BoardModalType } from "./BoardModalType";
|
|
|
|
|
import { TabContainer } from "./ConfigListTabContainer";
|
|
|
|
@ -199,6 +203,20 @@ export class ConfigList extends React.Component<IConfigListProps>
|
|
|
|
|
/>
|
|
|
|
|
}
|
|
|
|
|
/>
|
|
|
|
|
{
|
|
|
|
|
!userConfig.isMaster &&
|
|
|
|
|
<div style={{ marginLeft: 2 }}>
|
|
|
|
|
<Tooltip
|
|
|
|
|
content={"同步主账号配置"}
|
|
|
|
|
position={Position.TOP}
|
|
|
|
|
>
|
|
|
|
|
<Button
|
|
|
|
|
icon={"swap-vertical"}
|
|
|
|
|
small
|
|
|
|
|
onClick={this.SyncMasterConfig}
|
|
|
|
|
/>
|
|
|
|
|
</Tooltip>
|
|
|
|
|
</div>}
|
|
|
|
|
</label>
|
|
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
@ -253,16 +271,18 @@ export class ConfigList extends React.Component<IConfigListProps>
|
|
|
|
|
<div className='config-list'>
|
|
|
|
|
<div className="flex-between">
|
|
|
|
|
<h4 className="bp3-heading">{`${this.isShowCoustomNumList.get() ? "列表排序" : "配置列表"}`}</h4>
|
|
|
|
|
<input
|
|
|
|
|
tabIndex={1}
|
|
|
|
|
className="bp3-input"
|
|
|
|
|
style={{ width: 80, height: 24 }}
|
|
|
|
|
placeholder="搜索..."
|
|
|
|
|
onChange={(e) =>
|
|
|
|
|
{
|
|
|
|
|
this.searchName = e.currentTarget.value.trim();
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
<div style={{ flex: 1, height: 24, margin: "0 2px" }}>
|
|
|
|
|
<input
|
|
|
|
|
tabIndex={1}
|
|
|
|
|
className="bp3-input"
|
|
|
|
|
style={{ width: "100%", height: "100%" }}
|
|
|
|
|
placeholder="搜索..."
|
|
|
|
|
onChange={(e) =>
|
|
|
|
|
{
|
|
|
|
|
this.searchName = e.currentTarget.value.trim();
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<Tooltip
|
|
|
|
|
content={"自定义排序"}
|
|
|
|
|
position={Position.TOP}
|
|
|
|
@ -275,6 +295,18 @@ export class ConfigList extends React.Component<IConfigListProps>
|
|
|
|
|
onClick={() => { this.isShowCoustomNumList.set(true); }}
|
|
|
|
|
/>
|
|
|
|
|
</Tooltip>
|
|
|
|
|
{
|
|
|
|
|
!userConfig.isMaster &&
|
|
|
|
|
<Tooltip
|
|
|
|
|
content={"同步主账号配置"}
|
|
|
|
|
position={Position.TOP}
|
|
|
|
|
>
|
|
|
|
|
<Button
|
|
|
|
|
icon={"swap-vertical"}
|
|
|
|
|
small
|
|
|
|
|
onClick={this.SyncMasterConfig}
|
|
|
|
|
/>
|
|
|
|
|
</Tooltip>}
|
|
|
|
|
</div>
|
|
|
|
|
{
|
|
|
|
|
this.isShowCoustomNumList.get() ?
|
|
|
|
@ -342,6 +374,19 @@ export class ConfigList extends React.Component<IConfigListProps>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
SyncMasterConfig = async () =>
|
|
|
|
|
{
|
|
|
|
|
let isSync = await AppConfirm.show({ message: "是否同步成主账号的配置?", intent: Intent.PRIMARY });
|
|
|
|
|
if (isSync)
|
|
|
|
|
{
|
|
|
|
|
const { type, store } = this.props;
|
|
|
|
|
if (store.configsNames.length > 0)
|
|
|
|
|
await PostJson(ConfigUrls.Edit, { key: type, sys_init: false, value: {} });
|
|
|
|
|
|
|
|
|
|
await userConfigStore.SubAccountInitSaveConfig(type, store);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
renderCustomNumList = () =>
|
|
|
|
|
{
|
|
|
|
|
const { store, type } = this.props;
|
|
|
|
|