mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -06:00
Merge pull request #6988 from Ultimaker/CURA-7071
CURA-7071/Added option to redirect to Web MP from Cura MP
This commit is contained in:
commit
35903e7dd3
7 changed files with 95 additions and 28 deletions
|
@ -16,6 +16,7 @@ from UM.i18n import i18nCatalog
|
|||
from UM.Version import Version
|
||||
|
||||
from cura import ApplicationMetadata
|
||||
|
||||
from cura.CuraApplication import CuraApplication
|
||||
from cura.Machines.ContainerTree import ContainerTree
|
||||
|
||||
|
@ -31,6 +32,13 @@ if TYPE_CHECKING:
|
|||
|
||||
i18n_catalog = i18nCatalog("cura")
|
||||
|
||||
DEFAULT_MARKETPLACE_ROOT = "https://marketplace.ultimaker.com" # type: str
|
||||
|
||||
try:
|
||||
from cura.CuraVersion import CuraMarketplaceRoot
|
||||
except ImportError:
|
||||
CuraMarketplaceRoot = DEFAULT_MARKETPLACE_ROOT
|
||||
|
||||
# todo Remove license and download dialog, use SyncOrchestrator instead
|
||||
|
||||
## Provides a marketplace for users to download plugins an materials
|
||||
|
@ -766,6 +774,13 @@ class Toolbox(QObject, Extension):
|
|||
def materialsGenericModel(self) -> PackagesModel:
|
||||
return self._materials_generic_model
|
||||
|
||||
@pyqtSlot(str, result = str)
|
||||
def getWebMarketplaceUrl(self, page: str) -> str:
|
||||
root = CuraMarketplaceRoot
|
||||
if root == "":
|
||||
root = DEFAULT_MARKETPLACE_ROOT
|
||||
return root + "/app/cura/" + page
|
||||
|
||||
# Filter Models:
|
||||
# --------------------------------------------------------------------------
|
||||
@pyqtSlot(str, str, str)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue