mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 20:01:02 +00:00
feat: improve ProvListHolder UI
This commit is contained in:
parent
87928d2600
commit
b558e0b429
1 changed files with 8 additions and 8 deletions
|
@ -18,7 +18,7 @@ const renderEnviron = data => {
|
|||
class ProcListHolder extends Component {
|
||||
constructor(props, context) {
|
||||
super(props, context);
|
||||
this.state = { open: !this.props.vars.environ };
|
||||
this.state = { open: !this.props.renderName };
|
||||
}
|
||||
|
||||
toggleOpen = () => {
|
||||
|
@ -26,17 +26,17 @@ class ProcListHolder extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { vars, renderName, children } = this.props;
|
||||
const { vars, children } = this.props;
|
||||
const groupExpandStatus = this.state.open
|
||||
? styles.collapsed
|
||||
: styles.expanded;
|
||||
|
||||
let name = "default";
|
||||
if (vars.environ) {
|
||||
name = Object.entries(vars.environ).map(renderEnviron);
|
||||
} else if (renderName && vars.name !== "woodpecker") {
|
||||
name = vars.name;
|
||||
}
|
||||
let name = (
|
||||
<div>
|
||||
<div>{vars.name === "woodpecker" ? "default" : vars.name}</div>
|
||||
{vars.environ ? Object.entries(vars.environ).map(renderEnviron) : ""}
|
||||
</div>
|
||||
);
|
||||
|
||||
return (
|
||||
<div className={styles.list}>
|
||||
|
|
Loading…
Reference in a new issue