mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 23:15:52 +08:00
Display different content on each of the marketplace onboarding banners
This commit is contained in:
parent
9a1fbd54b0
commit
5e4f67c7e1
@ -10,6 +10,7 @@ import UM 1.4 as UM
|
|||||||
Packages
|
Packages
|
||||||
{
|
{
|
||||||
pageTitle: catalog.i18nc("@header", "Manage packages")
|
pageTitle: catalog.i18nc("@header", "Manage packages")
|
||||||
|
bannerType: "__MANAGE_PACKAGES__"
|
||||||
model: Marketplace.LocalPackageList
|
model: Marketplace.LocalPackageList
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ import Marketplace 1.0 as Marketplace
|
|||||||
Packages
|
Packages
|
||||||
{
|
{
|
||||||
pageTitle: catalog.i18nc("@header", "Install Materials")
|
pageTitle: catalog.i18nc("@header", "Install Materials")
|
||||||
|
bannerType: "__MATERIALS__"
|
||||||
model: Marketplace.RemotePackageList
|
model: Marketplace.RemotePackageList
|
||||||
{
|
{
|
||||||
packageTypeFilter: "material"
|
packageTypeFilter: "material"
|
||||||
|
@ -11,6 +11,8 @@ import Cura 1.6 as Cura
|
|||||||
// Onboarding banner.
|
// Onboarding banner.
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
|
property var bannerType
|
||||||
|
|
||||||
Layout.preferredHeight: childrenRect.height + 2 * UM.Theme.getSize("default_margin").height
|
Layout.preferredHeight: childrenRect.height + 2 * UM.Theme.getSize("default_margin").height
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
@ -39,7 +41,14 @@ Rectangle
|
|||||||
{
|
{
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: UM.Theme.getColor("primary_text")
|
color: UM.Theme.getColor("primary_text")
|
||||||
source: UM.Theme.getIcon("Shop")
|
source: {
|
||||||
|
switch (bannerType) {
|
||||||
|
case "__PLUGINS__" : return UM.Theme.getIcon("Shop");
|
||||||
|
case "__MATERIALS__" : return UM.Theme.getIcon("Spool");
|
||||||
|
case "__MANAGE_PACKAGES__" : return UM.Theme.getIcon("ArrowDoubleCircleRight");
|
||||||
|
default: return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,6 +83,13 @@ Rectangle
|
|||||||
font: UM.Theme.getFont("medium")
|
font: UM.Theme.getFont("medium")
|
||||||
color: UM.Theme.getColor("primary_text")
|
color: UM.Theme.getColor("primary_text")
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
text: catalog.i18nc("@text", "Streamline your workflow and customize your Ultimaker Cura experience with plugins contributed by our amazing community of users.")
|
text: {
|
||||||
|
switch (bannerType) {
|
||||||
|
case "__PLUGINS__" : return catalog.i18nc("@text", "Streamline your workflow and customize your Ultimaker Cura experience with plugins contributed by our amazing community of users.");
|
||||||
|
case "__MATERIALS__" : return catalog.i18nc("@text", "Select and install material profiles optimised for your Ultimaker 3D printers.");
|
||||||
|
case "__MANAGE_PACKAGES__" : return catalog.i18nc("@text", "Manage your Ultimaker Cura plugins and material profiles here. Make sure to keep your plugins up to date and backup your setup regularly.");
|
||||||
|
default: return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -6,6 +6,7 @@ import Marketplace 1.0 as Marketplace
|
|||||||
Packages
|
Packages
|
||||||
{
|
{
|
||||||
pageTitle: catalog.i18nc("@header", "Install Plugins")
|
pageTitle: catalog.i18nc("@header", "Install Plugins")
|
||||||
|
bannerType: "__PLUGINS__"
|
||||||
model: Marketplace.RemotePackageList
|
model: Marketplace.RemotePackageList
|
||||||
{
|
{
|
||||||
packageTypeFilter: "plugin"
|
packageTypeFilter: "plugin"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user