Commit Graph

260 Commits

Author SHA1 Message Date
BB
2f4d879c16 Trailing whitespace and files not ending with \n are now illegal 2022-03-08 22:51:02 +01:00
nickofolas
472503814b Remove 200px min width of script editor tabs 2022-03-07 17:33:56 -06:00
phyzical
c5fc009d91 renamed close to Terminal
* evened out spacing of buttons
2022-03-05 12:23:10 +08:00
BB
7212cc2f1c Removed unnecessary eslint-disable lines 2022-03-01 17:33:27 +01:00
nickofolas
67382f0ac9 Add missing newline at end of file 2022-02-20 09:03:16 -06:00
phyzical
7dd8deb1ed missed a change 2022-02-16 20:16:27 +08:00
phyzical
26002e0429 added logic to display server on save dialog
*added logic to display external servers as red
2022-02-16 20:11:37 +08:00
phyzical
ca28582265 added logic to also check hostname for "current script" 2022-02-16 18:41:22 +08:00
phyzical
d586743bf6 fixes for editor and tabs when names too long
* coupled some of the styles to avoid breaking this later on
* added tooltip incase its too long/ too small
* changes to use elipsis and RTL to read the end of file name
2022-02-09 00:12:37 +08:00
Jordi Paris Ferrer
419d585694 add tab switching support to vim mode 2022-02-06 16:34:14 -08:00
nickofolas
21e27dfab6 Save data sanitization
- Run in `Editor.beforeMount`, as well as when the
options modal is closed
- Recursively validates all token colors and
replaces them with bright red if they're invalid
2022-01-30 10:38:58 -06:00
Phil
08d0b4cbae Adding support for text/select options in Prompt command 2022-01-30 14:06:18 +00:00
nickofolas
dd77deca7b Add Paper styling to modal 2022-01-29 23:54:36 -06:00
nickofolas
e800886d42 Tie up loose ends
- Ensure that customTheme is redefined whenever the options modal
is closed, regardless of saved or not
- Reset the pending value for the theme editor whenever modal is clsoed
2022-01-29 23:44:31 -06:00
nickofolas
7ad0c53234 Update label for common.accent 2022-01-29 23:19:24 -06:00
nickofolas
83e5b46f3e Implement Monaco theme editor 2022-01-29 23:17:57 -06:00
nickofolas
5a476178fa Add types token 2022-01-29 23:11:21 -06:00
nickofolas
4ba6926e01 Theme attribute cleanup 2022-01-29 22:39:13 -06:00
nickofolas
20d3115e4a Framework for custom theme 2022-01-29 19:27:49 -06:00
smolgumball
2add4e9112 Merge branch 'dev' into add-ns-getRecentScripts 2022-01-26 19:07:02 -07:00
nickofolas
1a8a24587f Ensure that the proper editor is updated by syncing 2022-01-20 17:45:54 -06:00
nickofolas
a5ad97f47d Remove unnecessary editor code 2022-01-20 17:28:19 -06:00
nickofolas
99ef71de4a Update prompt message content 2022-01-20 17:14:38 -06:00
nickofolas
bc50f5180a Refactor 2022-01-20 15:48:17 -06:00
nickofolas
b4a78c26f3 Implement editor tab actions 2022-01-20 15:48:16 -06:00
smolgumball
74e2acfa6f Add ns.getRecentScripts() 2022-01-19 00:04:48 -07:00
nickofolas
258a1b262e Update options button 2022-01-17 17:20:38 -06:00
nickofolas
a9314f2447 Show N/A when editing a txt file 2022-01-17 16:44:55 -06:00
nickofolas
c41cd68a8d Add modal to editor with RAM details 2022-01-17 16:32:45 -06:00
nickofolas
c1b777733f Improve clarity of editor tabs 2022-01-17 15:14:07 -06:00
Martin Fournier
aec2763b27 Ignore trailing whitespace for dirty file asterisk
Saved scripts is stored on servers with its starting & trailing whitespace removed, so
comparison would fail and show the file as dirty when there was a
trailing newline in the script.
2022-01-14 05:34:33 -05:00
nickofolas
e7983552dc Fix formatting for empty editor splash 2022-01-12 12:15:03 -06:00
hydroflame
7633f271db
Merge pull request #2265 from TheMas3212/fix-2119
Fix 2119
2022-01-08 13:56:05 -05:00
Christopher
ad0b73aaee fixed syntax highlighting (don't highlight partial tokens/keywords) 2022-01-07 19:19:03 -06:00
Martin Fournier
4b06bdd89c Add detailed ram cost to mem command 2022-01-05 16:41:48 -05:00
Olivier Gagnon
c59a267437 change sf4 2022-01-04 19:09:34 -05:00
hydroflame
0d02ce6308
Merge pull request #2326 from MartinFournier/feature/editor-wordwrap-option
Add wordWrap option to Monaco
2022-01-04 12:54:50 -05:00
Martin Fournier
f0161367af Add wordWrap option to Monaco 2022-01-04 09:41:44 -05:00
Dexalt142
914b06ec88 feat (editor theme): atom one dark theme 2022-01-04 18:39:09 +07:00
Olivier Gagnon
1e0e9f7bd7 change button text 2022-01-02 11:55:06 -05:00
TheMas3212
6251678532
clear currentScript to null not undefined 2022-01-02 02:16:32 +11:00
TheMas3212
a20dd47ec6
fixes #2119 close open scripts that exist on deleted servers
this prevents a crash by trying to open the script editor with a script
open that exists on a server that has been deleted

this is achieved by filtering the list of open scripts whenever the
editor is opened and removing any that exist on a server that has been
deleted
it also handles the case of the selected script being one that was
removed in which case it defaults to selecting the first script
2022-01-02 02:10:10 +11:00
Billy Vong
38366e45db fix(editor): Fix vim mode quit and add "wq"
This changes `:q` to be quit (w/o saving) and added `:wq` to save *and* close.
2021-12-30 13:14:54 -05:00
Olivier Gagnon
0fc95e6215 text editor improvements 2021-12-29 02:04:24 -05:00
Hedrauta
693c6480a0 as close as possible
Sadly, i can't color specific variables, because of monaco itself.
Did my best for this. 😉
2021-12-23 07:27:58 +01:00
Andrew Cooper
f2bdf00aba Closing the final script in your editor will take you to the terminal. 2021-12-22 00:26:01 +00:00
Olivier Gagnon
b2b682fa04 fix editor not loading files 2021-12-21 13:44:18 -05:00
Olivier Gagnon
41593e0dce fix editor not loading 2021-12-21 12:02:06 -05:00
hydroflame
c1c7131545
Merge branch 'dev' into feat/open-multiple-files-from-cli 2021-12-21 11:02:06 -05:00
hydroflame
81e3f2afd1
Merge pull request #1986 from billyvg/feat/add-vim-command
feat: add `vim` terminal command
2021-12-21 11:00:33 -05:00
hydroflame
4be5e45740
Merge pull request #2073 from billyvg/fix/window-resizing
fix: Update editor height when resizing window
2021-12-21 10:56:51 -05:00
65-7a
a6aebd4a29 Change model to plaintext for txt files 2021-12-21 10:35:03 +11:00
65-7a
56e540802b Disable RAM calculation for txt files 2021-12-21 10:21:22 +11:00
Billy Vong
bb2f8e883c feat: Support opening multiple files from command line 2021-12-20 16:55:17 -05:00
Billy Vong
d30edc7f59 feat: Add vim terminal command 2021-12-20 16:20:50 -05:00
Billy Vong
63891351be remove TODO 2021-12-20 14:05:59 -05:00
Billy Vong
60749eefa7 remove console + format 2021-12-20 14:05:22 -05:00
Billy Vong
ee177393fa fix: Update editor height when resizing window 2021-12-20 14:04:42 -05:00
Billy Vong
3fd904ff87 format 2021-12-20 10:48:32 -05:00
Billy Vong
6641ca9c73 fix ts 2021-12-20 10:45:44 -05:00
Billy Vong
517066a710 fix missed conflicts 2021-12-20 10:44:17 -05:00
Billy Vong
d372166c8b Merge branch 'dev' into feat/add-vim-mode 2021-12-20 10:36:58 -05:00
Martin Fournier
e60996b86c Focus editor when opening or changing tabs 2021-12-20 07:15:53 -05:00
Martin Fournier
08a4a1649f Linting ScriptEditor 2021-12-20 07:01:34 -05:00
BuildTools
302af48be4 Fixed merge conflict 2021-12-20 01:44:51 -06:00
BuildTools
6d90025370 Adapted PR #2055 to the refacted script editor code 2021-12-20 01:40:01 -06:00
BuildTools
e5c4c8f64b Rebased
Added hostname to tab name
Removed -tas arg from the rm command
2021-12-20 01:40:01 -06:00
BuildTools
cbfdfa5753 Removed testing log statements 2021-12-20 01:40:01 -06:00
BuildTools
3120d97cfa Update 2021-12-20 01:40:01 -06:00
BuildTools
6dc7dc42c5 resolved merge issue 2021-12-20 01:39:20 -06:00
Dan
6ec7fcb9fa
refactor(keybinds): change editor save keybind S
We need to stop the event from bubbling up to the browser and opening a
'save html' window to keep support in the browser, other than that,
straight forward change to swap keybinding to 'S' for saving in the
editor.

Resolves danielyxie/bitburner#2053
2021-12-20 04:34:27 +00:00
Martin Fournier
3b99da8474 Lint current problems & fix ignore paths 2021-12-19 13:17:44 -05:00
Olivier Gagnon
02605090df v1.2.0 2021-12-18 16:28:09 -05:00
BuildTools
59498f780a Small css tweaks 2021-12-18 07:11:59 -06:00
BuildTools
2265f797c4 Added the ability to open multiple script files at a time
Fixed a bug where ram would stay the same when switching between scripts

Fixed bug where updating ram could cause the GUI to crash

The editor will now go to the last edited line when switching tabs.

Tidied up the script editor UI
2021-12-18 04:10:25 -06:00
Billy Vong
b3f9380ebd prettier 2021-12-17 12:56:48 -05:00
Billy Vong
6fb5565b08 remove unused code 2021-12-17 12:48:50 -05:00
Billy Vong
fb5d374279 feat: Add vim mode to script editor
This adds an option to turn on vim mode using the `monaco-vim` library.
2021-12-17 12:34:00 -05:00
Olivier Gagnon
e5b4dd8e90 Files should be saved on the server that opened them. 2021-12-13 20:08:58 -05:00
Olivier Gagnon
c69eb34341 v1.0.1 2021-11-17 19:56:17 -05:00
Olivier Gagnon
cf2efe7698 few bugdic 2021-11-11 17:00:36 -05:00
Olivier Gagnon
3fe25d64e5 ns function token even more precise. 2021-11-11 11:21:21 -05:00
Olivier Gagnon
3f28b066b0 working on timestamps and make netscript function highlight more specific. 2021-11-11 10:07:16 -05:00
Olivier Gagnon
15b3a82a41 plenty of bug fix. 2021-11-10 19:28:20 -05:00
Olivier Gagnon
b692bb90b9 fix ns1 blue colors 2021-11-06 17:46:55 -04:00
Olivier Gagnon
d7c23b975c fix code not saving 2021-11-02 16:10:01 -04:00
Olivier Gagnon
43fc5dfd48 work on doc 2021-10-30 12:34:14 -04:00
Olivier Gagnon
d99d3fc222 dont run inf loop check on ns1 scripts 2021-10-29 01:23:15 -04:00
Olivier Gagnon
d1d0ccf345 added possible infinite loop checker 2021-10-28 23:04:26 -04:00
Olivier Gagnon
91877dc172 netscript def is raw loaded 2021-10-27 23:19:19 -04:00
Olivier Gagnon
8f097ebb32 v0.58.0 2021-10-27 15:16:16 -04:00
Olivier Gagnon
0afb2e5f5d remove comments 2021-10-23 14:40:57 -04:00
Olivier Gagnon
a0039d9667 beautify using monaco 2021-10-23 14:40:46 -04:00
Olivier Gagnon
f5b23262f6 fix react error 2021-10-23 14:36:07 -04:00
Jeff Baars
ab60b411ca Bracket highlighting per Solarized example js images 2021-10-18 16:58:23 -07:00
Jeff Baars
fd9d8d5c8a Added solarish-dark and solarish-light themes to code editor based on Solarized: https://ethanschoonover.com/solarized/ 2021-10-18 16:20:41 -07:00
Jeff Baars
7103601403 Added Solarized dark and light themes to code editor. 2021-10-18 13:41:26 -07:00
Olivier Gagnon
c96c7e3d2e v0.57.0 2021-10-16 22:32:48 -04:00
Olivier Gagnon
371d41b7c3 added placeholder for filename 2021-10-15 21:28:17 -04:00
Olivier Gagnon
02b085cc75 script editor now saves on server that opened the file and displays server name 2021-10-15 21:27:02 -04:00
Olivier Gagnon
762e7f127c improve monokai again 2021-10-15 18:58:10 -04:00
Olivier Gagnon
34fa906013 save some text editor notes 2021-10-15 18:27:02 -04:00
Olivier Gagnon
80d197652d improve monokai by making the language a superset of javascript 2021-10-15 18:25:22 -04:00
Olivier Gagnon
b5a8ed1d9d improve script editor display 2021-10-15 16:16:11 -04:00
Olivier Gagnon
e047653ed7 improve text editor scaling 2021-10-15 16:14:27 -04:00
Olivier Gagnon
f645d08a50 small screen script editor 2021-10-15 15:47:17 -04:00
Olivier Gagnon
a90575aea9 load monokai 2021-10-12 10:56:19 -04:00
Olivier Gagnon
faad0ae8a7 Try to make an error message more helpful 2021-10-11 18:47:05 -04:00
Olivier Gagnon
06775b20fa saving file now saves game 2021-10-11 17:57:17 -04:00
Olivier Gagnon
b126bd01ee ram check is debounced 2021-10-11 16:59:37 -04:00
Olivier Gagnon
8f13363466 prettier 2021-10-11 16:38:50 -04:00
Olivier Gagnon
e9ba4ae9a2 added vscode module def in netscript 2021-10-10 13:52:56 -04:00
Olivier Gagnon
12b192ab43 prerawloader 2021-10-10 13:23:36 -04:00
Olivier Gagnon
06df10d2f9 build fix for duplicate autocomplete 2021-10-09 22:59:06 -04:00
Olivier Gagnon
01d15176ac Added kindof monokai to monaco 2021-10-09 19:00:27 -04:00
Olivier Gagnon
3ca7c49ce8 Fixed Script Editor last filename not keeping proper track 2021-10-08 00:21:30 -04:00
Olivier Gagnon
48b839d68c Added font size to text editor 2021-10-04 21:06:55 -04:00
Olivier Gagnon
50cf362b3b v0.55.0 2021-10-01 16:22:33 -04:00
Olivier Gagnon
4e8bb96f3f removing some of the classes 2021-10-01 13:08:37 -04:00
Olivier Gagnon
c5713fa6d8 learned and implemented default props 2021-09-29 01:49:22 -04:00
Olivier Gagnon
06f716c0fa moved a bunch of files 2021-09-25 14:42:57 -04:00
Olivier Gagnon
b0f20c8c8f lint 2021-09-25 01:26:03 -04:00
Olivier Gagnon
5c6c472b64 Augmentations in mui 2021-09-25 01:06:17 -04:00
Olivier Gagnon
5170c0e004 create script in mui 2021-09-24 23:36:28 -04:00
Olivier Gagnon
2e05f14c0d convert to ts 2021-09-24 16:34:21 -04:00
Olivier Gagnon
b8faa9dc0b convert player to ts 2021-09-23 18:47:43 -04:00
Olivier Gagnon
66a2adaeb4 update prettier 2021-09-22 12:56:55 -04:00
Olivier Gagnon
558b671206 few bugfix 2021-09-22 11:32:04 -04:00
Olivier Gagnon
96f0879230 fix bug with nano 2021-09-22 01:10:29 -04:00
Olivier Gagnon
5e48530e14 0.54 again 2021-09-20 17:26:47 -04:00
Olivier Gagnon
023f2b8309 ITutorial in react 2021-09-19 00:46:39 -04:00
Olivier Gagnon
89ea9aaff5 oops 2021-09-17 02:58:02 -04:00
Olivier Gagnon
acd51e8328 work 2021-09-17 02:04:44 -04:00
Olivier Gagnon
e79ea4d3cb text editor is squished 2021-09-11 12:56:08 -04:00
Olivier Gagnon
e5dcb424a2 sneak in corp API. 2021-09-10 02:17:55 -04:00
Olivier Gagnon
2a13db39c7 fix sleeve memory bug 2021-09-08 23:47:34 -04:00
Olivier Gagnon
506122f5b8 fmt, remove corp routing, lint 2021-09-06 15:06:08 -04:00
Olivier Gagnon
05f3b1c390 remove some function from autocomplete. 2021-09-04 20:14:33 -04:00
Olivier Gagnon
a18bdd6afc prettify, sorry for the big ass commit 2021-09-04 19:09:30 -04:00
David Edmondson
7bfceb1690 Replace old-style import with type 2021-08-26 16:42:57 -07:00
Olivier Gagnon
e2d74f9432 fix beautify 2021-08-25 16:14:47 -04:00
Olivier Gagnon
60d95a90d0 Fix script not being saved on their individual computers. 2021-08-23 09:33:49 -04:00
Snarling
faf625b34d Update Root.tsx
Went back to tracking lastServer as a hostname, since server IPs are not static.
2021-08-23 04:04:52 -07:00
Snarling
1a8b194341 Update Root.tsx
Removed unnecessary conversions between server and ip
2021-08-23 04:04:52 -07:00
Snarling
386f8a11c5 Change lastServer to reference the server ip
Should fix issue with newly saved scripts failing to run
2021-08-23 04:04:52 -07:00
Olivier Gagnon
6d2b8b4f6f v0.52.8 2021-08-23 02:09:49 -04:00
Olivier Gagnon
0b3c114cd0 Fix monaco jumping to end of file. 2021-08-22 23:57:00 -04:00
Olivier Gagnon
e0d631f8b3 trying to fix the jumping bug 2021-08-22 23:46:30 -04:00
Olivier Gagnon
6561413137 Fix Corp research popup box appearing behind one another. 2021-08-21 02:06:48 -04:00
Olivier Gagnon
b67c03ff8a hotfix broken editor shortcuts 2021-08-21 01:54:39 -04:00