Unverified Commit eb6136bd authored by zhu-mingye's avatar zhu-mingye Committed by GitHub

Fix gitbuild cannot close (#2525)

* Spotless Apply * fix git build model can not close * Spotless Apply * fix git & resource --------- Co-authored-by: 's avatarzhu-mingye <zhu-mingye@users.noreply.github.com>
parent 65137b54
......@@ -66,7 +66,7 @@ public class GetJarsStepSse extends StepSse {
GitProject gitProject = (GitProject) params.get("gitProject");
ResourcesService resourcesService = SpringUtil.getBean(ResourcesService.class);
TreeNodeDTO gitFolder = resourcesService.createFolderOrGet(0, "git", "");
TreeNodeDTO gitFolder = resourcesService.createFolderOrGet(1, "git", "");
TreeNodeDTO treeNodeDTO =
resourcesService.createFolderOrGet(Convert.toInt(gitFolder.getId()), gitProject.getName(), "");
return jars.stream()
......
......@@ -64,7 +64,7 @@ public class PythonZipStepSse extends StepSse {
private String uploadResources(File zipFile, GitProject gitProject) {
ResourcesService resourcesService = SpringUtil.getBean(ResourcesService.class);
TreeNodeDTO gitFolder = resourcesService.createFolderOrGet(0, "git", "");
TreeNodeDTO gitFolder = resourcesService.createFolderOrGet(1, "git", "");
TreeNodeDTO treeNodeDTO =
resourcesService.createFolderOrGet(Convert.toInt(gitFolder.getId()), gitProject.getName(), "");
resourcesService.uploadFile(Convert.toInt(treeNodeDTO.getId()), "", zipFile);
......
......@@ -190,8 +190,8 @@ export const buildAllSuggestionsToEditor = (
range: range,
kind: mappingKind(item.kind),
insertText: item.insertText,
insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet
// detail: item?.detail,
insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,
detail: item?.label?.description || ''
};
});
//todo: 补充补全建议 关键词建议
......
......@@ -127,16 +127,21 @@ const CodeEdit = (props: CodeEditFormProps & connect) => {
resolveCompletionItem: (item: CompletionItem) => {
return {
...item,
detail: item.detail ?? `-- ${item.detail}`
detail: item.detail
};
}
});
}
// editorInstance?.current?.onDidChangeModelContent?.(() => {
// console.log(editorInstance?.current, 'editorInstance')
// editorInstance?.current?.trigger('action', 'editor.action.triggerSuggest');
// });
/**
* editorDidMount
* @param {editor.IStandaloneCodeEditor} editor
* @param monaco
* @param monacoIns
*/
const editorDidMountChange = (editor: editor.IStandaloneCodeEditor, monacoIns: Monaco) => {
if (editorRef?.current && monacoRef?.current && editorDidMount) {
......@@ -214,6 +219,8 @@ const CodeEdit = (props: CodeEditFormProps & connect) => {
showFoldingControls: 'always', // 代码折叠控件 'always' | 'mouseover' | 'never'
automaticLayout: true, // 自动布局
readOnly, // 是否只读
glyphMargin: true, // 字形边缘
formatOnType: true, // 代码格式化
wrappingIndent:
language === 'yaml' || language === 'yml' || language === 'json' ? 'indent' : 'none',
inlineSuggest: {
......@@ -223,8 +230,8 @@ const CodeEdit = (props: CodeEditFormProps & connect) => {
allowQuickSuggestions: true,
showOnAllSymbols: true
},
inlineSuggestionVisible: true,
quickSuggestions: true,
// inlineSuggestionVisible: true,
quickSuggestions: enableSuggestions,
guides: {
bracketPairs: true
},
......@@ -234,12 +241,15 @@ const CodeEdit = (props: CodeEditFormProps & connect) => {
},
foldingRanges: true,
inlineCompletionsAccessibilityVerbose: true,
smartSelect: {
selectLeadingAndTrailingWhitespace: true,
selectSubwords: true
},
suggest: {
shareSuggestSelections: true,
quickSuggestions: true,
quickSuggestions: enableSuggestions,
showStatusBar: true,
preview: true,
previewMode: 'preview',
previewMode: 'subword',
showInlineDetails: true,
showMethods: true,
showFunctions: true,
......@@ -280,6 +290,11 @@ const CodeEdit = (props: CodeEditFormProps & connect) => {
<>
<div className={'monaco-float'}>
<Editor
beforeMount={(monaco: Monaco) => {
if (!monacoInstance?.current) {
monacoInstance.current = monaco;
}
}}
width={width}
height={height}
value={code}
......
......@@ -20,6 +20,7 @@
export default {
'button.create': 'Create',
'button.close': 'Close',
'button.daemon': 'Daemon Mode',
'button.confirm': 'Confirm',
'button.recovery': 'Recovery',
'button.cancel': 'Cancel',
......
......@@ -23,6 +23,7 @@ export default {
'button.create': '新建',
'button.recovery': '恢复',
'button.close': '关闭',
'button.daemon': '后台运行',
'button.confirm': '确定',
'button.cancel': '取消',
'button.finish': '完成',
......
......@@ -52,7 +52,7 @@ const JsonToSql: React.FC = (props: connect) => {
height={maxHeight + 'px'}
code={jsonData}
language={'json'}
onChange={(x:string) => {
onChange={(x: string) => {
setJsonData(x ?? '');
}}
/>
......
......@@ -17,223 +17,221 @@
*
*/
import {CircleBtn} from '@/components/CallBackButton/CircleBtn';
import { CircleBtn } from '@/components/CallBackButton/CircleBtn';
import Title from '@/components/Front/Title';
import ContentScroll from '@/components/Scroll/ContentScroll';
import MovableSidebar from '@/components/Sidebar/MovableSidebar';
import {StateType, STUDIO_MODEL, VIEW} from '@/pages/DataStudio/model';
import {LeftBottomMoreTabs, LeftBottomSide} from '@/pages/DataStudio/route';
import {l} from '@/utils/intl';
import {connect} from '@@/exports';
import {PlusOutlined} from '@ant-design/icons';
import {ConfigProvider, Space, Tabs} from 'antd';
import { StateType, STUDIO_MODEL, VIEW } from '@/pages/DataStudio/model';
import { LeftBottomMoreTabs, LeftBottomSide } from '@/pages/DataStudio/route';
import { l } from '@/utils/intl';
import { connect } from '@@/exports';
import { PlusOutlined } from '@ant-design/icons';
import { ConfigProvider, Space, Tabs } from 'antd';
import React from 'react';
export type BottomContainerProps = {
size: number;
height: number | string;
size: number;
height: number | string;
};
const BottomContainer: React.FC<BottomContainerProps> = (props: any) => {
const {dispatch, size, bottomContainer, height} = props;
const width = document.documentElement.clientWidth - VIEW.sideWidth * 2;
const { dispatch, size, bottomContainer, height } = props;
const width = document.documentElement.clientWidth - VIEW.sideWidth * 2;
/**
* 侧边栏最小化
*/
const handleMinimize = () => {
dispatch({
type: STUDIO_MODEL.updateSelectBottomKey,
payload: ''
});
};
/**
* 侧边栏最小化
*/
const handleMinimize = () => {
dispatch({
type: STUDIO_MODEL.updateSelectBottomKey,
payload: ''
});
};
/**
* 更新底部高度
* @param {number} height
*/
const updateBottomHeight = (height: number) => {
dispatch({
type: STUDIO_MODEL.updateBottomHeight,
payload: height
});
};
/**
* 更新底部高度
* @param {number} height
*/
const updateBottomHeight = (height: number) => {
dispatch({
type: STUDIO_MODEL.updateBottomHeight,
payload: height
});
};
/**
* 更新中间内容高度
* @param {number} height
*/
const updateCenterContentHeight = (height: number) => {
dispatch({
type: STUDIO_MODEL.updateCenterContentHeight,
payload: height
});
};
/**
* 更新中间内容高度
* @param {number} height
*/
const updateCenterContentHeight = (height: number) => {
dispatch({
type: STUDIO_MODEL.updateCenterContentHeight,
payload: height
});
};
const updateSelectBottomSubKey = (key: string) => {
dispatch({
type: STUDIO_MODEL.updateSelectBottomSubKey,
payload: key
});
};
const updateSelectBottomSubKey = (key: string) => {
dispatch({
type: STUDIO_MODEL.updateSelectBottomSubKey,
payload: key
});
};
/**
* 更新工具栏内容高度
* @param {number} height
*/
const updateToolContentHeight = (height: number) => {
dispatch({
type: STUDIO_MODEL.updateToolContentHeight,
payload: height
});
};
const getSubTabs = () => {
// @ts-ignore
return Object.values(
Object.keys(LeftBottomMoreTabs).map((x) =>
LeftBottomMoreTabs[x].map((y) => {
return {...y, key: x + '/' + y.key};
})
)
).flatMap((x) => x);
};
/**
* 更新工具栏内容高度
* @param {number} height
*/
const updateToolContentHeight = (height: number) => {
dispatch({
type: STUDIO_MODEL.updateToolContentHeight,
payload: height
});
};
const getSubTabs = () => {
// @ts-ignore
return Object.values(
Object.keys(LeftBottomMoreTabs).map((x) =>
LeftBottomMoreTabs[x].map((y) => {
return { ...y, key: x + '/' + y.key };
})
)
).flatMap((x) => x);
};
/**
* 拖动回调
* @param event
* @param direction
* @param {{offsetHeight: any}} elementRef
*/
const resizeCallback = (
event: any,
direction: any,
elementRef: {
offsetHeight: any;
}
) => {
const centerContentHeight =
document.documentElement.clientHeight -
VIEW.headerHeight -
VIEW.headerNavHeight -
VIEW.footerHeight -
VIEW.otherHeight -
elementRef.offsetHeight;
updateBottomHeight(elementRef.offsetHeight);
updateCenterContentHeight(centerContentHeight);
updateToolContentHeight(centerContentHeight - VIEW.leftMargin);
};
/**
* 拖动回调
* @param event
* @param direction
* @param {{offsetHeight: any}} elementRef
*/
const resizeCallback = (
event: any,
direction: any,
elementRef: {
offsetHeight: any;
}
) => {
const centerContentHeight =
document.documentElement.clientHeight -
VIEW.headerHeight -
VIEW.headerNavHeight -
VIEW.footerHeight -
VIEW.otherHeight -
elementRef.offsetHeight;
updateBottomHeight(elementRef.offsetHeight);
updateCenterContentHeight(centerContentHeight);
updateToolContentHeight(centerContentHeight - VIEW.leftMargin);
};
const renderTabPane = () => {
// @ts-ignore
const leftBottomMoreTab = LeftBottomMoreTabs[bottomContainer.selectKey];
if (leftBottomMoreTab) {
const items = leftBottomMoreTab.map((item: any) => {
return {
key: bottomContainer.selectKey + '/' + item.key,
label: (
<span>
const renderTabPane = () => {
// @ts-ignore
const leftBottomMoreTab = LeftBottomMoreTabs[bottomContainer.selectKey];
if (leftBottomMoreTab) {
const items = leftBottomMoreTab.map((item: any) => {
return {
key: bottomContainer.selectKey + '/' + item.key,
label: (
<span>
{item.icon}
{item.label}
{item.label}
</span>
)
};
});
return (
<Tabs
style={{height: '32px', display: '-webkit-box'}}
items={items}
type='card'
onChange={(key: string) => {
updateSelectBottomSubKey(key.split('/')[1]);
}}
activeKey={
bottomContainer.selectKey +
'/' +
bottomContainer.selectSubKey[bottomContainer.selectKey]
}
size='small'
tabPosition='top'
/>
);
}
return <></>;
};
const renderItems = () => {
return [
...LeftBottomSide.map((x) => {
return {...x, key: x.key + '/'};
}),
...getSubTabs()
].map((item) => {
return {
...item,
children: (
<ContentScroll height={props.height - VIEW.leftMargin}>
{item.children}
</ContentScroll>
)
};
});
};
)
};
});
return (
<Tabs
style={{ height: '32px', display: '-webkit-box' }}
items={items}
type='card'
onChange={(key: string) => {
updateSelectBottomSubKey(key.split('/')[1]);
}}
activeKey={
bottomContainer.selectKey +
'/' +
bottomContainer.selectSubKey[bottomContainer.selectKey]
}
size='small'
tabPosition='top'
/>
);
}
return <></>;
};
const renderItems = () => {
return [
...LeftBottomSide.map((x) => {
return { ...x, key: x.key + '/' };
}),
...getSubTabs()
].map((item) => {
return {
...item,
children: (
<ContentScroll height={props.height - VIEW.leftMargin}>{item.children}</ContentScroll>
)
};
});
};
return (
<MovableSidebar
title={
<ConfigProvider
theme={{
components: {
Tabs: {
horizontalMargin: '0',
cardPaddingSM: '6px',
horizontalItemPadding: '0'
}
}
}}
>
<Space>
<Title>{l(bottomContainer.selectKey)}</Title>
{renderTabPane()}
</Space>
</ConfigProvider>
return (
<MovableSidebar
title={
<ConfigProvider
theme={{
components: {
Tabs: {
horizontalMargin: '0',
cardPaddingSM: '6px',
horizontalItemPadding: '0'
}
}
visible={bottomContainer.selectKey}
style={{
zIndex: 999,
height: height,
marginTop: 0,
backgroundColor: '#fff',
position: 'fixed',
bottom: VIEW.footerHeight
}}
defaultSize={{width: '100%', height: height}}
minHeight={VIEW.midMargin}
maxHeight={size.contentHeight - 40}
onResize={(
event: any,
direction: any,
elementRef: {
offsetHeight: any;
}
) => resizeCallback(event, direction, elementRef)}
btnGroup={[<CircleBtn key={'max'} icon={<PlusOutlined/>}/>]}
enable={{top: true}}
handlerMinimize={handleMinimize}
maxWidth={width}
}}
>
<Tabs
activeKey={
bottomContainer.selectKey +
'/' +
(bottomContainer.selectSubKey[bottomContainer.selectKey]
? bottomContainer.selectSubKey[bottomContainer.selectKey]
: '')
}
items={renderItems()}
tabBarStyle={{display: 'none'}}
/>
</MovableSidebar>
);
<Space>
<Title>{l(bottomContainer.selectKey)}</Title>
{renderTabPane()}
</Space>
</ConfigProvider>
}
visible={bottomContainer.selectKey}
style={{
zIndex: 999,
height: height,
marginTop: 0,
backgroundColor: '#fff',
position: 'fixed',
bottom: VIEW.footerHeight
}}
defaultSize={{ width: '100%', height: height }}
minHeight={VIEW.midMargin}
maxHeight={size.contentHeight - 40}
onResize={(
event: any,
direction: any,
elementRef: {
offsetHeight: any;
}
) => resizeCallback(event, direction, elementRef)}
btnGroup={[<CircleBtn key={'max'} icon={<PlusOutlined />} />]}
enable={{ top: true }}
handlerMinimize={handleMinimize}
maxWidth={width}
>
<Tabs
activeKey={
bottomContainer.selectKey +
'/' +
(bottomContainer.selectSubKey[bottomContainer.selectKey]
? bottomContainer.selectSubKey[bottomContainer.selectKey]
: '')
}
items={renderItems()}
tabBarStyle={{ display: 'none' }}
/>
</MovableSidebar>
);
};
export default connect(({Studio}: { Studio: StateType }) => ({
bottomContainer: Studio.bottomContainer,
export default connect(({ Studio }: { Studio: StateType }) => ({
bottomContainer: Studio.bottomContainer
}))(BottomContainer);
......@@ -17,104 +17,104 @@
*
*/
import {CircleBtn, CircleDataStudioButtonProps} from '@/components/CallBackButton/CircleBtn';
import MovableSidebar, {MovableSidebarProps} from '@/components/Sidebar/MovableSidebar';
import { CircleBtn, CircleDataStudioButtonProps } from '@/components/CallBackButton/CircleBtn';
import MovableSidebar, { MovableSidebarProps } from '@/components/Sidebar/MovableSidebar';
import useThemeValue from '@/hooks/useThemeValue';
import ProjectTitle from '@/pages/DataStudio/LeftContainer/Project/ProjectTitle';
import {StateType, STUDIO_MODEL, VIEW} from '@/pages/DataStudio/model';
import {BtnRoute, LeftSide} from '@/pages/DataStudio/route';
import {connect} from '@@/exports';
import {Tabs} from 'antd';
import { StateType, STUDIO_MODEL, VIEW } from '@/pages/DataStudio/model';
import { BtnRoute, LeftSide } from '@/pages/DataStudio/route';
import { connect } from '@@/exports';
import { Tabs } from 'antd';
import React from 'react';
export type LeftContainerProps = {
size: number;
leftContainer: StateType['leftContainer'];
rightContainer: StateType['rightContainer'];
size: number;
leftContainer: StateType['leftContainer'];
rightContainer: StateType['rightContainer'];
};
const LeftContainer: React.FC<LeftContainerProps> = (props: any) => {
const {
dispatch,
size,
toolContentHeight,
leftContainer,
rightContainer,
tabs: {panes, activeKey}
} = props;
const themeValue = useThemeValue();
const MAX_WIDTH = size.width - 2 * VIEW.leftToolWidth - rightContainer.width - 700;
/**
* 侧边栏大小变化
* @param width
*/
const handleReSizeChange = (width: any) => {
dispatch({
type: STUDIO_MODEL.updateLeftWidth,
payload: width
});
};
const {
dispatch,
size,
toolContentHeight,
leftContainer,
rightContainer,
tabs: { panes, activeKey }
} = props;
const themeValue = useThemeValue();
const MAX_WIDTH = size.width - 2 * VIEW.leftToolWidth - rightContainer.width - 700;
/**
* 侧边栏大小变化
* @param width
*/
const handleReSizeChange = (width: any) => {
dispatch({
type: STUDIO_MODEL.updateLeftWidth,
payload: width
});
};
/**
* 侧边栏最小化
*/
const handleMinimize = () => {
dispatch({
type: STUDIO_MODEL.updateSelectLeftKey,
payload: ''
});
};
/**
* 侧边栏最小化
*/
const handleMinimize = () => {
dispatch({
type: STUDIO_MODEL.updateSelectLeftKey,
payload: ''
});
};
/**
* 侧边栏最大化
*/
const handleMaxsize = () => {
handleReSizeChange(MAX_WIDTH);
};
/**
* 侧边栏最大化
*/
const handleMaxsize = () => {
handleReSizeChange(MAX_WIDTH);
};
/**
* 侧边栏属性
* @type {{onResize: (event: any, direction: any, elementRef: {offsetWidth: any}) => void, visible: boolean, defaultSize: {width: any, height: any}, enable: {right: boolean}, minWidth: number, title: string, handlerMinimize: () => void, contentHeight: any, maxWidth: number}}
*/
const restMovableSidebarProps: MovableSidebarProps = {
contentHeight: toolContentHeight,
onResize: (event: any, direction: any, elementRef: { offsetWidth: any }) =>
handleReSizeChange(elementRef.offsetWidth),
title: <ProjectTitle/>,
handlerMinimize: () => handleMinimize(),
handlerMaxsize: handleMaxsize,
visible: leftContainer.selectKey !== '',
defaultSize: {width: leftContainer.width, height: leftContainer.height},
minWidth: 160,
maxWidth: MAX_WIDTH,
enable: {right: true},
btnGroup: BtnRoute[leftContainer.selectKey]
? BtnRoute[leftContainer.selectKey].map((item: CircleDataStudioButtonProps) => (
<CircleBtn
title={item.title}
icon={item.icon}
onClick={() => item.onClick?.(panes, activeKey)}
key={item.title}
/>
))
: [],
style: {borderInlineEnd: `1px solid ${themeValue.borderColor}`}
};
/**
* 侧边栏属性
* @type {{onResize: (event: any, direction: any, elementRef: {offsetWidth: any}) => void, visible: boolean, defaultSize: {width: any, height: any}, enable: {right: boolean}, minWidth: number, title: string, handlerMinimize: () => void, contentHeight: any, maxWidth: number}}
*/
const restMovableSidebarProps: MovableSidebarProps = {
contentHeight: toolContentHeight,
onResize: (event: any, direction: any, elementRef: { offsetWidth: any }) =>
handleReSizeChange(elementRef.offsetWidth),
title: <ProjectTitle />,
handlerMinimize: () => handleMinimize(),
handlerMaxsize: handleMaxsize,
visible: leftContainer.selectKey !== '',
defaultSize: { width: leftContainer.width, height: leftContainer.height },
minWidth: 160,
maxWidth: MAX_WIDTH,
enable: { right: true },
btnGroup: BtnRoute[leftContainer.selectKey]
? BtnRoute[leftContainer.selectKey].map((item: CircleDataStudioButtonProps) => (
<CircleBtn
title={item.title}
icon={item.icon}
onClick={() => item.onClick?.(panes, activeKey)}
key={item.title}
/>
))
: [],
style: { borderInlineEnd: `1px solid ${themeValue.borderColor}` }
};
const content = (
<Tabs activeKey={leftContainer.selectKey} items={LeftSide} tabBarStyle={{display: 'none'}}/>
);
const content = (
<Tabs activeKey={leftContainer.selectKey} items={LeftSide} tabBarStyle={{ display: 'none' }} />
);
return (
<MovableSidebar {...restMovableSidebarProps}>
{/*<Tabs activeKey={leftContainer.selectKey} items={LeftSide} tabBarStyle={{display: "none"}}/>*/}
{content}
</MovableSidebar>
);
return (
<MovableSidebar {...restMovableSidebarProps}>
{/*<Tabs activeKey={leftContainer.selectKey} items={LeftSide} tabBarStyle={{display: "none"}}/>*/}
{content}
</MovableSidebar>
);
};
export default connect(({Studio}: { Studio: StateType }) => ({
// leftContainer: Studio.leftContainer,
// rightContainer: Studio.rightContainer,
toolContentHeight: Studio.toolContentHeight,
tabs: Studio.tabs
export default connect(({ Studio }: { Studio: StateType }) => ({
// leftContainer: Studio.leftContainer,
// rightContainer: Studio.rightContainer,
toolContentHeight: Studio.toolContentHeight,
tabs: Studio.tabs
}))(LeftContainer);
......@@ -21,12 +21,12 @@ import {
DIFF_EDITOR_PARAMS,
PARAM_DIFF_TABLE_COL
} from '@/pages/DataStudio/MiddleContainer/Editor/constants';
import { convertCodeEditTheme } from '@/utils/function';
import { l } from '@/utils/intl';
import { DiffEditor } from '@monaco-editor/react';
import { Col, Modal, Row, Space, Table, Tabs, Typography } from 'antd';
import React from 'react';
import styles from './index.less';
import {convertCodeEditTheme} from "@/utils/function";
const { Text, Link } = Typography;
......
......@@ -23,6 +23,7 @@ import { StateType } from '@/pages/DataStudio/model';
import { handleOption, handleRemoveById } from '@/services/BusinessCrud';
import { API_CONSTANTS } from '@/services/endpoints';
import { TaskVersionListItem } from '@/types/Studio/data';
import { convertCodeEditTheme } from '@/utils/function';
import { l } from '@/utils/intl';
import { useRequest } from '@@/exports';
import { RocketOutlined, SyncOutlined } from '@ant-design/icons';
......@@ -31,7 +32,6 @@ import { Button, Card, Modal, Tag } from 'antd';
import moment from 'moment';
import React, { useState } from 'react';
import { connect } from 'umi';
import {convertCodeEditTheme} from "@/utils/function";
const HistoryVersion = (props: any) => {
const {
......
......@@ -225,7 +225,11 @@ const DataStudio = (props: any) => {
<Content style={{ display: 'flex', flexDirection: 'column', minWidth: 0 }}>
<div style={{ display: 'flex' }}>
<LeftContainer size={size} leftContainer={leftContainer} rightContainer={rightContainer} />
<LeftContainer
size={size}
leftContainer={leftContainer}
rightContainer={rightContainer}
/>
<Content
style={{
width:
......
......@@ -542,7 +542,7 @@ const Model: ModelType = {
* 更新底部高度
*/
updateBottomHeight(state, { payload }) {
if (payload!=state.bottomContainer.height) {
if (payload != state.bottomContainer.height) {
return {
...state,
bottomContainer: {
......
......@@ -202,14 +202,32 @@ export const BuildSteps: React.FC<BuildStepsProps> = (props) => {
{l('button.rebuild')}
</Button>,
<Button
key={'finish'}
type={showLog ? 'default' : 'primary'}
key={'close'}
type={'primary'}
hidden={!showLog}
danger={showLog}
onClick={() => handleCancel()}
>
{l('button.close')}
</Button>,
<Button
key={'finish'}
type={'primary'}
hidden={showLog}
disabled={steps[currentStep - 1]?.status === 'error' && percent !== 99}
loading={currentStep !== steps.length && percent !== 99}
onClick={() => handleCancel()}
>
{showLog ? l('button.close') : l('button.finish')}
{l('button.finish')}
</Button>,
<Button
key={'daemon'}
hidden={!(currentStep !== steps.length && percent !== 99) || showLog}
onClick={() => handleCancel()}
>
{steps[currentStep - 1]?.status === 'error' && percent !== 99
? l('button.close')
: l('button.daemon')}
</Button>
];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment