aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui
AgeCommit message (Collapse)Author
2023-01-13fix(RD): don't assert search offset on fetchMore() in ResourceModelflow
This allows the standard QAbstractItemModelTester to work without shenanigans! Signed-off-by: flow <flowlnlnln@gmail.com>
2023-01-13refactor: change some ResourceAPI from NetJob to Taskflow
This makes it easier to create resource apis that aren't network-based. Signed-off-by: flow <flowlnlnln@gmail.com>
2023-01-13refactor(RD): move BaseInstance dep. to subclasses of ResourceModelflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2023-01-13fix(RD): correctly set the strings for the specific resource namesflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2023-01-13refactor(RD): move success callbacks from ModModel to ResourceModelflow
While implementing the resource pack downloader in another branch, I noticed that most of the code in the success callback was identical in both cases, safe for a few minute differences in strings. So, this tries to make it easier to share this piece of code. However, it still leaves the possibility of extending the methods in ResourceModel to accomodate for cases where this similarity may not hold. Signed-off-by: flow <flowlnlnln@gmail.com>
2023-01-13refactor(RD): add helper in ResourceModel to find current sortingflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2023-01-13fix(RD): separate search and versions/info tasksflow
This allows us to check whether a search request is already on-going, in which case we don't need to make another one (and shouldn't). Signed-off-by: flow <flowlnlnln@gmail.com>
2023-01-13fix(RD): pass copy of IndexedPack to callbacks instead of ref.flow
This prevents a crash in which the pack list gets updated in a search request meanwhile a versions / extra info request is being processed. Previously, this situation would cause the reference in the latter callbacks to be invalidated by an internal relocation of the pack list. Signed-off-by: flow <flowlnlnln@gmail.com>
2023-01-13refactor(RD): clear up sorting methodsflow
This refactors the sorting methods to join every bit of it into a single list, easing maintanance. It also removes the weird index contraint on the list of methods by adding an index field to the DS that holds the method. Lastly, it puts the available methods on their respective API, so other resources on the same API can re-use them later on. Signed-off-by: flow <flowlnlnln@gmail.com>
2023-01-13fix: build with qt5.12 on Linux and pedantic flagflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2023-01-13feat(RD): add roleNames and Q_PROPERTY to ResourceModelflow
in preparation for QML interop. Signed-off-by: flow <flowlnlnln@gmail.com>
2023-01-13refactor(RD): decouple ResourceModels from ResourcePagesflow
This makes it so that we don't need a reference to the parent page in the model. It will be useful once we change the page from a widget-based one to a QML page. It also makes tasks be created in the dialog instead of the page, so that the dialog can also have the necessary information to mark versions as selected / deselected easily. It also makes the task pointers into smart pointers. Signed-off-by: flow <flowlnlnln@gmail.com>
2023-01-13refactor(RD): unify download dialogs into a single fileflow
No need for multiple files since the subclasses are so small now Signed-off-by: flow <flowlnlnln@gmail.com>
2023-01-13fix(RD): prevent weird behavior of progress widgetflow
when i.e. clicking on links or just using the downloader at all, this prevents some flickering and the widget never getting hidden in some cases. Signed-off-by: flow <flowlnlnln@gmail.com>
2023-01-13refactor: put resource downloading classes in common namespaceflow
Puts them all inside the 'ResourceDownload' namespace, so that it's a bit clearer from the outside that those belong to the same 'module'. Signed-off-by: flow <flowlnlnln@gmail.com>
2023-01-13refactor: generalize mod models and APIs to resourcesflow
Firstly, this abstract away behavior in the mod download models that can also be applied to other types of resources into a superclass, allowing other resource types to be implemented without so much code duplication. For that, this also generalizes the APIs used (currently, ModrinthAPI and FlameAPI) to be able to make requests to other types of resources. It also does a general cleanup of both of those. In particular, this makes use of std::optional instead of invalid values for errors and, well, optional values :p This is a squash of some commits that were becoming too interlaced together to be cleanly separated. Signed-off-by: flow <flowlnlnln@gmail.com>
2023-01-13Merge pull request #714 from redstrate/cmarkflow
2023-01-12refactor: replace hoedown markdown parser with cmarkJoshua Goins
Signed-off-by: Joshua Goins <josh@redstrate.com>
2023-01-10Add hint about CatTayou
Signed-off-by: Tayou <tayou@gmx.net>
2023-01-10fix: set minimum size for setup wizardSefa Eyeoglu
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2023-01-10CRLF -> LFTayou
damn you visual studio for creating CRLF files everywhere... Signed-off-by: Tayou <tayou@gmx.net>
2023-01-10Update launcher/Application.cpp with suggestion from scrumplexTayou
Co-authored-by: Sefa Eyeoglu <contact@scrumplex.net> Signed-off-by: Tayou <tayou@gmx.net>
2023-01-10Implement Suggestions from flow & ScrumplexTayou
Signed-off-by: Tayou <tayou@gmx.net>
2023-01-10UX tweak + formatting + added cat to wizardTayou
Signed-off-by: Tayou <tayou@gmx.net>
2023-01-10add theme setup wizardTayou
Signed-off-by: Tayou <tayou@gmx.net>
2023-01-10Merge pull request #726 from TheLastRar/qt6-win-darkmodeSefa Eyeoglu
Closes https://github.com/PrismLauncher/PrismLauncher/issues/158
2023-01-09ui: Let Qt 6.4.2 handle dark mode titlebarTheLastRar
Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
2023-01-09Merge pull request #715 from getchoo/add-teawieSefa Eyeoglu
2023-01-06feat: add teawieseth
drawn by sympathytea (https://github.com/SympathyTea) Signed-off-by: seth <getchoo@tuta.io>
2023-01-06Strip certain HTML tags when rendering mod pagesJoshua Goins
Some mod pages use certain tags for centering purposes, but trips up hoedown. Signed-off-by: Joshua Goins <josh@redstrate.com>
2022-12-30Merge pull request #626 from leo78913/mods-provider-columnflow
closes https://github.com/PrismLauncher/PrismLauncher/issues/402
2022-12-29feat(Mods): hide 'Provider' column when no mods have providersflow
This makes the mod list look a bit less polluted in the common case of mods having no provider whatsoever. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-12-26Merge pull request #618 from TheKodeToad/safer-destructive-actionsSefa Eyeoglu
Fixes https://github.com/PolyMC/PolyMC/issues/948
2022-12-26Use optional instead of hardcoded cancelled stringTheKodeToad
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-12-26About to -> you are about toTheKodeToad
You're is used in some other places but im lazy Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-12-24Make requested changesTheKodeToad
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-12-17Merge pull request #630 from leo78913/yeet-scrollbarsflow
2022-12-17let the theme decide the notes page right marginleo78913
Signed-off-by: leo78913 <leo3758@riseup.net>
2022-12-15fix: only show scrollbars when neededleo78913
Signed-off-by: leo78913 <leo3758@riseup.net>
2022-12-15Merge pull request #605 from flowln/fix_crash_in_downloader_imageflow
Fixes https://github.com/PrismLauncher/PrismLauncher/issues/590
2022-12-14Merge pull request #561 from leo78913/iconpicker-stuffSefa Eyeoglu
closes https://github.com/PrismLauncher/PrismLauncher/issues/494
2022-12-14Add confirmation on customised componentsTheKodeToad
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-12-14Improve handling of destructive actionsTheKodeToad
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-12-14move cat to bottom rightDioEgizio
Signed-off-by: DioEgizio <83089242+DioEgizio@users.noreply.github.com>
2022-12-13Merge pull request #601 from Scrumplex/fix-translations-3flow
2022-12-13fix: update source stringsSefa Eyeoglu
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-12-12fix: bind image fetch callback lambda to the parent objectflow
Fixes a possible crash with the callback being called after the image object was already deleted. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-12-12fix(ManagedPackPage): crash with GTK2 theme due to QProxyStyleflow
Seemingly related issue: https://bugreports.qt.io/browse/QTBUG-49940 Signed-off-by: flow <flowlnlnln@gmail.com>
2022-12-12Fix: Reset stylesheet before setting styleTheLastRar
Resolves #510 Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
2022-12-11fix: remove leftover TODODioEgizio
Signed-off-by: DioEgizio <83089242+DioEgizio@users.noreply.github.com>