mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 23:16:06 +08:00
Load different pages of Marketplace depending on current tab
Feels intuitive actually, but if you think about it it's weird that the link should change depending on the tab that's next to it. Contributes to issue CURA-7071.
This commit is contained in:
parent
ad2b8f140e
commit
13644f7e41
@ -89,7 +89,15 @@ Item
|
|||||||
rightMargin: UM.Theme.getSize("default_margin").width
|
rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
onClicked: Qt.openUrlExternally(toolbox.getWebMarketplaceUrl)
|
onClicked:
|
||||||
|
{
|
||||||
|
let page = "plugins"; //Online page to go to on the Marketplace subdomain.
|
||||||
|
if(materialsTabButton.active)
|
||||||
|
{
|
||||||
|
page = "materials";
|
||||||
|
}
|
||||||
|
Qt.openUrlExternally(toolbox.getWebMarketplaceUrl(page));
|
||||||
|
}
|
||||||
UM.RecolorImage
|
UM.RecolorImage
|
||||||
{
|
{
|
||||||
id: cloudMarketplaceButton
|
id: cloudMarketplaceButton
|
||||||
|
@ -767,12 +767,12 @@ class Toolbox(QObject, Extension):
|
|||||||
def materialsGenericModel(self) -> PackagesModel:
|
def materialsGenericModel(self) -> PackagesModel:
|
||||||
return self._materials_generic_model
|
return self._materials_generic_model
|
||||||
|
|
||||||
@pyqtProperty(str, constant=True)
|
@pyqtSlot(str, result = str)
|
||||||
def getWebMarketplaceUrl(self) -> str:
|
def getWebMarketplaceUrl(self, page: str) -> str:
|
||||||
root = CuraMarketplaceRoot
|
root = CuraMarketplaceRoot
|
||||||
if root == "":
|
if root == "":
|
||||||
root = DEFAULT_MARKETPLACE_ROOT
|
root = DEFAULT_MARKETPLACE_ROOT
|
||||||
return root + "/app/cura/materials"
|
return root + "/app/cura/" + page
|
||||||
|
|
||||||
# Filter Models:
|
# Filter Models:
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user