1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

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:
Sebastian Malton 2020-09-17 14:24:12 -04:00
parent bddc6b33e3
commit aa46802281
3 changed files with 11 additions and 15 deletions

View File

@ -35,10 +35,6 @@ html, body {
#app { #app {
height: 100%; height: 100%;
min-height: 100%; min-height: 100%;
> * {
height: inherit;
}
} }
#draggable-top { #draggable-top {

View File

@ -62,14 +62,13 @@ export class InfoPanel extends Component<Props> {
this.error = ""; this.error = "";
this.waiting = true; this.waiting = true;
try { try {
this.result = await this.props.submit().finally(() => { this.result = await this.props.submit()
this.waiting = false;
});
if (showNotifications) Notifications.ok(this.result); if (showNotifications) Notifications.ok(this.result);
} catch (error) { } catch (error) {
this.error = error.toString(); this.error = error.toString();
if (showNotifications) Notifications.error(this.error); if (showNotifications) Notifications.error(this.error);
throw error; } finally {
this.waiting = false
} }
} }
@ -91,12 +90,13 @@ export class InfoPanel extends Component<Props> {
<> <>
{result && ( {result && (
<div className="success flex align-center"> <div className="success flex align-center">
<Icon material="done"/> <span>{result}</span> <Icon material="done" />
<span>{result}</span>
</div> </div>
)} )}
{errorInfo && ( {errorInfo && (
<div className="error flex align-center"> <div className="error flex align-center">
<Icon material="error_outline"/> <Icon material="error_outline" />
<span>{errorInfo}</span> <span>{errorInfo}</span>
</div> </div>
)} )}
@ -114,9 +114,9 @@ export class InfoPanel extends Component<Props> {
{controls} {controls}
</div> </div>
<div className="info flex gaps align-center"> <div className="info flex gaps align-center">
{waiting ? <><Spinner/> {submittingMessage}</> : this.renderInfo()} {waiting ? <><Spinner /> {submittingMessage}</> : this.renderInfo()}
</div> </div>
<Button plain label={<Trans>Cancel</Trans>} onClick={close}/> <Button plain label={<Trans>Cancel</Trans>} onClick={close} />
<Button <Button
primary active primary active
label={submitLabel} label={submitLabel}
@ -134,4 +134,4 @@ export class InfoPanel extends Component<Props> {
</div> </div>
); );
} }
} }

View File

@ -3,7 +3,7 @@
position: absolute; position: absolute;
right: 0; right: 0;
bottom: 0; top: 0;
padding: $padding * 2; padding: $padding * 2;
max-height: 100vh; max-height: 100vh;
z-index: 100000; z-index: 100000;
@ -42,4 +42,4 @@
} }
} }
} }
} }