mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 04:08:13 +02:00
Merge pull request #15013 from thoys/feat/avatarTools/avatarDoctorProjectStatus
Case 21340: avatar doctor project page status
This commit is contained in:
commit
3600b98bd0
2 changed files with 109 additions and 2 deletions
|
@ -213,6 +213,63 @@ Item {
|
||||||
popup.open();
|
popup.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HiFiGlyphs {
|
||||||
|
id: errorsGlyph
|
||||||
|
visible: !AvatarPackagerCore.currentAvatarProject || AvatarPackagerCore.currentAvatarProject.hasErrors
|
||||||
|
text: hifi.glyphs.alert
|
||||||
|
size: 315
|
||||||
|
color: "#EA4C5F"
|
||||||
|
anchors {
|
||||||
|
top: parent.top
|
||||||
|
topMargin: -30
|
||||||
|
horizontalCenter: parent.horizontalCenter
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Image {
|
||||||
|
id: successGlyph
|
||||||
|
visible: AvatarPackagerCore.currentAvatarProject && !AvatarPackagerCore.currentAvatarProject.hasErrors
|
||||||
|
anchors {
|
||||||
|
top: parent.top
|
||||||
|
topMargin: 52
|
||||||
|
horizontalCenter: parent.horizontalCenter
|
||||||
|
}
|
||||||
|
width: 149.6
|
||||||
|
height: 149
|
||||||
|
source: "../../../icons/checkmark-stroke.svg"
|
||||||
|
}
|
||||||
|
|
||||||
|
RalewayRegular {
|
||||||
|
id: doctorStatusMessage
|
||||||
|
|
||||||
|
states: [
|
||||||
|
State {
|
||||||
|
when: AvatarPackagerCore.currentAvatarProject && !AvatarPackagerCore.currentAvatarProject.hasErrors
|
||||||
|
name: "noErrors"
|
||||||
|
PropertyChanges {
|
||||||
|
target: doctorStatusMessage
|
||||||
|
text: "Your avatar looks fine."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
State {
|
||||||
|
when: !AvatarPackagerCore.currentAvatarProject || AvatarPackagerCore.currentAvatarProject.hasErrors
|
||||||
|
name: "errors"
|
||||||
|
PropertyChanges {
|
||||||
|
target: doctorStatusMessage
|
||||||
|
text: "Your avatar has a few issues."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
color: 'white'
|
||||||
|
size: 20
|
||||||
|
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.top: errorsGlyph.bottom
|
||||||
|
|
||||||
|
wrapMode: Text.Wrap
|
||||||
|
}
|
||||||
|
|
||||||
RalewayRegular {
|
RalewayRegular {
|
||||||
id: infoMessage
|
id: infoMessage
|
||||||
|
|
||||||
|
@ -240,7 +297,7 @@ Item {
|
||||||
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.top: parent.top
|
anchors.top: doctorStatusMessage.bottom
|
||||||
|
|
||||||
anchors.bottomMargin: 24
|
anchors.bottomMargin: 24
|
||||||
|
|
||||||
|
@ -249,6 +306,53 @@ Item {
|
||||||
text: "You can upload your files to our servers to always access them, and to make your avatar visible to other users."
|
text: "You can upload your files to our servers to always access them, and to make your avatar visible to other users."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RalewayRegular {
|
||||||
|
id: notForSaleMessage
|
||||||
|
|
||||||
|
visible: root.hasSuccessfullyUploaded
|
||||||
|
|
||||||
|
color: 'white'
|
||||||
|
linkColor: '#00B4EF'
|
||||||
|
size: 20
|
||||||
|
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.top: infoMessage.bottom
|
||||||
|
anchors.topMargin: 10
|
||||||
|
|
||||||
|
anchors.bottomMargin: 24
|
||||||
|
|
||||||
|
wrapMode: Text.Wrap
|
||||||
|
text: "This item is not for sale yet, <a href='#'>learn more</a>."
|
||||||
|
|
||||||
|
onLinkActivated: {
|
||||||
|
Qt.openUrlExternally("https://docs.highfidelity.com/sell/add-item/upload-avatar.html");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RalewayRegular {
|
||||||
|
id: showErrorsLink
|
||||||
|
|
||||||
|
color: 'white'
|
||||||
|
linkColor: '#00B4EF'
|
||||||
|
|
||||||
|
visible: AvatarPackagerCore.currentAvatarProject && AvatarPackagerCore.currentAvatarProject.hasErrors
|
||||||
|
|
||||||
|
anchors {
|
||||||
|
top: notForSaleMessage.bottom
|
||||||
|
topMargin: 16
|
||||||
|
horizontalCenter: parent.horizontalCenter
|
||||||
|
}
|
||||||
|
|
||||||
|
size: 28
|
||||||
|
|
||||||
|
text: "<a href='toggle'>View all errors</a>"
|
||||||
|
|
||||||
|
onLinkActivated: {
|
||||||
|
avatarPackager.state = AvatarPackagerState.avatarDoctorErrorReport;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
HifiControls.Button {
|
HifiControls.Button {
|
||||||
id: openFolderButton
|
id: openFolderButton
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,10 @@ public:
|
||||||
return QDir::cleanPath(QDir(_projectPath).absoluteFilePath(_fst->getModelPath()));
|
return QDir::cleanPath(QDir(_projectPath).absoluteFilePath(_fst->getModelPath()));
|
||||||
}
|
}
|
||||||
Q_INVOKABLE bool getHasErrors() const { return _hasErrors; }
|
Q_INVOKABLE bool getHasErrors() const { return _hasErrors; }
|
||||||
Q_INVOKABLE void setHasErrors(bool hasErrors) { _hasErrors = hasErrors; }
|
Q_INVOKABLE void setHasErrors(bool hasErrors) {
|
||||||
|
_hasErrors = hasErrors;
|
||||||
|
emit hasErrorsChanged();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns the AvatarProject or a nullptr on failure.
|
* returns the AvatarProject or a nullptr on failure.
|
||||||
|
|
Loading…
Reference in a new issue