Merge pull request #58 from ctrlaltdavid/fix/avatar-packager-update

Update Avatar Packager
This commit is contained in:
kasenvr 2020-01-07 22:43:34 -05:00 committed by GitHub
commit 19bca588ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 96 additions and 55 deletions

View file

@ -229,7 +229,7 @@ Item {
}
function openDocs() {
Qt.openUrlExternally("https://docs.highfidelity.com/create/avatars/package-avatar.html");
Qt.openUrlExternally("https://docs.projectathena.dev/create/avatars/package-avatar.html");
}
function openVideo() {

View file

@ -128,6 +128,8 @@ ShadowRectangle {
}
}
// FIXME: Link to a Project Athena version of the video.
/*
RalewayButton {
id: video
visible: false
@ -141,6 +143,12 @@ ShadowRectangle {
onClicked: videoButtonClicked()
}
*/
// Temporary placeholder for video button.
Rectangle {
id: video
visible: false
}
RalewayButton {
id: docs

View file

@ -44,7 +44,11 @@ Item {
HifiControls.Button {
id: uploadButton
// FIXME: Re-enable if ability to upload to hosted location is added.
/*
visible: AvatarPackagerCore.currentAvatarProject && !AvatarPackagerCore.currentAvatarProject.fst.hasMarketplaceID && !root.hasSuccessfullyUploaded
*/
visible: false
enabled: Account.loggedIn
anchors.verticalCenter: parent.verticalCenter
@ -62,7 +66,11 @@ Item {
HifiControls.Button {
id: updateButton
// FIXME: Re-enable if ability to upload to hosted location is added.
/*
visible: AvatarPackagerCore.currentAvatarProject && AvatarPackagerCore.currentAvatarProject.fst.hasMarketplaceID && !root.hasSuccessfullyUploaded
*/
visible: false
enabled: Account.loggedIn
anchors.verticalCenter: parent.verticalCenter
@ -79,7 +87,12 @@ Item {
}
Item {
anchors.fill: parent
// FIXME: Re-enable if ability to upload to hosted location is added.
/*
visible: root.hasSuccessfullyUploaded
*/
visible: false;
HifiControls.Button {
enabled: Account.loggedIn
@ -115,6 +128,22 @@ Item {
onClicked: AvatarPackagerCore.currentAvatarProject.openInInventory()
}
}
// FIXME: Remove if "Upload" button is reinstated.
HifiControls.Button {
id: openDirectoryButton
visible: AvatarPackagerCore.currentAvatarProject
enabled: true
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
text: qsTr("Open Project Folder")
color: hifi.buttons.blue
colorScheme: root.colorScheme
width: 200
height: 40
onClicked: {
fileDialogHelper.openDirectory(fileDialogHelper.pathToUrl(AvatarPackagerCore.currentAvatarProject.projectFolderPath));
}
}
}
Rectangle {
@ -263,13 +292,58 @@ Item {
color: 'white'
size: 20
anchors.left: parent.left
anchors.right: parent.right
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: errorsGlyph.bottom
wrapMode: Text.Wrap
}
RalewayRegular {
id: notForSaleMessage
visible: root.hasSuccessfullyUploaded
color: 'white'
linkColor: '#00B4EF'
size: 20
anchors.left: parent.left
anchors.right: parent.right
anchors.top: doctorStatusMessage.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.projectathena.dev/sell/add-item/upload-avatar.html");
}
}
RalewayRegular {
id: showErrorsLink
color: 'white'
linkColor: '#00B4EF'
visible: AvatarPackagerCore.currentAvatarProject && AvatarPackagerCore.currentAvatarProject.hasErrors
anchors {
top: notForSaleMessage.bottom
horizontalCenter: parent.horizontalCenter
}
size: 28
text: "<a href='toggle'>View all errors</a>"
onLinkActivated: {
avatarPackager.state = AvatarPackagerState.avatarDoctorErrorReport;
}
}
RalewayRegular {
id: infoMessage
@ -297,60 +371,14 @@ Item {
anchors.left: parent.left
anchors.right: parent.right
anchors.top: doctorStatusMessage.bottom
anchors.bottom: showFilesText.top
anchors.bottomMargin: 24
wrapMode: Text.Wrap
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.visible ? notForSaleMessage.bottom : infoMessage .bottom
bottom: showFilesText.top
horizontalCenter: parent.horizontalCenter
}
size: 28
text: "<a href='toggle'>View all errors</a>"
onLinkActivated: {
avatarPackager.state = AvatarPackagerState.avatarDoctorErrorReport;
}
// FIXME: Restore original text if ability to upload to hosted location is added.
//text: "You can upload your files to our servers to always access them, and to make your avatar visible to other users."
text: "Your files are ready to be uploaded to a server to make your avatar visible to other users."
}
HifiControls.Button {
@ -389,8 +417,13 @@ Item {
Rectangle {
id: loginRequiredMessage
// FIXME: Re-enable if ability to upload to hosted location is added.
/*
visible: !Account.loggedIn
height: !Account.loggedIn ? loginRequiredTextRow.height + 20 : 0
*/
visible: false
height: 0
anchors {
bottom: parent.bottom

View file

@ -55,7 +55,7 @@ static QStringList HAND_MAPPING_SUFFIXES = {
"HandThumb1",
};
const QUrl PACKAGE_AVATAR_DOCS_BASE_URL = QUrl("https://docs.highfidelity.com/create/avatars/package-avatar.html");
const QUrl PACKAGE_AVATAR_DOCS_BASE_URL = QUrl("https://docs.projectathena.dev/create/avatars/package-avatar.html");
AvatarDoctor::AvatarDoctor(const QUrl& avatarFSTFileUrl) :
_avatarFSTFileUrl(avatarFSTFileUrl) {

View file

@ -95,7 +95,7 @@ public:
static bool isValidNewProjectName(const QString& projectPath, const QString& projectName);
static QString getDefaultProjectsPath() {
return QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation) + "/High Fidelity Projects";
return QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation) + "/Project Athena Projects";
}
signals: