Commit Graph

73 Commits

Author SHA1 Message Date
flow
45d1319891
refactor(RD): decouple ResourceModels from ResourcePages
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-13 16:23:07 -03:00
flow
39b7ac90d4
refactor(RD): unify download dialogs into a single file
No need for multiple files since the subclasses are so small now

Signed-off-by: flow <flowlnlnln@gmail.com>
2023-01-13 16:23:06 -03:00
flow
433a802c6e
refactor: put resource downloading classes in common namespace
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-13 16:23:06 -03:00
flow
6a18079953
refactor: generalize mod models and APIs to resources
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-13 16:23:00 -03:00
flow
6f50809457
fix(FlamePage): don't assert / suggest blocked modpacks
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-12-06 17:00:35 -03:00
flow
1630a23fb0
refactor(InstanceImport): require rvalue from 'extra_info' mappings
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-12-06 17:00:34 -03:00
flow
968366c2ae
feat+fix: allow forwarding extra info to InstanceImportTask
This allows us to pass to the creation instances their actual pack ID
and version ID, that in Flame's case, are only available before starting
to create an instance.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-12-06 17:00:32 -03:00
TheLastRar
fce323b945 Check parent in rowCount/columnCount/canFetchMore
Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
2022-11-14 19:05:57 +00:00
flow
46a8e18841
Merge pull request #367 from TheKodeToad/linkjumping
fix https://github.com/PrismLauncher/PrismLauncher/issues/363
2022-11-10 08:08:44 -08:00
TheKodeToad
16e3b786fc Implement Scrumplex's suggestions
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-06 10:09:06 +00:00
flow
353b51f11e
refactor: move MMCStrings -> StringUtils
General utilities can go in here >:)

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-11-04 16:53:24 -03:00
TheKodeToad
b9547adce7 Add more license headers
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-01 17:02:24 +00:00
TheKodeToad
7f32c6464d Initial better mod browser link implementation
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-11-01 16:58:22 +00:00
forkiesassds
9b17cde019 CurseForge modpack page improvements
Signed-off-by: forkiesassds <icanttellyou@memeware.net>
2022-10-22 01:20:08 +03:00
Sefa Eyeoglu
4e08f28246
Merge pull request #31 from flowln/who_needs_webview 2022-10-19 14:28:29 +02:00
Sefa Eyeoglu
722194405a
refactor: initial rebrand
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-10-18 09:37:59 +02:00
flow
b2a5d8daf4
fix: don't include opted out versions with the 'Any' filter on the MD
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-10-12 10:26:14 -03:00
flow
db158a5735
feat: add image support for mod pages
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-10-08 14:11:20 -03:00
flow
42eb265624
refactor: create mod pages and filter widget by factory methods
This takes most expensive operations out of the constructors.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-07 08:29:58 -03:00
flow
6aaf1f4f21
feat: lazy-load CF mod descriptions
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-01 07:33:30 -03:00
flow
9a07ede615
fix: filter out opted-out mods in mod downloader
Maintains Pre-Updater behaviour

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:43 -03:00
Sefa Eyeoglu
3b4539de79
chore: update license headers
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-10 12:19:15 +02:00
flow
e5f6dc1b14
fix: aborts when using a Qt build with assertions enabled
Preventing undefined behaviour hooray! :D

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-03 12:44:19 -03:00
flow
145da82cd8
fix: show invalid version even when there's none
Having a blank instead of _anything_ is bad UX. Instead, even when
there's not a valid version (most likely disabled redistribution), we
show a message in the UI, to differentiate from the loading state.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-03 12:43:05 -03:00
flow
64776d6bac
feat+fix: cache Flame modpack versions
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-03 12:43:05 -03:00
DioEgizio
0fe4384067
Update launcher/ui/pages/modplatform/flame/FlamePage.ui
Co-authored-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-06-23 17:58:54 +02:00
DioEgizio
bdfcd0b99e chore(flame): reword warning 2022-06-23 17:06:49 +02:00
Ezekiel Smith
27239b2dde
Merge pull request #634 from flowln/donate_links
More links for CF / Modrinth mods / modpacks
2022-06-14 23:52:00 +10:00
timoreo22
699ad316f0
Rework curseforge download (#611)
* Use the bulk endpoint on mod resolution for faster download
* Search on modrinth for api blocked mods
* Display a dialog for manually downloading blocked mods
2022-05-28 21:53:12 +02:00
flow
e644380160
feat: add links to curseforge modpacks 2022-05-24 12:27:32 -03:00
Sefa Eyeoglu
29ef1e2c4b
Merge pull request #597 from Scrumplex/refactor-modloader-modapi 2022-05-22 13:17:53 +02:00
Sefa Eyeoglu
3b4b34b369
fix(ui): make CF and MR modpack dialogs more consistent 2022-05-20 22:48:42 +02:00
timoreo
6542f5f15a
Apply suggestions 2022-05-20 22:06:36 +02:00
timoreo
6afe59e76b
Very Temporary Fix for curseforge 2022-05-20 21:19:19 +02:00
Sefa Eyeoglu
943090db98
refactor: allow tracking multiple mod loaders 2022-05-19 08:49:27 +02:00
Ryan Cao
22f5128e39
adopt changes from #497 remapped 2022-05-08 15:22:50 +08:00
Sefa Eyeoglu
027c666265
Merge pull request #450 from Scrumplex/fix-quilt-mod-dl 2022-04-19 20:36:37 +02:00
Sefa Eyeoglu
fcdc7a1a35
fix: fix Modrinth query when Quilt is in use 2022-04-19 10:22:50 +02:00
Kenneth Chew
fcbf37f60f
Fix typos and inconsistent capitalization in sort options 2022-04-17 17:58:51 -04:00
DioEgizio
1dd663af6e CHANGE: switch the help pages to their own dir
also renames modrinth-platform/curseforge-platform to just Mod-platform since they have the pages are basically the same
2022-04-15 11:15:17 +02:00
flow
e13ca94061
chore: resolve conflicts and merge upstream 2022-03-24 18:24:51 -03:00
Sefa Eyeoglu
062fc79286
Merge pull request #298 from Scrumplex/fix-i18n
Fix translatable strings
2022-03-21 14:21:06 +01:00
Sefa Eyeoglu
536b1a23fc
fix: retranslate mod download pages 2022-03-20 21:51:23 +01:00
Sefa Eyeoglu
cafff5e504
chore: add license header 2022-03-20 21:40:49 +01:00
Jamie Mansfield
dd5c4b6864
App: Retranslate all pages when the language is changed 2022-03-20 20:48:12 +01:00
Sefa Eyeoglu
ccfd06ad21
fix(i18n): remove brand names from translations 2022-03-19 12:35:15 +01:00
Sefa Eyeoglu
48c2146a42
fix(i18n): fix translatable strings 2022-03-19 12:29:46 +01:00
flow
8409aa2571
tidy: Fix clang-tidy issues on files changed in this PR
The checks used are roughly the same as the ones proposed in the
clang-tidy PR (except perhaps that I used modernize-* instead of listing
them individually,though I don't think this caused any readability
detriments).

In ModrinthModel.cpp and FlameModModel.cpp I ignored the
modernize-avoid-c-arrays one, mostly because making the sorts array an
std::array would most likely increase the code complexity because of the
virtual function. Aside from that, the static_cast warning from
Application.h was not dealt with, since it's not in this PR's scope.
2022-03-14 17:43:36 -03:00
flow
b3c2a56ece
fix: delete semicolons at the end of .cpp file's functions
my lsp is weird sometimes
2022-03-07 19:55:20 -03:00
flow
9c57b54a81
refactor: move things around so that related things are close together
This also adds some comments around ModModel.cpp and ModPage.cpp to add
some ease of reading the code.

Also move some things from headers to cpp files.
2022-03-07 19:32:28 -03:00