aboutsummaryrefslogtreecommitdiff
path: root/src/index.js
AgeCommit message (Collapse)Author
2024-02-04move IPC events into their respective modules0neGal
I've not been able to find anything that breaks from this, as I've gone through every IPC event that got moved, to ensure it still functions, and all the breakage I found has since been fixed. IPC events that dont fit in any particular module is also now in the new file named `src/app/modules/ipc.js` There's also another module `src/win.js`, which lets you get the `BrowserWindow` outside of `src/index.js` I also took the oppertunity to clean up some of the code when moving it around, and adding a couple comments, as some of it was quite horrid.
2024-02-03src/modules/settings.js now provides a function0neGal
This fixes a couple issues where the main process wouldn't actually get changes made to the settings, this fixes that. On top of this, changing settings is now done with `settings.set()` There shouldn't be any breakage from this change, but I suppose it is possible. Especially because the `settings()` function still does contain backup options set, meaning `settings.nsargs` is technically still valid, but dont expect it to actually be updated when that variable is changed, its merely here to avoid any problems.
2024-01-24fixed devtools mysteriously never opening0neGal
2024-01-24entirely refactor src/modules/requests.js0neGal
Its now been split into 2, requests.js and releases.js, the latter simply gets relevant info from GitHub release pages. The prior however gives simple functions for doing `GET` requests, and caching the result, and then transparently it'll use that cache when you request it next time. On top of this, some requests made by the renderer will now also use this, and this in turn ends up making loading the mod browser much faster. As instead of having to request the list of packages from Thunderstore, we can simply load the result of an old request. The current lifetime of the cache is 5 minutes, however this can also easily be adjusted. This also moves the cached requests away from <cache_folder>/viper-requests.json, and over to <cache_folder>/Viper/cached-requests.json
2023-09-16added buttons for fixing some problems and alike0neGal
I will likely add more buttons in the future, but for now this is most of the ones a user could need to repair problems.
2023-09-16handle gamepaths with missing read/write perms0neGal
We now show an alert if the gamepath is detected to be missing read/write perms, both when selecting the gamepath initially, when it gets auto detected, but also after it's selected, passively.
2023-09-16made some lang keys far more logical0neGal
Most of these are from back when Viper was originally started, I also removed a few keys as they were no longer in use, but were forgotten about, most of these are from pre-v1.0.0 aka, the old smaller UI
2023-09-16added button to force kill game0neGal
2023-09-13synchronize changes to settings from main process0neGal
If the main process has changes to the settings, said settings will now also be sent to the renderer, making them synchronized.
2023-07-31remove "error:" from console errors0neGal
Now they simply have the red color instead.
2023-07-24Merge branch 'main' into packages-dir0neGal
2023-07-22colored console logging0neGal
Far prettier, and far more useful at a glance.
2023-07-22mostly support installing packages through GUI0neGal
Install toasts, installing overall, dependencies and so forth, all seem to be fully functional, however more bug testing is probably required to concluce whether that is actually the case or not... This also doesn't break `src/modules/mods.js`, i.e dragging mods in to manually install them still functions the same as always.
2023-07-21rename mods.list() properties to use snake case0neGal
I may or may not have missed some properties or something somewhere, perhaps we'll see if something ends up broken in the future...
2023-07-16initial support for packages dir0neGal
This is missing a lot of things, notably support for detecting and installing dependencies, it also is actually being used by the frontend, that still uses `mods.js`, this'll change soon™️ It should also when done, be capable of removing mods installed in the old `mods/` folder when updating those mods, and then installing in the new `packages/` folder, making the upgrade a smooth ride.
2023-05-06change launch button text if game is running0neGal
This should've already been a thing, and was a thing for when the game was currently launching, but this functionality seems to have been broken at some point.
2023-04-29win.alert() now uses Promise, and added .confirm()0neGal
win.alert() now has a Promise return value, which'll allow you to wait until an alert has been closed before continuing code execution. win.confirm() was also added it's the same as win.alert() except it runs confirm() in the renderer instead of alert(), and has a return boolean in the Promise resolve callback. This boolean being whether the user confirmed the action or not.
2023-03-09remove misc console.log()0neGal
2023-03-05fully get rid of utils.js0neGal
I'd managed to forget to change some function calls to their new modularized versions, that's now fixed.
2023-03-05show alert when updating with game running0neGal
This also fixes is_running not quite working on Linux
2023-03-05modularized many functions and got rid of utils.js0neGal
Notably, winLog() and winAlert() are now win.log() and win.alert() inside modules/window.js. updateViper(), updateNorthstar and handleNorthstarUpdating() are now update.viper(), update.northstar() and update.northstar_autoupdate(), inside modules/update.js isGameRunning() and isOriginRunning() are now is_running.origin() and is_running.game() inside modules/is_running.js, along with a .titanfall() and .northstar() for more specificity. Not used anywhere right now, but may in the future be used. setpath() and gamepathExists() are now gamepath.set() and gamepath.exists() inside modules/gamepath.js killOrigin() are now kill.origin() inside modules/kill.js setlang() is now just inlined into the only event where it's used.
2023-03-04modularized getXXVersion() functions0neGal
Both getTF2Version() and getNSVersion() are now in version.js
2023-01-15use custom user-agent for masterserver requests0neGal
2023-01-12put mods Object into src/modules/mods.js0neGal
2023-01-12modularize settings Object0neGal
The reasoning behind this is obvious, I overall would like to make utils.js far smaller, and if not get entirely rid of it.
2023-01-12src/extras/ is now src/modules/0neGal
2023-01-12basically support thunderstore_author.txt0neGal
This doesn't entirely uphold support, as it doesn't use the author file for anything, however it does write it as intended.
2023-01-12rename: --debug to --devtools0neGal
2022-11-23added more user friendly error message0neGal
When JavaScript errors occur outside of the renderer, they'll no longer display a big and confusingly detailed error stack, now they'll simply be shown a toast about the fact that an error happened. The user can then click this to get more details, but still without it being as invasive and obtuse as before.
2022-11-23actually fix duplicate mods0neGal
If a mod has multiple mod folders inside it, however all with the same name, they'll be merged together, this now fixes that, by adding "(dupe)" to the end of it, along with displaying an error, however it will install successfully. This also happens to add some duplicate toast protection, however this should be reworked, but I am not bothered to deal with it right now, and I instead will be putting this on future me.
2022-09-14differentiation between update() and updatevp()0neGal
Some functions have been renamed: update() -> updateNorthstar() updatevp() -> updateViper() Overall these are far better function names...
2022-08-06feat: display a toast message if no Internet at launchAlystrasz
2022-07-08fixed "_sendVersionsInfo()" not found0neGal
I removed the underscore at one point and forgot to change the name everywhere it seems.
2022-06-07minor changes0neGal
Mostly syntax, but also a few fixes with how the settings system work, and also a change in localization strings.
2022-06-05removed auto formattingB
missed a few one last one
2022-06-02added setting for auto-killing origin, functionality workingB
2022-05-30refactored event names0neGal
Quite a lot of them aren't in the same syntax/style, and it's quite bad to look at, this should fix them all without causing issues.
2022-05-30simplify and comment index.js0neGal
2022-05-30fixed missing commas and various syntax stuff0neGal
I know, commas aren't needed, however, going in and out of using commas and not using them also looks bad, so generally I try to always use them, with exceptions.
2022-05-16added mod preview browser0neGal
Instead of opening your normal web browser you can now just open the page inside Viper, many changes aren't finished yet, notably the webview.css file. At some point I'll split the main.css into more files so the folder makes sense even though there's currently only one file in there.
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-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-03-24added --no-vp-updates0neGal
This overwrites viper.json and disables Viper updates, this is useful when repackaging Viper for other formats we don't already support.
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-23settings page is now fully functional0neGal
It actually saves settings, loads them properly and everything...
2022-02-18fix hardware acceleration being disabled0neGal
This was due to me testing something, not actually supposed to be in release builds...
2022-02-18basic drag and drop support0neGal
Since apparently dragleave and dragenter don't quite work as intended we have to resort to this obscure method which should work just fine on the user's end.
2022-02-17fixed buttons not re-enabling when closing install0neGal
If you closed the file selection window after clicking the "Install Mod" button it would improperly try to install "nothing", and therefore never re-enable the buttons, this is now fixed.
2022-02-08Merge branch 'main' into thunderstore0neGal