!487 设计器界面,云盘信息Ui优化

pull/487/MERGE
ZoeLeeFZ 5 years ago committed by ChenX
parent ca5b1465a3
commit 8ac0767958

@ -122,6 +122,7 @@
#modal .input-select{ #modal .input-select{
display: inline-block; display: inline-block;
width: @selectWidth; width: @selectWidth;
vertical-align: bottom;
} }
//select高度改变,调整切换符号位置 //select高度改变,调整切换符号位置

@ -12,12 +12,6 @@ const BarStype: React.CSSProperties = {
margin: 0, margin: 0,
borderRadius: 5, borderRadius: 5,
} }
const SpaceProcessUseStyle: React.CSSProperties = {
transition: "all 0.2s",
height: "100%",
backgroundColor: "#428bca",
borderRadius: 5,
}
@inject('store') @inject('store')
@observer @observer
@ -33,7 +27,12 @@ export class SpaceInfoBar extends React.Component<{ store?: TopPanelStore }, {}>
return ( return (
<div style={{ width: 200 }}> <div style={{ width: 200 }}>
<div style={BarStype}> <div style={BarStype}>
<div style={Object.assign(SpaceProcessUseStyle, { width: cloudInfo.used_percentage })}></div> <div
className="space-process"
style={{
width: cloudInfo.used_percentage,
backgroundColor: parseFloat(cloudInfo.used_percentage) > 80 ? "#db3737" : "#428bca"
}} />
</div> </div>
<div className="flex-between" style={{ alignItems: "center" }}> <div className="flex-between" style={{ alignItems: "center" }}>
<span>{cloudInfo.used_size}/{cloudInfo.zone_size}</span> <span>{cloudInfo.used_size}/{cloudInfo.zone_size}</span>

@ -211,30 +211,34 @@
width: auto; width: auto;
} }
&>.bp3-dialog-body>div:first-child { &>.bp3-dialog-body>div {
height: 100%;
input { &>div:first-child {
width: 100px; width: 60%;
height: 20px;
} }
button { &>div:last-child {
height: 20px; width: 40%;
min-height: 20px;
padding: 2px 8px;
}
} }
&>.bp3-dialog-body>div:last-child { }
height: 100%;
&>div:first-child { .buttons {
width: 60%;
&>button {
margin-right: 3px;
margin-bottom: 3px;
border-radius: 5px;
} }
&>div:last-child { &>span {
width: 40%; margin-right: 3px;
& button {
margin-bottom: 3px;
border-radius: 5px;
}
} }
} }
} }

@ -63,7 +63,7 @@ export default class TempalteActionList extends React.Component<ITempalteActionL
onNodeClick={this.handleNodeClick} onNodeClick={this.handleNodeClick}
onNodeCollapse={(node) => this.handleNodeCollapse(node)} onNodeCollapse={(node) => this.handleNodeCollapse(node)}
/> />
<div> <div className="buttons">
<Button <Button
text="增加动作" text="增加动作"
onClick={() => this.handleAddAction(EEditorActionType.Add)} onClick={() => this.handleAddAction(EEditorActionType.Add)}

@ -78,15 +78,6 @@ export class TemplateEditor extends React.Component<ITemplateEditorProps, any> {
<div <div
className={Classes.DIALOG_BODY + " " + Classes.CARD} className={Classes.DIALOG_BODY + " " + Classes.CARD}
> >
<div>
<Label className={Classes.INLINE}>
<span></span>
<input className={Classes.INPUT}
defaultValue={template.Name}
onChange={e => template.Name = e.target.value}
/>
</Label>
</div>
<div className="flex"> <div className="flex">
<TemplateParamList <TemplateParamList
store={this.props.store} store={this.props.store}
@ -102,6 +93,13 @@ export class TemplateEditor extends React.Component<ITemplateEditorProps, any> {
store={this.props.store} store={this.props.store}
/> />
<div className={Classes.DIALOG_FOOTER_ACTIONS}> <div className={Classes.DIALOG_FOOTER_ACTIONS}>
<Label className={Classes.INLINE}>
<span style={{ fontWeight: 550 }}>:</span>
<input className={Classes.INPUT}
defaultValue={template.Name}
onChange={e => template.Name = e.target.value}
/>
</Label>
{ {
this.props.tid ? this.props.tid ?
<> <>

@ -111,7 +111,7 @@ export default class TemplateParamList extends React.Component<ITemplateParamLis
}) })
} }
</ul> </ul>
<div> <div className="buttons">
<Button <Button
text="增加变量" text="增加变量"
onClick={() => this.startAddParam.set(true)} onClick={() => this.startAddParam.set(true)}

@ -37,7 +37,7 @@ export class TemplateSaveDir extends React.Component<ITemplateSaveDirProps, { no
} }
target={ target={
<Button <Button
text="保存" text="保存"
intent={Intent.SUCCESS} intent={Intent.SUCCESS}
/>} />}
/> />

@ -181,3 +181,10 @@
} }
} }
} }
.space-process{
transition: all 0.2s;
height: 100%;
background-color: #428bca;
border-radius: 5;
}

@ -91,7 +91,7 @@ export class TopPanelStore extends Singleton
}); });
let zoneSize = sizeInfoToNumber(info.zone_size); let zoneSize = sizeInfoToNumber(info.zone_size);
let usedSize = sizeInfoToNumber(info.used_size); let usedSize = sizeInfoToNumber(info.used_size);
this.cloudInfo.used_percentage = usedSize / zoneSize * 100 + "%"; this.cloudInfo.used_percentage = usedSize <= zoneSize ? usedSize / zoneSize * 100 + "%" : "100%";
} }
} }
} }

Loading…
Cancel
Save