Commit Graph

317 Commits

Author SHA1 Message Date
hydroflame 9922ffb3c2 Merge branch 'dev' into issues/2308 2022-03-20 14:22:32 -04:00
hydroflame 15badafd37 Merge pull request #3184 from nickofolas/improvement/sleeve-and-clash-ui
Sleeve and Territory UI refresh
2022-03-19 11:23:28 -04:00
Jack Haden-Enneking a8064f739e re-add pre tags to support \n in prompt
#2880 was merged after #2968, causing a regression of #2520. This reapplies the small change from #2968 (thank you @phyzical).
2022-03-18 14:13:21 -07:00
Master-Guy 8bf0641d28 Recently changed file 2022-03-18 11:15:51 +01:00
Master-Guy 9373d65a16 Merge branch 'danielyxie:dev' into issues/2308 2022-03-18 11:12:21 +01:00
Master-Guy 9dd933ecee Changed .keyCode to .key for files in "src" 2022-03-18 10:43:56 +01:00
Olivier Gagnon bfa30dcdbb allbuild commit /usr/bin/git 2022-03-17 18:17:19 -04:00
Olivier Gagnon 3cdf0452a4 fix up the new prompt UI 2022-03-17 16:44:44 -04:00
hydroflame 83ef5a940b Merge branch 'dev' into prompt-additions 2022-03-17 15:38:13 -04:00
nickofolas 2524b429ec Merge branch 'dev' of github.com:danielyxie/bitburner into improvement/sleeve-ui 2022-03-16 16:48:13 -05:00
Olivier Gagnon 3aabbb7aaa dont hide int anymore 2022-03-16 15:42:25 -04:00
nickofolas 230d68aab2 Implement common stats row element 2022-03-12 15:49:07 -06:00
BB 2f4d879c16 Trailing whitespace and files not ending with \n are now illegal 2022-03-08 22:51:02 +01:00
BB 2c3e0985c4 Simplified some relative imports 2022-03-06 05:05:55 +01:00
phyzical 1931734694 added pre tags to support \n 2022-02-13 18:49:24 +08:00
Phil 378f67097c Amending NetscriptDefinitions 2022-01-31 18:15:13 +00:00
Phil af43e63415 Blanking Prompt value on close 2022-01-30 14:21:46 +00:00
Phil 08d0b4cbae Adding support for text/select options in Prompt command 2022-01-30 14:06:18 +00:00
Martin Fournier a47eae8b25 Add function to enable/disable routing
Wraps the toX() functions of the Router to add a check to only run the
function when it is allowed.

The check is used in the import page to prevent user scripts from
redirecting away to a crime or something else.
2022-01-26 03:56:19 -05:00
Martin Fournier 855a4e622d Add Electron preload script to allow communication
Adds a channel to communicate between the main process & the renderer
process, so that the game can easily ship data back to the main process.

It uses the Electron contextBridge & ipcRenderer/ipcMain.

Connects those events to various save functions. Adds triggered events
on game save, game load, and imported game. Adds way for the Electron
app to ask for certain actions or data.

Hook handlers to disable automatic restore

Allows to temporarily disable restore when the game just did an import
or deleted a save game. Prevents looping screens.
2022-01-26 03:56:19 -05:00
Martin Fournier 26432082e2 Add an import save comparison page
This adds a new page reachable from the import save file
options menu. It shows the difference between the current save
and the data that is being imported, for confirmation.

Includes an "automatic" variant, which has different wording for when
Electron decides it has access to a newer version of the game.

While in this screen, the autosave is disabled.

This also adds a new BypassWrapper component around the game's tree.
It allows for content to be displayed without rendering the nested
pages (import, recovery). This prevents player scripts from messing
with the screen.
2022-01-26 03:56:17 -05:00
Martin Fournier 974344545d Move import save functionality into SaveObject
Adds a lot of metadata to be able to easily compare the new save to the
current player.

- Adds lastSaved & identifier to the PlayerObject
- Includes a hash method used to generate an identifier
2022-01-26 03:42:52 -05:00
hydroflame 2f36fb107f Merge pull request #2803 from MartinFournier/feat/github-actions
Adds GitHub workflows to fetch a changelog & to bump the app's version
2022-01-26 00:52:06 -05:00
hydroflame 7a5dfd0e72 Merge pull request #2707 from MartinFournier/feature/theme-browser
Add Theme Browser accessible from GameOptions
2022-01-26 00:46:17 -05:00
Martin Fournier 8a2cad6c4a Reset styles for html changelogs in getUpdateText
Adds an optional sxProps to the DialogBox component.
2022-01-25 10:20:36 -05:00
nickofolas 259071e3d5 Align slider endpoints in settings 2022-01-21 16:32:32 -06:00
Martin Fournier a26b9c8dcf Add theme browser page accessible from game options
Removed the themes buttons that were in the ThemeEditorModal and only
left a "Revert to Default" button along with a link to the ThemeBrowser
page.

Split off the buttons into reusable components since they are now used
in two pages.

Display the themes in big cards with a zoomable screenshot. Applying the
theme now shows a toast with an option to undo the action.

The snackbar now allows ReactNode instead of only strings.

- Add link with details on how to create a new theme in the game.
- Add link to the theme-sharing discord channel.
- Add icons to the theme & style buttons in GameOptions
- Add "Theme Editor" button to ThemeBrowser
- Add "Style Editor" button to ThemeBrowser
- Move Styles related files into Themes folder
- Includes a modal that shows a bigger version of the screenshot.
- Change Snackbar to allow for ReactNode as the message
2022-01-20 18:41:49 -05:00
Martin Fournier a9e2e35446 Move theme related things into its own subfolder
This will make contributions easier and less prone to conflicts.
2022-01-20 18:41:48 -05:00
Olivier Gagnon 77f525c98c rm blob caching 2022-01-20 16:11:48 -05:00
Olivier Gagnon 53727f6222 typo 2022-01-18 19:20:16 -05:00
nickofolas eb7a0ebace Use background primary before #000000 for body 2022-01-18 16:15:36 -06:00
hydroflame c5089ab82a Merge pull request #2664 from MartinFournier/feature/recovery
Add information to the recovery page
2022-01-17 16:05:00 -05:00
hydroflame 1d83247f8d Merge pull request #2671 from gianfun/fix_ns_tail_behavior
Fix ns.tail() behaviour for multiple calls
2022-01-17 16:01:34 -05:00
Gian P e38010a9a4 Revert "Logs button reopens log window"
This reverts commit 01efd372e9.
2022-01-16 18:21:02 -03:00
Martin Fournier 65964c84b2 Add information to the recovery page
Adds error & environment information to the recovery page when
available. The info will be displayed when the error boundary catches an error only.

Otherwise, does a few minor tweaks to the UI of the page.

- Add DevPage button to throw an uncaught error to go into recovery
- Add "Delete Save" button in recovery from Game Options (refactored into its own
component)
- Use "Soft Reset" button from Game Options (refactored into its own
component)
- The "Soft Reset" & "Delete Save" buttons now have confirmations
- Add tooltip on "Disable Recovery Mode" button
- Add timestamp to the RECOVERY.json filename
- Add textarea containing markdown with the current error details, if
available
  - Error
  - Page
  - Version
  - Environment
  - Platform
  - UserAgent
  - Features
  - Source
  - Stack Trace
- Change GitHub new issue link to contain default body & title, if possible
- Change links to not take the full width (they were clickable by mistake)
- Fix "Disable Recovery Mode" not resetting the ErrorBoundary's state,
making going back to terminal impossible
2022-01-16 09:07:53 -05:00
Cyn 8d7b71c5aa Prevent dragging log window off screen & reset log window position if resized off screen 2022-01-15 20:52:02 -05:00
SlyCedix c25067c062 bound log box to parent div 2022-01-15 20:52:02 -05:00
hydroflame a454e21977 Merge branch 'dev' into feature-catch-errors-and-softreset-recovery 2022-01-15 18:00:33 -05:00
hydroflame 0db08c3477 Merge pull request #2476 from nickofolas/reopen-log-windows
Logs button reopens log window
2022-01-15 17:18:59 -05:00
nickofolas 0359229af6 Grid-align buttons in location UIs (and options) 2022-01-15 10:21:45 -06:00
Olivier Gagnon 5126d72742 rm some stuff from netdef to make it work in-game 2022-01-13 14:26:05 -05:00
Martin Fournier 6633c00f5d Clear timers when unmounting CorruptableText
The interval was cleared, but not the setTimeout to replace the character
2022-01-13 09:34:08 -05:00
hydroflame d274e21a10 Merge pull request #2596 from MartinFournier/feature/ns-ui-styles
Add ns.ui.[getStyles, setStyles, resetStyles]
2022-01-12 19:18:54 -05:00
Martin Fournier 0a2187bdf5 Revert "Add toPreviousPage in router"
This reverts commit b0bc3236fd.
2022-01-12 18:49:53 -05:00
Martin Fournier 9b638b911f Add ns.ui.[getStyles, setStyles, resetStyles]
Adds three Netscript functions to manipulate the user's styles like the
player can with theme.
2022-01-12 18:34:05 -05:00
Martin Fournier 9d0a63734d Add details to work in overview
Add a reusable component for the focus section, add a bit of details &
some styling.
2022-01-11 20:46:34 -05:00
nickofolas a41104f51a Add tooltips to unfocused work 2022-01-11 17:46:59 -06:00
TheMas3212 562d4ee800 Add ErrorBoundary component to catch rendering error and redirect to recovery page
also add softreset button on recovery page
2022-01-12 09:43:58 +11:00
Martin Fournier b22eb58aba Add option to exclude running scripts from save 2022-01-11 16:48:00 -05:00
Martin Fournier b0bc3236fd Add toPreviousPage in router
- Allows the WorkInProgress cancel & unfocus to go back to the previous
page instead of a default one.
- Change layout of overview buttons
- Add a back button in the overview, only visible in pages with a
sidebar
- Clear the history on augmentation install & on prestige
2022-01-11 09:38:52 -05:00