mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 04:08:13 +02:00
cr round 2
This commit is contained in:
parent
2f4566b63c
commit
5083e449b0
4 changed files with 16 additions and 14 deletions
|
@ -87,6 +87,10 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
onFeaturePermissionRequested: {
|
onFeaturePermissionRequested: {
|
||||||
|
if (permissionPopupBackground.visible === true) {
|
||||||
|
console.log("Browser engine requested a new permission, but user is already being presented with a different permission request. Aborting request for new permission...");
|
||||||
|
return;
|
||||||
|
}
|
||||||
permissionPopupBackground.securityOrigin = securityOrigin;
|
permissionPopupBackground.securityOrigin = securityOrigin;
|
||||||
permissionPopupBackground.feature = feature;
|
permissionPopupBackground.feature = feature;
|
||||||
|
|
||||||
|
|
|
@ -146,6 +146,11 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
onFeaturePermissionRequested: {
|
onFeaturePermissionRequested: {
|
||||||
|
if (permissionPopupBackground.visible === true) {
|
||||||
|
console.log("Browser engine requested a new permission, but user is already being presented with a different permission request. Aborting request for new permission...");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
permissionPopupBackground.securityOrigin = securityOrigin;
|
permissionPopupBackground.securityOrigin = securityOrigin;
|
||||||
permissionPopupBackground.feature = feature;
|
permissionPopupBackground.feature = feature;
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,10 @@ WebEngineView {
|
||||||
WebSpinner { }
|
WebSpinner { }
|
||||||
|
|
||||||
onFeaturePermissionRequested: {
|
onFeaturePermissionRequested: {
|
||||||
|
if (permissionPopupBackground.visible === true) {
|
||||||
|
console.log("Browser engine requested a new permission, but user is already being presented with a different permission request. Aborting request for new permission...");
|
||||||
|
return;
|
||||||
|
}
|
||||||
permissionPopupBackground.securityOrigin = securityOrigin;
|
permissionPopupBackground.securityOrigin = securityOrigin;
|
||||||
permissionPopupBackground.feature = feature;
|
permissionPopupBackground.feature = feature;
|
||||||
|
|
||||||
|
|
|
@ -26,13 +26,10 @@ Rectangle {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: webAccessHeaderContainer
|
|
||||||
height: 75
|
height: 75
|
||||||
anchors.top: parent.top
|
|
||||||
Layout.preferredWidth: parent.width
|
Layout.preferredWidth: parent.width
|
||||||
|
|
||||||
HifiStyles.RalewayBold {
|
HifiStyles.RalewayBold {
|
||||||
id: webAccessHeaderText
|
|
||||||
text: "REQUEST FOR DEVICE ACCESS"
|
text: "REQUEST FOR DEVICE ACCESS"
|
||||||
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
@ -44,12 +41,10 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: webAccessInfoContainer
|
|
||||||
height: 35
|
height: 35
|
||||||
Layout.preferredWidth: parent.width
|
Layout.preferredWidth: parent.width
|
||||||
|
|
||||||
HifiStyles.RalewayLight {
|
HifiStyles.RalewayLight {
|
||||||
id: webAccessInfoText
|
|
||||||
text: "This website is attempting to " + root.permissionLanguage[root.currentRequestedPermission] + "."
|
text: "This website is attempting to " + root.permissionLanguage[root.currentRequestedPermission] + "."
|
||||||
|
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
@ -60,39 +55,33 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: permissionsButtonsRow
|
|
||||||
height: 100
|
height: 100
|
||||||
Layout.preferredWidth: parent.width
|
Layout.preferredWidth: parent.width
|
||||||
Layout.topMargin: 35
|
Layout.topMargin: 35
|
||||||
property int space: 8
|
property int space: 8
|
||||||
readonly property int _LEFT_BUTTON: 0
|
|
||||||
readonly property int _RIGHT_BUTTON: 1
|
|
||||||
|
|
||||||
HifiControls.Button {
|
HifiControls.Button {
|
||||||
id: leftButton
|
|
||||||
text: "Don't Allow"
|
text: "Don't Allow"
|
||||||
|
|
||||||
anchors.right: parent.horizontalCenter
|
anchors.right: parent.horizontalCenter
|
||||||
anchors.rightMargin: parent.space
|
anchors.rightMargin: parent.space
|
||||||
|
width: 125
|
||||||
color: hifi.buttons.red
|
color: hifi.buttons.red
|
||||||
enabled: true
|
|
||||||
height: 38
|
height: 38
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.permissionButtonPressed(parent._LEFT_BUTTON);
|
root.permissionButtonPressed(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
HifiControls.Button {
|
HifiControls.Button {
|
||||||
id: rightButton
|
|
||||||
text: "Yes allow access"
|
text: "Yes allow access"
|
||||||
|
|
||||||
anchors.left: parent.horizontalCenter
|
anchors.left: parent.horizontalCenter
|
||||||
anchors.leftMargin: parent.space
|
anchors.leftMargin: parent.space
|
||||||
color: hifi.buttons.blue
|
color: hifi.buttons.blue
|
||||||
enabled: true
|
|
||||||
width: 155
|
width: 155
|
||||||
height: 38
|
height: 38
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.permissionButtonPressed(parent._RIGHT_BUTTON);
|
root.permissionButtonPressed(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue