aboutsummaryrefslogtreecommitdiff
path: root/src/utils.js
AgeCommit message (Collapse)Author
2022-05-12initial draft for supporting dependencies0neGal
This should allow you to install packages that have dependencies, however maybe not with the best UI/UX experience, as currently there's only an English localization, and we also install dependencies even if the dependency is already installed.
2022-05-03fixed various errors when reading modfile0neGal
2022-05-03hopefully fully implement everything?? i think?0neGal
Everything seems to be working just fine, and I can't find any problems, so I'll likely merge this soon.
2022-05-03simplified get() and made list() used get()0neGal
Instead of repeating code and everything, get() now only returns a boolean, based on the arg inputted into get(mod), it returns true if the mod is enabled and false if disabled. If the mod isn't found inside the enabledmods.json it is assumed that it's enabled, as Northstar doesn't update this unless you actually disable the mod first, and the mod won't be found in there. Then I used get() to simplify list() a whole lot, and adding that functionality of using the manifest for a version number if one couldn't be found in the mod.json.
2022-05-03modfile. enable(), disable() and toggle() now work0neGal
2022-05-02mods.modfile().get() is identical to mods.list()0neGal
Albeit mods.list() doesn't actually search the manifest file for a version number, and I'll implement that later.
2022-05-02Merge branch 'main' into enabledmods0neGal
2022-04-28added: error if config file isn't valid0neGal
Essentially just validates the config file and then prompts you about it, it allows you to reset it directly or just to exit and let yourself fix it. And because the error message appears directly in the renderer we have access to navigator.language, and can therefore still localize the string. However! We can't actually care if the user has disabled auto detection of their language, since... y'know, the config file where that's stored isn't able to be read properly. And so I added an argument to lang(), which allows you to force it to use a specific language if that language is available, if not it defaults back to English.
2022-04-17fixed gamepathlost errors on first launchlinux-launch-testing0neGal
Because viper.json doesn't exist it also means settings.gamepath is null, which triggers the gamepathlost message.
2022-04-17fixed issue causing viper not open the GUI0neGal
I don't really understand why or how anything broke, all I know is this fixes it, and I don't know how to feel about this madness.
2022-04-13fixed --update not exiting if already on latest0neGal
2022-04-13check to make sure gamepath exists0neGal
When Viper starts up it'll check to make sure the gamepath still exists, and throws errors if not, it also redirects you to the first page (the one where you can set the gamepath), and gives you an informative error. This could happen because the user unmounted the drive the gamepath is on, or it could happen if the user moved their game location.
2022-04-13the user can now manually select a language0neGal
This allows someone to have their system in any language, and then have Viper in a separate language. This is also useful for testing.
2022-03-24removed excess debug console.log()0neGal
I forgot about this when merging the VDF fix
2022-03-22fix: VDF path searching not working on SteamDeck (#97)0neGal
* added debug messages * more debug logging * even more debug logging * removed debugging and fixed VDF problem maybe? Apparently the libraryfolders.vdf doesn't always come with the same values, sometimes it comes with the contentstatsid variable and other times not, we assumed it always was there, and never checked for it, this caused problems if it wasn't there. This should fix that...
2022-03-10fix nsargs being cleared when edited out of Viper (#93)0neGal
If the nsargs are edited by a third-party program or anything that isn't Viper, the next time you launch Viper it'll reset the nsargs back to what it was when you last opened it.
2022-02-24fixed NS never being auto-updated and more0neGal
When #87 was merged an unnoticed problem slipped in where if Viper was running in a version that did not support auto-updates we would never auto-update Northstar. Now that's fixed, and the nsupdate option is completely implemented. I also took the liberty of removing the auto-update option in the settings page if Viper can't auto-update anyway, as it's useless if that's not possible.
2022-02-23implement ability to disable NS auto-updates0neGal
Albeit with some caveats, due to the way electron-updater is setup, if you're not on a version of Viper which supports auto-updates the event which runs the NS Updater code will never be run, and hence it'll never auto-update. This was also an issue before, but I only noticed it now.
2022-02-23Merge 0neGal/viper into settings-page0neGal
2022-02-23settings page is now fully functional0neGal
It actually saves settings, loads them properly and everything...
2022-02-21[fix] updates checking orderRemy Raes
2022-02-21some functionality is now present0neGal
Albeit only frontend functionality, it doesn't actually save your settings, it simply loads them, and Settings.get(), allows you to convert them to a format that can be used to save settings.
2022-02-18fix being able to upload any file0neGal
Usually utils.js would default to simply unzipping whatever was uploaded if it wasn't a folder, now we check if it has "zip" as the extension, case insensitive. If not simply report back the file wasn't a mod. As opposed to the obscure error you got before this.
2022-02-13Merge branch 'main' into enabledmods0neGal
2022-02-12[feat] at start, restore excluded files who might have been created by an ↵Alystrasz
incomplete update process
2022-02-12[fix] rename files to file.excluded if an update is available onlyAlystrasz
2022-02-11fixed windows-only bug/error0neGal
I have no clue why this is only a Windows error, but it is, which is also why it slipped through into the 1.2.0 release.
2022-02-09fixed false alarms of failed installs0neGal
The failed to install toast now pops up when it actually should.
2022-02-09mods installed to the wrong folder on path change0neGal
The modpath variable is now refreshed when you change the game path. Which stops the problem altogether.
2022-02-08added toasts for installation of mods0neGal
It'll notify of incorrectly formatted mods, it'll also notify on errors and on success.
2022-02-08post merge fixes to #500neGal
2022-02-08Merge branch 'main' into thunderstore0neGal
2022-02-07all mods should now have proper install status0neGal
We now directly check the manifest file info as well therefore in all cases even if the folder name for the mod is completely obscure, we should now finally still get an installed status, both on removal and install.
2022-02-07added support for more obscure mod structure0neGal
If a developer for some reason decides to put their mod inside mods/ instead of putting it inside a folder in mods/, it used to fail the install, now that's fixed. However since there's no folder to directly copy the name from we take it from the manifest.json provided by Thunderstore. It of course also has the proper status in the browser UI (update/reinstall etc)
2022-02-05fix edge case for when Archives/mods doesn't existGitExample
2022-02-05fix mod list updating properlyGitExample
A setInterval() will do the job, it's not performant, and I'll have a look at improving this further down the line to something better.
2022-02-05button now updates when mod is removedGitExample
I also fixed the archive not being extracted properly for some reason, the setTimeout() seems to solve it, no clue if it needs to be adjusted in the future or replaced with something that works 100% of the time, I'm not even quite sure why it happens in the first place.
2022-02-05fixed max mod install limit of 512mbGitExample
If a mod had a file that was bigger than 512mb inside it, it'd error out, simply switching the copy-dir module to recursive-copy fixes this.
2022-02-03detection of installed mods, disabling buttonsGitExample
When a new mod has been installed through the browser UI it's button is changed from "Install" to "Re-Install" instantly. We also now disable modding related buttons when updating NS, or when installing mods. This should prevent issues.
2022-02-03ability to download from browserGitExample
This should work for all mods, assuming that all mods come packages the same, aka, in a Zip, with mods/<mod> in it. Which from what I know they do.
2022-01-26fixed mods not updating after changing path0neGal
This also fixes mods not showing up after first install of NS
2022-01-24no alert when manually changing the game path0neGal
When changing the game path by clicking the button you shouldn't be told it can't find the game and you've to select one manually, as you know that already. More importantly, if it could be found automatically it'll just not do anything. With this change I also changed the "gui.setpath" string to be more logical, and to make it clear what it does.
2022-01-24Edge case in vdf reading (#56)3top1a
* Edge case * Alert user only when automatic detection failed * extra info on not found message * support for [Free/Open]BSD Co-authored-by: 0neGal <mail@0negal.com>
2022-01-23fix: Finding Windows game folder (#55)Rémy Raes
2022-01-23moved modules into extras/0neGal
I moved requests.js into extras and made the function for finding the potentional gamepath into it's own module. I also made the exec() called Promise based.
2022-01-22fixed setGamepath(folder)0neGal
2022-01-22fixed checking for linux instead of win320neGal
2022-01-22implement #52 into #510neGal
2022-01-22initial review of VDF parsing0neGal
2022-01-22Don't save settings twice3top1a