mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-22 21:59:37 +08:00
Replace text and image if there's no projects due to search
It's a bit weird if it shows that you didn't add any projects yet if you just type in a gibberish search keyword. Contributes to issue CURA-8009.
This commit is contained in:
parent
13ca30ed98
commit
1566a282dc
@ -0,0 +1,62 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 378.13 348.13">
|
||||
<defs>
|
||||
<style>
|
||||
.cls-2,.cls-6{fill:#c5dbfb;}
|
||||
.cls-3,.cls-5,.cls-8{fill:#fff;}
|
||||
.cls-3{stroke:#c5dbfb;}
|
||||
.cls-10,.cls-3,.cls-4,.cls-6,.cls-7,.cls-8{stroke-miterlimit:10;stroke-width:2px;}
|
||||
.cls-4,.cls-7{fill:#f3f8fe;}
|
||||
.cls-4{stroke:#f3f8fe;}
|
||||
.cls-6,.cls-7,.cls-8{stroke:#061884;}
|
||||
.cls-10{fill:#196ef0;stroke:#196ef0;}
|
||||
.cls-11{fill:#061884;}
|
||||
</style>
|
||||
<clipPath id="clip-path">
|
||||
<circle fill="none" cx="155" cy="125" r="80" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
<path class="cls-2" d="M43,17V3H83a2,2,0,0,1,2,2V17Z" />
|
||||
<path class="cls-3" d="M3,1H40L56,17H87a2,2,0,0,1,2,2V67a2,2,0,0,1-2,2H3a2,2,0,0,1-2-2V3A2,2,0,0,1,3,1Z" />
|
||||
<path class="cls-2" d="M153,17V3h40a2,2,0,0,1,2,2V17Z" />
|
||||
<path class="cls-3" d="M113,1h37l16,16h31a2,2,0,0,1,2,2V67a2,2,0,0,1-2,2H113a2,2,0,0,1-2-2V3A2,2,0,0,1,113,1Z" />
|
||||
<path class="cls-2" d="M263,17V3h40a2,2,0,0,1,2,2V17Z" />
|
||||
<path class="cls-3" d="M223,1h37l16,16h31a2,2,0,0,1,2,2V67a2,2,0,0,1-2,2H223a2,2,0,0,1-2-2V3A2,2,0,0,1,223,1Z" />
|
||||
<path class="cls-2" d="M43,107V93H83a2,2,0,0,1,2,2v12Z" />
|
||||
<path class="cls-3" d="M3,91H40l16,16H87a2,2,0,0,1,2,2v48a2,2,0,0,1-2,2H3a2,2,0,0,1-2-2V93A2,2,0,0,1,3,91Z" />
|
||||
<path class="cls-4" d="M153,107V93h40a2,2,0,0,1,2,2v12Z" />
|
||||
<path class="cls-3" d="M113,91h37l16,16h31a2,2,0,0,1,2,2v48a2,2,0,0,1-2,2H113a2,2,0,0,1-2-2V93A2,2,0,0,1,113,91Z" />
|
||||
<path class="cls-2" d="M263,107V93h40a2,2,0,0,1,2,2v12Z" />
|
||||
<path class="cls-3" d="M223,91h37l16,16h31a2,2,0,0,1,2,2v48a2,2,0,0,1-2,2H223a2,2,0,0,1-2-2V93A2,2,0,0,1,223,91Z" />
|
||||
<path class="cls-2" d="M43,197V183H83a2,2,0,0,1,2,2v12Z" />
|
||||
<path class="cls-3" d="M3,181H40l16,16H87a2,2,0,0,1,2,2v48a2,2,0,0,1-2,2H3a2,2,0,0,1-2-2V183A2,2,0,0,1,3,181Z" />
|
||||
<path class="cls-4" d="M153,197V183h40a2,2,0,0,1,2,2v12Z" />
|
||||
<path class="cls-3" d="M113,181h37l16,16h31a2,2,0,0,1,2,2v48a2,2,0,0,1-2,2H113a2,2,0,0,1-2-2V183A2,2,0,0,1,113,181Z" />
|
||||
<path class="cls-2" d="M263,197V183h40a2,2,0,0,1,2,2v12Z" />
|
||||
<path class="cls-3" d="M223,181h37l16,16h31a2,2,0,0,1,2,2v48a2,2,0,0,1-2,2H223a2,2,0,0,1-2-2V183A2,2,0,0,1,223,181Z" />
|
||||
<circle class="cls-5" cx="155" cy="125" r="100" />
|
||||
<path class="cls-6" d="M351.12,322.62h20a10,10,0,0,1,10,10v7a0,0,0,0,1,0,0h-40a0,0,0,0,1,0,0v-7A10,10,0,0,1,351.12,322.62Z" transform="translate(850.61 309.91) rotate(135)" />
|
||||
<rect class="cls-7" x="293.75" y="225.25" width="40" height="117" transform="translate(-108.74 304.96) rotate(-45)" />
|
||||
<polyline class="cls-7" points="213.69 199.25 252.58 238.14 267.43 223.29 228.54 184.4" />
|
||||
<circle class="cls-8" cx="155" cy="125" r="95" />
|
||||
<circle class="cls-8" cx="155" cy="125" r="85" />
|
||||
<path class="cls-6" d="M256.37,227.87h20a10,10,0,0,1,10,10v7a0,0,0,0,1,0,0h-40a0,0,0,0,1,0,0v-7a10,10,0,0,1,10-10Z" transform="translate(-89.12 257.58) rotate(-45)" />
|
||||
<g clip-path="url(#clip-path)">
|
||||
<path class="cls-10" d="M43,17V3H83a2,2,0,0,1,2,2V17Z" />
|
||||
<path class="cls-8" d="M3,1H40L56,17H87a2,2,0,0,1,2,2V67a2,2,0,0,1-2,2H3a2,2,0,0,1-2-2V3A2,2,0,0,1,3,1Z" />
|
||||
<path class="cls-10" d="M153,17V3h40a2,2,0,0,1,2,2V17Z" />
|
||||
<path class="cls-8" d="M113,1h37l16,16h31a2,2,0,0,1,2,2V67a2,2,0,0,1-2,2H113a2,2,0,0,1-2-2V3A2,2,0,0,1,113,1Z" />
|
||||
<path class="cls-10" d="M263,17V3h40a2,2,0,0,1,2,2V17Z" />
|
||||
<path class="cls-8" d="M223,1h37l16,16h31a2,2,0,0,1,2,2V67a2,2,0,0,1-2,2H223a2,2,0,0,1-2-2V3A2,2,0,0,1,223,1Z" />
|
||||
<path class="cls-10" d="M43,107V93H83a2,2,0,0,1,2,2v12Z" />
|
||||
<path class="cls-8" d="M3,91H40l16,16H87a2,2,0,0,1,2,2v48a2,2,0,0,1-2,2H3a2,2,0,0,1-2-2V93A2,2,0,0,1,3,91Z" />
|
||||
<path class="cls-10" d="M263,107V93h40a2,2,0,0,1,2,2v12Z" />
|
||||
<path class="cls-8" d="M223,91h37l16,16h31a2,2,0,0,1,2,2v48a2,2,0,0,1-2,2H223a2,2,0,0,1-2-2V93A2,2,0,0,1,223,91Z" />
|
||||
<path class="cls-10" d="M43,197V183H83a2,2,0,0,1,2,2v12Z" />
|
||||
<path class="cls-8" d="M3,181H40l16,16H87a2,2,0,0,1,2,2v48a2,2,0,0,1-2,2H3a2,2,0,0,1-2-2V183A2,2,0,0,1,3,181Z" />
|
||||
<path class="cls-10" d="M153,197V183h40a2,2,0,0,1,2,2v12Z" />
|
||||
<path class="cls-8" d="M113,181h37l16,16h31a2,2,0,0,1,2,2v48a2,2,0,0,1-2,2H113a2,2,0,0,1-2-2V183A2,2,0,0,1,113,181Z" />
|
||||
<path class="cls-10" d="M263,197V183h40a2,2,0,0,1,2,2v12Z" />
|
||||
<path class="cls-8" d="M223,181h37l16,16h31a2,2,0,0,1,2,2v48a2,2,0,0,1-2,2H223a2,2,0,0,1-2-2V183A2,2,0,0,1,223,181Z" />
|
||||
<path class="cls-11" d="M149.18,133.69v-3.48a14.36,14.36,0,0,1,1.74-7.25,20.17,20.17,0,0,1,6.4-6.17A25.87,25.87,0,0,0,163,112a7,7,0,0,0,1.48-4.34,4.13,4.13,0,0,0-1.93-3.62,9,9,0,0,0-5.14-1.3,24.94,24.94,0,0,0-7.34,1.16,45.2,45.2,0,0,0-7.78,3.31l-5.37-10.64a48.41,48.41,0,0,1,9.89-4.21,40.25,40.25,0,0,1,11.67-1.61q9.57,0,14.9,4.43a14.16,14.16,0,0,1,5.32,11.41,15.41,15.41,0,0,1-2.55,9,30.38,30.38,0,0,1-7.92,7.34A32.11,32.11,0,0,0,163,127.3a5.91,5.91,0,0,0-1.34,4v2.41Zm-1.61,15.12q0-4.38,2.46-6.12a10,10,0,0,1,5.95-1.75,9.69,9.69,0,0,1,5.77,1.75q2.46,1.74,2.46,6.12,0,4.22-2.46,6a9.42,9.42,0,0,1-5.77,1.84,9.69,9.69,0,0,1-5.95-1.84Q147.57,153,147.57,148.81Z" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 5.1 KiB |
@ -93,7 +93,7 @@ Item
|
||||
{
|
||||
id: digitalFactoryImage
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
source: "../images/digital_factory.svg"
|
||||
source: searchBar.text === "" ? "../images/digital_factory.svg" : "../images/projects_not_found.svg"
|
||||
fillMode: Image.PreserveAspectFit
|
||||
width: parent.width - 2 * UM.Theme.getSize("thick_margin").width
|
||||
sourceSize.width: width
|
||||
@ -104,7 +104,7 @@ Item
|
||||
{
|
||||
id: noLibraryProjectsLabel
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: "It appears that you don't have any projects in the Library yet."
|
||||
text: searchBar.text === "" ? "It appears that you don't have any projects in the Library yet." : "No projects found that match the search query."
|
||||
font: UM.Theme.getFont("medium")
|
||||
}
|
||||
|
||||
@ -114,6 +114,7 @@ Item
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: "Visit Digital Library"
|
||||
onClicked: Qt.openUrlExternally(CuraApplication.ultimakerDigitalFactoryUrl + "/app/library")
|
||||
visible: searchBar.text === "" //Show the link to Digital Library when there are no projects in the user's Library.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user