mirror of
https://github.com/lensapp/lens.git
synced 2024-11-13 09:17:30 +03:00
fix Notifications blocking items not visually under them from being interacted with (#915)
* fix Notifications blocking items not visually under them from being interacted with Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
78ab6f016b
commit
9a10db837e
@ -62,14 +62,13 @@ export class InfoPanel extends Component<Props> {
|
||||
this.error = "";
|
||||
this.waiting = true;
|
||||
try {
|
||||
this.result = await this.props.submit().finally(() => {
|
||||
this.waiting = false;
|
||||
});
|
||||
this.result = await this.props.submit()
|
||||
if (showNotifications) Notifications.ok(this.result);
|
||||
} catch (error) {
|
||||
this.error = error.toString();
|
||||
if (showNotifications) Notifications.error(this.error);
|
||||
throw error;
|
||||
} finally {
|
||||
this.waiting = false
|
||||
}
|
||||
}
|
||||
|
||||
@ -91,12 +90,13 @@ export class InfoPanel extends Component<Props> {
|
||||
<>
|
||||
{result && (
|
||||
<div className="success flex align-center">
|
||||
<Icon material="done"/> <span>{result}</span>
|
||||
<Icon material="done" />
|
||||
<span>{result}</span>
|
||||
</div>
|
||||
)}
|
||||
{errorInfo && (
|
||||
<div className="error flex align-center">
|
||||
<Icon material="error_outline"/>
|
||||
<Icon material="error_outline" />
|
||||
<span>{errorInfo}</span>
|
||||
</div>
|
||||
)}
|
||||
@ -114,9 +114,9 @@ export class InfoPanel extends Component<Props> {
|
||||
{controls}
|
||||
</div>
|
||||
<div className="info flex gaps align-center">
|
||||
{waiting ? <><Spinner/> {submittingMessage}</> : this.renderInfo()}
|
||||
{waiting ? <><Spinner /> {submittingMessage}</> : this.renderInfo()}
|
||||
</div>
|
||||
<Button plain label={<Trans>Cancel</Trans>} onClick={close}/>
|
||||
<Button plain label={<Trans>Cancel</Trans>} onClick={close} />
|
||||
<Button
|
||||
primary active
|
||||
label={submitLabel}
|
||||
@ -134,4 +134,4 @@ export class InfoPanel extends Component<Props> {
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,10 +3,11 @@
|
||||
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
top: 0;
|
||||
padding: $padding * 2;
|
||||
max-height: 100vh;
|
||||
z-index: 100000;
|
||||
height: min-content!important;
|
||||
|
||||
&:empty {
|
||||
display: none;
|
||||
@ -42,4 +43,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user