mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-20 00:55:40 +00:00
feat: improve ProvListHolder UI
This commit is contained in:
@@ -18,7 +18,7 @@ const renderEnviron = data => {
|
|||||||
class ProcListHolder extends Component {
|
class ProcListHolder extends Component {
|
||||||
constructor(props, context) {
|
constructor(props, context) {
|
||||||
super(props, context);
|
super(props, context);
|
||||||
this.state = { open: !this.props.vars.environ };
|
this.state = { open: !this.props.renderName };
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleOpen = () => {
|
toggleOpen = () => {
|
||||||
@@ -26,17 +26,17 @@ class ProcListHolder extends Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { vars, renderName, children } = this.props;
|
const { vars, children } = this.props;
|
||||||
const groupExpandStatus = this.state.open
|
const groupExpandStatus = this.state.open
|
||||||
? styles.collapsed
|
? styles.collapsed
|
||||||
: styles.expanded;
|
: styles.expanded;
|
||||||
|
|
||||||
let name = "default";
|
let name = (
|
||||||
if (vars.environ) {
|
<div>
|
||||||
name = Object.entries(vars.environ).map(renderEnviron);
|
<div>{vars.name === "woodpecker" ? "default" : vars.name}</div>
|
||||||
} else if (renderName && vars.name !== "woodpecker") {
|
{vars.environ ? Object.entries(vars.environ).map(renderEnviron) : ""}
|
||||||
name = vars.name;
|
</div>
|
||||||
}
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.list}>
|
<div className={styles.list}>
|
||||||
|
Reference in New Issue
Block a user