Closed Markosz22 closed 2 months ago
@Markosz22 Thanks for your contribution. I will look inside and give you feedback.
Sadly, I can't merge your changes into the main. There are some styling issues that could be fixed, but the main issue comes with the approach, how downloaded mods are checked. The part of fetching and getting the current version of mods would be okay to get merged (after some fixes) and if the mod update changes will be removed.
Example for the style issue:
Check for Update:
I like your approach, but there are some issues: — Installed mods are not saved for a solo instance — Switching between instances, shows installed mods from another instance — Removed mods are not updated (maybe I missed the part) — Information should be fetched from the mods of your local installed instance and not of mods your processed
I have different ideas, how the update process should work.
Solution 1
Solution 2
Both ways have different issues. Solution 1 difficult is to create a logic to extract the logic of the current installed mod (or its getting a subset before and after the installation and use the difference) Solution 2 got some issues because there are so many mods and names on the hub and in the package.json and dlls are not always equal or even close
Thank you for the feedback. I did not keep the instances in mind and skipped the remove part as there was no mod uninstall.
My last commit did not fix any of the issues you mentioned, just added update feature on the download page with the same implementation.
I will abandon this PR and create a new branch without the update related changes for the last updated date and version display tomorrow. Other than the style issue, is there anything I should keep in mind?
@Markosz22 Thanks. I think you should check out the new branch named milestone/v0.2.11.
I saw some messages in the discord and found out, some ppl. installed older version of mods because there was no version of the mod linked in the search windows.
OLD:
NEW:
(I added a call and it's fetching the version number)
Because the data was now available, it was just a copy and paste to add it to the download list
So I kinda programmed your part. Sorry :) But feel free to create and check out the changes with the last change / date information. It was a nice addition to the mod card.
For fetching the time, you could check, if you directly scrap the date / time information from the hub or make a custom solution like in this pr. Its up to you.
Adds a very basic update display system and a few extra information.
Display latest update date of the mod in list![image](https://github.com/SchraderR/sp-tarkov-client/assets/41615461/3a010a98-4e4f-4d27-ac2d-6316bc5e9efd)
Display version number in download list![image](https://github.com/SchraderR/sp-tarkov-client/assets/41615461/a228101b-1591-475e-aa70-53c368409230)
Keep track of latest installed mods in JSON file
Show update available or up to date based on last installed version
![image](https://github.com/SchraderR/sp-tarkov-client/assets/41615461/e752b431-c3c4-46cc-8fa7-816c019a56c0)
I'm not a web/angular developer so feel free to rewrite anything if you decide to accept it.