mirror of
https://github.com/overte-org/overte.git
synced 2025-07-15 16:57:10 +02:00
Case 21025 conditionalizing TabletWebView features
This commit is contained in:
parent
98eec6b74d
commit
9182db8bd4
6 changed files with 36 additions and 16 deletions
|
@ -40,6 +40,7 @@ Item {
|
||||||
property bool isConcurrency: action === 'concurrency';
|
property bool isConcurrency: action === 'concurrency';
|
||||||
property bool isAnnouncement: action === 'announcement';
|
property bool isAnnouncement: action === 'announcement';
|
||||||
property bool isStacked: !isConcurrency && drillDownToPlace;
|
property bool isStacked: !isConcurrency && drillDownToPlace;
|
||||||
|
property bool has3DHTML: PlatformInfo.has3DHTML();
|
||||||
|
|
||||||
|
|
||||||
property int textPadding: 10;
|
property int textPadding: 10;
|
||||||
|
@ -298,7 +299,7 @@ Item {
|
||||||
|
|
||||||
StateImage {
|
StateImage {
|
||||||
id: actionIcon;
|
id: actionIcon;
|
||||||
visible: !isAnnouncement;
|
visible: !isAnnouncement && has3DHTML;
|
||||||
imageURL: "../../images/info-icon-2-state.svg";
|
imageURL: "../../images/info-icon-2-state.svg";
|
||||||
size: 30;
|
size: 30;
|
||||||
buttonState: messageArea.containsMouse ? 1 : 0;
|
buttonState: messageArea.containsMouse ? 1 : 0;
|
||||||
|
@ -315,7 +316,7 @@ Item {
|
||||||
}
|
}
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: messageArea;
|
id: messageArea;
|
||||||
visible: !isAnnouncement;
|
visible: !isAnnouncement && has3DHTML;
|
||||||
width: parent.width;
|
width: parent.width;
|
||||||
height: messageHeight;
|
height: messageHeight;
|
||||||
anchors.top: lobby.bottom;
|
anchors.top: lobby.bottom;
|
||||||
|
|
|
@ -46,6 +46,8 @@ Item {
|
||||||
property string placeName: ""
|
property string placeName: ""
|
||||||
property string profilePicBorderColor: (connectionStatus == "connection" ? hifi.colors.indigoAccent : (connectionStatus == "friend" ? hifi.colors.greenHighlight : "transparent"))
|
property string profilePicBorderColor: (connectionStatus == "connection" ? hifi.colors.indigoAccent : (connectionStatus == "friend" ? hifi.colors.greenHighlight : "transparent"))
|
||||||
property alias avImage: avatarImage
|
property alias avImage: avatarImage
|
||||||
|
property bool has3DHTML: PlatformInfo.has3DHTML();
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: avatarImage
|
id: avatarImage
|
||||||
visible: profileUrl !== "" && userName !== "";
|
visible: profileUrl !== "" && userName !== "";
|
||||||
|
@ -94,10 +96,12 @@ Item {
|
||||||
enabled: (selected && activeTab == "nearbyTab") || isMyCard;
|
enabled: (selected && activeTab == "nearbyTab") || isMyCard;
|
||||||
hoverEnabled: enabled
|
hoverEnabled: enabled
|
||||||
onClicked: {
|
onClicked: {
|
||||||
userInfoViewer.url = Account.metaverseServerURL + "/users/" + userName;
|
if (Phas3DHTML) {
|
||||||
userInfoViewer.visible = true;
|
userInfoViewer.url = Account.metaverseServerURL + "/users/" + userName;
|
||||||
|
userInfoViewer.visible = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
onEntered: infoHoverImage.visible = true;
|
onEntered: infoHoverImage.visible = has3DHTML;
|
||||||
onExited: infoHoverImage.visible = false;
|
onExited: infoHoverImage.visible = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -352,7 +356,7 @@ Item {
|
||||||
}
|
}
|
||||||
StateImage {
|
StateImage {
|
||||||
id: nameCardConnectionInfoImage
|
id: nameCardConnectionInfoImage
|
||||||
visible: selected && !isMyCard && pal.activeTab == "connectionsTab"
|
visible: selected && !isMyCard && pal.activeTab == "connectionsTab" && has3DHTML
|
||||||
imageURL: "../../images/info-icon-2-state.svg" // PLACEHOLDER!!!
|
imageURL: "../../images/info-icon-2-state.svg" // PLACEHOLDER!!!
|
||||||
size: 32;
|
size: 32;
|
||||||
buttonState: 0;
|
buttonState: 0;
|
||||||
|
@ -364,8 +368,10 @@ Item {
|
||||||
enabled: selected
|
enabled: selected
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
onClicked: {
|
onClicked: {
|
||||||
userInfoViewer.url = Account.metaverseServerURL + "/users/" + userName;
|
if(has3DHTML) {
|
||||||
userInfoViewer.visible = true;
|
userInfoViewer.url = Account.metaverseServerURL + "/users/" + userName;
|
||||||
|
userInfoViewer.visible = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
onEntered: {
|
onEntered: {
|
||||||
nameCardConnectionInfoImage.buttonState = 1;
|
nameCardConnectionInfoImage.buttonState = 1;
|
||||||
|
@ -376,8 +382,7 @@ Item {
|
||||||
}
|
}
|
||||||
FiraSansRegular {
|
FiraSansRegular {
|
||||||
id: nameCardConnectionInfoText
|
id: nameCardConnectionInfoText
|
||||||
visible: selected && !isMyCard && pal.activeTab == "connectionsTab"
|
visible: selected && !isMyCard && pal.activeTab == "connectionsTab" && PlatformInfo.has3DHTML()
|
||||||
width: parent.width
|
|
||||||
height: displayNameTextPixelSize
|
height: displayNameTextPixelSize
|
||||||
size: displayNameTextPixelSize - 4
|
size: displayNameTextPixelSize - 4
|
||||||
anchors.left: nameCardConnectionInfoImage.right
|
anchors.left: nameCardConnectionInfoImage.right
|
||||||
|
@ -391,9 +396,10 @@ Item {
|
||||||
id: nameCardRemoveConnectionImage
|
id: nameCardRemoveConnectionImage
|
||||||
visible: selected && !isMyCard && pal.activeTab == "connectionsTab"
|
visible: selected && !isMyCard && pal.activeTab == "connectionsTab"
|
||||||
text: hifi.glyphs.close
|
text: hifi.glyphs.close
|
||||||
size: 28;
|
size: 24;
|
||||||
x: 120
|
x: 120
|
||||||
anchors.verticalCenter: nameCardConnectionInfoImage.verticalCenter
|
anchors.verticalCenter: nameCardConnectionInfoImage.verticalCenter
|
||||||
|
anchors.left: has3DHTML ? nameCardConnectionInfoText.right + 10 : avatarImage.right
|
||||||
}
|
}
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill:nameCardRemoveConnectionImage
|
anchors.fill:nameCardRemoveConnectionImage
|
||||||
|
|
|
@ -32,6 +32,7 @@ Rectangle {
|
||||||
property string initialActiveViewAfterStatus5: "walletInventory";
|
property string initialActiveViewAfterStatus5: "walletInventory";
|
||||||
property bool keyboardRaised: false;
|
property bool keyboardRaised: false;
|
||||||
property bool isPassword: false;
|
property bool isPassword: false;
|
||||||
|
property bool has3DHTML: PlatformInfo.has3DHTML();
|
||||||
|
|
||||||
anchors.fill: (typeof parent === undefined) ? undefined : parent;
|
anchors.fill: (typeof parent === undefined) ? undefined : parent;
|
||||||
|
|
||||||
|
@ -335,8 +336,10 @@ Rectangle {
|
||||||
Connections {
|
Connections {
|
||||||
onSendSignalToWallet: {
|
onSendSignalToWallet: {
|
||||||
if (msg.method === 'transactionHistory_usernameLinkClicked') {
|
if (msg.method === 'transactionHistory_usernameLinkClicked') {
|
||||||
userInfoViewer.url = msg.usernameLink;
|
if (has3DHTML) {
|
||||||
userInfoViewer.visible = true;
|
userInfoViewer.url = msg.usernameLink;
|
||||||
|
userInfoViewer.visible = true;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
sendToScript(msg);
|
sendToScript(msg);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,8 @@ Item {
|
||||||
HifiConstants { id: hifi; }
|
HifiConstants { id: hifi; }
|
||||||
|
|
||||||
id: root;
|
id: root;
|
||||||
|
|
||||||
|
property bool has3DHTML: PlatformInfo.has3DHTML();
|
||||||
|
|
||||||
onVisibleChanged: {
|
onVisibleChanged: {
|
||||||
if (visible) {
|
if (visible) {
|
||||||
|
@ -333,7 +335,9 @@ Item {
|
||||||
|
|
||||||
onLinkActivated: {
|
onLinkActivated: {
|
||||||
if (link.indexOf("users/") !== -1) {
|
if (link.indexOf("users/") !== -1) {
|
||||||
sendSignalToWallet({method: 'transactionHistory_usernameLinkClicked', usernameLink: link});
|
if (has3DHTML) {
|
||||||
|
sendSignalToWallet({method: 'transactionHistory_usernameLinkClicked', usernameLink: link});
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
sendSignalToWallet({method: 'transactionHistory_linkClicked', itemId: model.marketplace_item});
|
sendSignalToWallet({method: 'transactionHistory_linkClicked', itemId: model.marketplace_item});
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,7 @@ StackView {
|
||||||
property int cardWidth: 212;
|
property int cardWidth: 212;
|
||||||
property int cardHeight: 152;
|
property int cardHeight: 152;
|
||||||
property var tablet: null;
|
property var tablet: null;
|
||||||
|
property bool has3DHTML: PlatformInfo.has3DHTML();
|
||||||
|
|
||||||
RootHttpRequest { id: http; }
|
RootHttpRequest { id: http; }
|
||||||
signal sendToScript(var message);
|
signal sendToScript(var message);
|
||||||
|
@ -75,8 +76,10 @@ StackView {
|
||||||
}
|
}
|
||||||
function goCard(targetString, standaloneOptimized) {
|
function goCard(targetString, standaloneOptimized) {
|
||||||
if (0 !== targetString.indexOf('hifi://')) {
|
if (0 !== targetString.indexOf('hifi://')) {
|
||||||
var card = tabletWebView.createObject();
|
if(has3DHTML) {
|
||||||
card.url = addressBarDialog.metaverseServerUrl + targetString;
|
var card = tabletWebView.createObject();
|
||||||
|
card.url = addressBarDialog.metaverseServerUrl + targetString;
|
||||||
|
}
|
||||||
card.parentStackItem = root;
|
card.parentStackItem = root;
|
||||||
root.push(card);
|
root.push(card);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -3043,6 +3043,9 @@ void Application::initializeUi() {
|
||||||
QUrl{ "hifi/commerce/wallet/Wallet.qml" },
|
QUrl{ "hifi/commerce/wallet/Wallet.qml" },
|
||||||
QUrl{ "hifi/commerce/wallet/WalletHome.qml" },
|
QUrl{ "hifi/commerce/wallet/WalletHome.qml" },
|
||||||
QUrl{ "hifi/tablet/TabletAddressDialog.qml" },
|
QUrl{ "hifi/tablet/TabletAddressDialog.qml" },
|
||||||
|
QUrl{ "hifi/Card.qml" },
|
||||||
|
QUrl{ "hifi/Pal.qml" },
|
||||||
|
QUrl{ "hifi/NameCard.qml" },
|
||||||
}, platformInfoCallback);
|
}, platformInfoCallback);
|
||||||
|
|
||||||
QmlContextCallback ttsCallback = [](QQmlContext* context) {
|
QmlContextCallback ttsCallback = [](QQmlContext* context) {
|
||||||
|
|
Loading…
Reference in a new issue