mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 07:18:38 +02:00
Adding support for text/select options in Prompt command
This commit is contained in:
@@ -649,7 +649,7 @@ export function Root(props: IProps): React.ReactElement {
|
||||
if (serverScriptIndex === -1 || savedScriptCode !== server.scripts[serverScriptIndex as number].code) {
|
||||
PromptEvent.emit({
|
||||
txt: "Do you want to save changes to " + closingScript.fileName + "?",
|
||||
resolve: (result: boolean) => {
|
||||
resolve: (result: boolean | string) => {
|
||||
if (result) {
|
||||
// Save changes
|
||||
closingScript.code = savedScriptCode;
|
||||
@@ -704,7 +704,7 @@ export function Root(props: IProps): React.ReactElement {
|
||||
PromptEvent.emit({
|
||||
txt: "Do you want to overwrite the current editor content with the contents of " +
|
||||
openScript.fileName + " on the server? This cannot be undone.",
|
||||
resolve: (result: boolean) => {
|
||||
resolve: (result: boolean | string) => {
|
||||
if (result) {
|
||||
// Save changes
|
||||
openScript.code = serverScriptCode;
|
||||
|
||||
Reference in New Issue
Block a user