Просмотр исходного кода

Easy navigation to Cloud marketplace

CURA-8563
casper 3 лет назад
Родитель
Сommit
d96ba0dcf3

+ 1 - 0
plugins/Marketplace/resources/qml/ManagedPackages.qml

@@ -19,6 +19,7 @@ Packages
         UM.Preferences.setValue("cura/market_place_show_manage_packages_banner", false);
         bannerVisible = false;
     }
+    searchInBrowserUrl: "https://marketplace.ultimaker.com/app/cura/plugins"
 
     model: Marketplace.LocalPackageList
     {

+ 11 - 0
plugins/Marketplace/resources/qml/Marketplace.qml

@@ -162,6 +162,17 @@ Window
                 }
             }
 
+            Cura.TertiaryButton
+            {
+                text: catalog.i18nc("@info", "Search in the browser")
+                iconSource: UM.Theme.getIcon("LinkExternal")
+
+                isIconOnRightSide: true
+                font: UM.Theme.getFont("default")
+
+                onClicked: content.item && Qt.openUrlExternally(content.item.searchInBrowserUrl)
+            }
+
             // Page contents.
             Rectangle
             {

+ 1 - 0
plugins/Marketplace/resources/qml/Materials.qml

@@ -16,6 +16,7 @@ Packages
         UM.Preferences.setValue("cura/market_place_show_material_banner", false);
         bannerVisible = false;
     }
+    searchInBrowserUrl: "https://marketplace.ultimaker.com/app/cura/materials"
 
     model: Marketplace.RemotePackageList
     {

+ 1 - 0
plugins/Marketplace/resources/qml/Packages.qml

@@ -11,6 +11,7 @@ ListView
     id: packages
 
     property string pageTitle
+    property string searchInBrowserUrl
     property bool bannerVisible
     property var bannerIcon
     property string bannerText

+ 1 - 0
plugins/Marketplace/resources/qml/Plugins.qml

@@ -16,6 +16,7 @@ Packages
         UM.Preferences.setValue("cura/market_place_show_plugin_banner", false)
         bannerVisible = false;
     }
+    searchInBrowserUrl: "https://marketplace.ultimaker.com/app/cura/plugins"
 
     model: Marketplace.RemotePackageList
     {