Commit 516cf923 authored by Roman Sorokin's avatar Roman Sorokin Committed by Commit Bot

OOBE Dialog: Add buttons overlay

As we introduced paddings of the buttons inside oobe dialog - external overlay
is not displayed properly (see bug for screenshots).

Also use the overlay on the enrollment screen

Fixed: 1013337, b/143346960
Test: manual on the device
Change-Id: I22a1cf67c39221c378b0a5a6f0c7d5ab978287af
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1892963Reviewed-by: default avatarDenis Kuznetsov [CET] <antrim@chromium.org>
Commit-Queue: Roman Sorokin [CET] <rsorokin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#712618}
parent c469ea65
...@@ -15,7 +15,8 @@ ...@@ -15,7 +15,8 @@
<div id="step-signin" hidden$="[[!eq_(currentStep_, 'signin')]]"> <div id="step-signin" hidden$="[[!eq_(currentStep_, 'signin')]]">
<oobe-dialog class="gaia-dialog" role="dialog" <oobe-dialog class="gaia-dialog" role="dialog"
id="enrollment-gaia-dialog" has-buttons no-header id="enrollment-gaia-dialog" has-buttons no-header
no-footer-padding> no-footer-padding
show-buttons-overlay="[[authenticatorDialogDisplayed_]]">
<div slot="footer" class="flex layout vertical"> <div slot="footer" class="flex layout vertical">
<webview id="oauth-enroll-auth-view" <webview id="oauth-enroll-auth-view"
name="oauth-enroll-auth-view"> name="oauth-enroll-auth-view">
......
...@@ -232,13 +232,11 @@ Polymer({ ...@@ -232,13 +232,11 @@ Polymer({
this.authenticator_.addEventListener( this.authenticator_.addEventListener(
'dialogShown', (function(e) { 'dialogShown', (function(e) {
this.authenticatorDialogDisplayed_ = true; this.authenticatorDialogDisplayed_ = true;
// TODO(alemate): update the visual style.
}).bind(this)); }).bind(this));
this.authenticator_.addEventListener( this.authenticator_.addEventListener(
'dialogHidden', (function(e) { 'dialogHidden', (function(e) {
this.authenticatorDialogDisplayed_ = false; this.authenticatorDialogDisplayed_ = false;
// TODO(alemate): update the visual style.
}).bind(this)); }).bind(this));
this.authenticator_.insecureContentBlockedCallback = this.authenticator_.insecureContentBlockedCallback =
......
...@@ -71,6 +71,10 @@ ...@@ -71,6 +71,10 @@
z-index: 1; z-index: 1;
} }
#buttons-overlay {
background: rgba(var(--google-grey-900-rgb), 0.6);
}
:host #oobe-bottom[no-buttons-padding] { :host #oobe-bottom[no-buttons-padding] {
padding: unset; padding: unset;
} }
......
...@@ -84,6 +84,8 @@ ...@@ -84,6 +84,8 @@
<div id="oobe-bottom" hideShadow$="[[hideShadow]]" <div id="oobe-bottom" hideShadow$="[[hideShadow]]"
class="slot-container layout horizontal center"> class="slot-container layout horizontal center">
<slot name="bottom-buttons"></slot> <slot name="bottom-buttons"></slot>
<div id="buttons-overlay" class="fit" hidden="[[!showButtonsOverlay]]">
</div>
</div> </div>
</template> </template>
</template> </template>
......
...@@ -55,6 +55,14 @@ Polymer({ ...@@ -55,6 +55,14 @@ Polymer({
reflectToAttribute: true, reflectToAttribute: true,
observer: 'onfullScreenDialogChanged_', observer: 'onfullScreenDialogChanged_',
}, },
/**
* Shows overlay on top of the bottom buttons.
*/
showButtonsOverlay: {
type: Boolean,
value: false,
},
}, },
focus: function() { focus: function() {
......
...@@ -120,7 +120,3 @@ ...@@ -120,7 +120,3 @@
:host(.saml) #signin-frame-container { :host(.saml) #signin-frame-container {
padding-top: 44px; padding-top: 44px;
} }
#gaia-screen-buttons-overlay {
background: rgba(0, 0, 0, 0.6);
}
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<template> <template>
<oobe-dialog id="signin-frame-dialog" class="gaia-dialog" role="dialog" <oobe-dialog id="signin-frame-dialog" class="gaia-dialog" role="dialog"
has-buttons no-header no-footer-padding has-buttons no-header no-footer-padding
show-buttons-overlay="[[!navigationEnabled_]]"
hidden="[[!isSigninFrameDialogVisible_(screenMode_, hidden="[[!isSigninFrameDialogVisible_(screenMode_,
pinDialogParameters_)]]"> pinDialogParameters_)]]">
<div slot="footer" class="flex layout vertical"> <div slot="footer" class="flex layout vertical">
...@@ -36,9 +37,6 @@ ...@@ -36,9 +37,6 @@
disabled="[[!secondaryActionButtonEnabled_]]" disabled="[[!secondaryActionButtonEnabled_]]"
>[[secondaryActionButtonLabel_]]</oobe-text-button> >[[secondaryActionButtonLabel_]]</oobe-text-button>
</div> </div>
<div id="gaia-screen-buttons-overlay" class="fit"
hidden="[[navigationEnabled_]]">
</div>
</div> </div>
</oobe-dialog> </oobe-dialog>
<offline-gaia id="offline-gaia" class="gaia-dialog" <offline-gaia id="offline-gaia" class="gaia-dialog"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment