mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-10 08:17:49 -06:00
Add login fequired link to packages that have the login-required tag
CURA-6006
This commit is contained in:
parent
62c5398933
commit
4e2ab163ed
2 changed files with 23 additions and 1 deletions
|
@ -40,6 +40,7 @@ class PackagesModel(ListModel):
|
|||
self.addRoleName(Qt.UserRole + 19, "tags")
|
||||
self.addRoleName(Qt.UserRole + 20, "links")
|
||||
self.addRoleName(Qt.UserRole + 21, "website")
|
||||
self.addRoleName(Qt.UserRole + 22, "login_required")
|
||||
|
||||
# List of filters for queries. The result is the union of the each list of results.
|
||||
self._filter = {} # type: Dict[str, str]
|
||||
|
@ -100,6 +101,7 @@ class PackagesModel(ListModel):
|
|||
"tags": package["tags"] if "tags" in package else [],
|
||||
"links": links_dict,
|
||||
"website": package["website"] if "website" in package else None,
|
||||
"login_required": "login-required" in package.get("tags", [])
|
||||
})
|
||||
|
||||
# Filter on all the key-word arguments.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue