Commit Graph

55 Commits

Author SHA1 Message Date
TheKodeToad
b8482a5d89
Update ModFolderPage.cpp
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2023-07-07 15:53:50 +01:00
Trial97
3139af8487
Made action text simpler
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2023-07-07 17:12:10 +03:00
Trial97
026293f773
updated option text
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2023-07-03 14:17:39 +03:00
Trial97
ce4a86fbcd
Made custom url function
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2023-06-25 10:41:29 +03:00
Trial97
ba609f3600
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into visit_mod_page
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2023-06-21 09:14:58 +03:00
Trial97
3ee0fec729
Removed mods from lambda
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2023-06-19 12:22:22 +03:00
Trial97
6667ff9330
Updated text and fixed mod page text update
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2023-06-15 12:32:48 +03:00
Trial97
be0df38453
Added tooltip for name label
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2023-06-15 11:40:39 +03:00
Trial97
e936bc4c60
Added custom text for multiple selection
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2023-06-07 01:38:10 +03:00
Trial97
f724059b88
Added visit mod's page
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2023-06-07 01:23:53 +03:00
kumquat-ir
9c2a3231c5 do not create nilmods folder
"it cant be that easy" - me, clueless

Signed-off-by: kumquat-ir <66188216+kumquat-ir@users.noreply.github.com>
2023-02-13 01:45:23 -05:00
kumquat-ir
7896dd19c1 nilmods instance page
mostly copied from the coremod page impl

Signed-off-by: kumquat-ir <66188216+kumquat-ir@users.noreply.github.com>
2023-02-11 17:46:17 -05: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
TheKodeToad
127b094c41 Improve handling of destructive actions
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2022-12-14 15:20:42 +00:00
Sefa Eyeoglu
a5b0b4800a
fix: make resource buttons work when instance is running
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-11-27 23:10:32 +01:00
Cleo John
83ceb26151 Streamline Button changes to improve source readability. 2022-10-18 17:28:23 +02:00
flow
43a7af3f44
fix: removing mods with their metadata as well
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-03 13:37:23 -03:00
flow
e2ab2aea32
change: add enable/disable to resources
TIL that zip resource packs, when disabled, actually have the effect of
not showing up in the game at all. Since this can be useful to someone,
I moved the logic for it to the resources.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20 10:49:54 -03:00
flow
97a74d5c1f
refactor: adapt rest of the codebase to the new resource model
In order to access the ModFolderModel from the ModFolderPage, i created
a new m_model for the correct type, shadowing the m_model of type
ResourceFolderModel. This creates two shared_ptr references to the same object,
but since they will have the same lifetime, it doesn't generate a memory
leak.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20 10:47:58 -03:00
Sefa Eyeoglu
afb9ebcd99
fix: distinguish Coremods
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-08-20 12:53:13 +02:00
Gingeh
a8aa862919 Move large condition into a new lambda
Signed-off-by: Gingeh <39150378+Gingeh@users.noreply.github.com>
2022-08-03 16:39:30 +10:00
Gingeh
f33b31e048 Check for running instance when re-opening the mod folder page and when selecting mods
Signed-off-by: Gingeh <39150378+Gingeh@users.noreply.github.com>
2022-08-02 14:14:45 +10:00
Gingeh
77b640b76b Disable "Check for Updates" and "Download Mods" while the game is running
Signed-off-by: Gingeh <39150378+Gingeh@users.noreply.github.com>
2022-08-01 20:56:05 +10:00
Gingeh
a8dfe98b1a Disable "Check for Updates" if all mods are removed
Signed-off-by: Gingeh <39150378+Gingeh@users.noreply.github.com>
2022-08-01 20:56:05 +10:00
Sefa Eyeoglu
28ae5d710e
fix: fix translations for mod updater
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-19 18:03:45 +02:00
flow
de9e304236
fix: std::list -> QList
Qt6 removed Qlist::toStdList() 😭

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:45 -03:00
flow
c4316e81e6
change: make Mod a QObject used as a pointer
Prevents problems when copying it around!

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:44 -03:00
flow
2d10c246a8
feat: add update mods to the ui / mod model
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:42 -03:00
flow
02201631e7
feat: use ConcurrentTask for mod downloads
Way faster :)

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-01 08:34:17 -03:00
Sefa Eyeoglu
e25cdd9d12
refector: move download action to ExternalResourcesPage 2022-06-14 07:04:31 -03:00
flow
d394235ee0
refactor: Create a more clear hierarchy for some instance pages
Previously, the Shaders, Texture packs and Resource packs tabs had as
parent the ModFolderPage, making it so that making changes only to the
Mods page would require checking the id of the page for the correct one.
This was hackish and error-prone.

Now, those pages all inherit from a single class, ExternalResourcesPage,
that handles the basic behaviour of all of them, while allowing for
individual modification in code.

This is still not a clear separation, since internally, all those
resources are derived from Mods, so for now there's still some awkward
common code :/
2022-06-14 07:04:31 -03:00
Sefa Eyeoglu
a4ef0940ed
chore: add license headers 2022-06-12 13:50:58 +02:00
Sefa Eyeoglu
9054ee18a1
Merge pull request #505 from flowln/improve_download_ux 2022-05-30 13:41:02 +02:00
flow
166f872712
fix: various issues with ProgressDialog and SequentialTasks
- Fix aborting sequential tasks
- Fix displaying wrong number of tasks concluded
- Fix text cutting when the URL is too big
2022-05-21 08:36:36 -03:00
Sefa Eyeoglu
943090db98
refactor: allow tracking multiple mod loaders 2022-05-19 08:49:27 +02:00
Sefa Eyeoglu
9fb5674233
refactor: cleanup ModLoaderType 2022-04-14 21:55:03 +02:00
Sefa Eyeoglu
14a0e85862
fix: remove unused code 2022-04-14 16:50:04 +02:00
Sefa Eyeoglu
35cfb41a9c
fix: check for Quilt as Fabric-compatible loader 2022-04-07 18:46:09 +02:00
flow
9b8493c304
feat: Use a single progress dialog when doing multiple tasks
This puts all mod downloading tasks inside a SequentialTask, which is,
for more than one task, a multi step task. This is handled by the
ProgressDialog by showing both the global progress of tasks executed,
and the individual progress of each of them.
2022-04-01 09:32:00 -03: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
768007d980
fix: disable "Download mods" button when needed
Fixes #271
2022-03-20 15:34:13 +01:00
flow
a3d7ad731d
fix missing translation strings
my mistake, sorry! ToT
2022-03-11 18:43:17 -03:00
flow
e0c025b162
fix extra spacing in resource packs and shader packs, and move button up
hopefully now its finally ok
2022-03-03 09:51:46 -03:00
flow
9e443faba3
hack: hide 'Download Mods' button when not in the mods tab 2022-03-03 04:02:22 -03:00
flow
f95cebaf06
change 'Install Mods' -> 'Download Mods' and change position 2022-03-03 01:10:10 -03:00
flow
9c6727e27f
feat: change task container in ModDownloadDialog to a QHash
Previously, we used a unique_ptr to a ModDownloadTask to keep track of
the selected mod to download when we accepted the dialog.

In order to allow multiple mods to be selected at once for download,
this has been changed to a QHash where the key is the mods name (since
it doesn't seem right to allow for multiple versions of the same mod to
be downloaded at once), and the value is a pointer to the corresponding
ModDownloadTask.
2022-02-21 21:34:06 -03:00
timoreo
efc44c56a6
Fix button being present in other pages 2022-01-28 19:32:42 +01:00