Disable wearables buttons in avatar app if don't have permissions

This commit is contained in:
David Rowe 2021-03-09 15:24:58 +13:00
parent 283f7d61e2
commit 13b9a2a67b

View file

@ -518,7 +518,12 @@ Rectangle {
glyphText: "\ue02e" glyphText: "\ue02e"
onClicked: { onClicked: {
adjustWearables.open(currentAvatar); if (!AddressManager.isConnected || Entities.canRezAvatarEntities()) {
adjustWearables.open(currentAvatar);
} else {
Window.alert("You cannot use wearables on this domain.")
}
} }
} }
@ -529,7 +534,11 @@ Rectangle {
glyphText: wearablesFrozen ? hifi.glyphs.lock : hifi.glyphs.unlock; glyphText: wearablesFrozen ? hifi.glyphs.lock : hifi.glyphs.unlock;
onClicked: { onClicked: {
emitSendToScript({'method' : 'toggleWearablesFrozen'}); if (!AddressManager.isConnected || Entities.canRezAvatarEntities()) {
emitSendToScript({'method' : 'toggleWearablesFrozen'});
} else {
Window.alert("You cannot use wearables on this domain.")
}
} }
} }
} }