Commit graph

317 commits

Author SHA1 Message Date
Remco Burema
e3d90f16a1
Close new marketplace window when signing out or in
Because otherwise you can either see plugins you might not have the rights to, or not see plugins you do have the rights to.

part of CURA-8556
2021-10-27 17:42:00 +02:00
Jaime van Kessel
7bbc91b7a5 Clear contents of net marketplace if window is closed
CURA-8556
2021-10-27 16:11:02 +02:00
Ghostkeeper
2d434a02e3
Align horizontal position of label to pixels
Contributes to issue CURA-8556.
2021-10-25 16:24:49 +02:00
Ghostkeeper
f14a512718
Use ListView instead of Column
The ListView works in mostly the same way, except it loads its contents asynchronously as they come into view.

Contributes to issue CURA-8556.
2021-10-25 16:17:23 +02:00
Ghostkeeper
77d1bebbdb
Put PackageList in Marketplace namespace
This way it's not available to the rest of Cura, especially since PackageList is not such an uncommon name. It could give name collisions. Moreover, the rest of Cura doesn't need to have a list of packages from the Marketplace, so it's better separation.

Contributes to issue CURA-8556.
2021-10-25 15:35:28 +02:00
Ghostkeeper
daf450142b
Implement error handling and showing error state
If an error occurs, the error message is stored in the list model, so that it can be shown with the list.

Contributes to issue CURA-8556.
2021-10-25 01:56:57 +02:00
Ghostkeeper
bca2f36186
Use states rather than individually switching properties
This is necessary because we'll add a fourth state here: An error state. This would get quite complex otherwise.

Contributes to issue CURA-8556.
2021-10-25 01:28:37 +02:00
Ghostkeeper
1ab677f5dd
Add state for when it's loading
This has a slight bug in that the icon will immediately change to an arrow once loading has completed, but will slowly rotate back to angle 0. You don't see this, since the new plug-ins will come in between. The new plug-ins will always be a full page, or otherwise the icon disappears altogether and it's not visible anyway. But if you hold down the scrollbar while loading and quickly scroll down when loading completed, you can see this happen. I don't think anyone will really mind though.

Contributes to issue CURA-8556.
2021-10-21 18:37:02 +02:00
Ghostkeeper
e3cd5606f0
Make load more button load more packages
This adds the functionality of the button.

Contributes to issue CURA-8556.
2021-10-21 18:26:29 +02:00
Ghostkeeper
46ad1ad077
Add disabled state for load more button
Can't click on the button then.

Contributes to issue CURA-8556.
2021-10-21 18:25:33 +02:00
Ghostkeeper
35ec8f7190
Add basic layout for button to load more packages
Contributes to issue CURA-8556.
2021-10-21 18:06:52 +02:00
Ghostkeeper
1320d8c9f4
Add a simplistic design for a card for each package
It just displays the package name for now.

Contributes to issue CURA-8556.
2021-10-21 17:09:12 +02:00
Ghostkeeper
b585c02207
Add background to page content, and restructure margins
To display the background across the entire bottom side and not with the margins of the column, we have to restructure where the margins are a bit.

Contributes to issue CURA-8556.
2021-10-21 16:35:54 +02:00
Ghostkeeper
38038b3752
Store items directly in listModel when parsing them
No need to use a custom list in Python and update the ListModel from that. This is much simpler and more efficient.

Contributes to issue CURA-8556.
2021-10-21 16:10:23 +02:00
Ghostkeeper
3138452f94
Allow PackageList to be used as a model from QML
QML is leading here and holding the pointers for creation and destruction.

Contributes to issue CURA-8556.
2021-10-21 15:46:46 +02:00
Ghostkeeper
97edf59660
High-level layout of Marketplace window
Currently just a title and a page. The title is separate because in between there will be the tabs selecting which page is shown. The title will also change depending on that, but that'll have to be implemented separately. The page is loaded with a loader to make it efficient, and also to make it extensible when the tabs get implemented in a follow-up ticket.

Contributes to issue CURA-8556.
2021-10-19 16:50:57 +02:00
Ghostkeeper
5897b3de38
Add function to open Marketplace window
This will now load in a QML file, cache it, and create an empty window with the title 'Marketplace'.

Contributes to issue CURA-8556.
2021-10-19 13:43:41 +02:00