mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-30 03:23:48 +01:00
added logic to also check hostname for "current script"
This commit is contained in:
parent
9ddb1c4379
commit
ca28582265
@ -54,7 +54,7 @@ interface IProps {
|
||||
vim: boolean;
|
||||
}
|
||||
|
||||
// TODO: try to removve global symbols
|
||||
// TODO: try to remove global symbols
|
||||
let symbolsLoaded = false;
|
||||
let symbols: string[] = [];
|
||||
export function SetupTextEditor(): void {
|
||||
@ -777,12 +777,14 @@ export function Root(props: IProps): React.ReactElement {
|
||||
}}
|
||||
>
|
||||
{openScripts.map(({ fileName, hostname }, index) => {
|
||||
const editingCurrentScript = currentScript?.fileName === openScripts[index].fileName &&
|
||||
currentScript?.hostname === openScripts[index].hostname
|
||||
const iconButtonStyle = {
|
||||
maxWidth: "25px",
|
||||
minWidth: "25px",
|
||||
minHeight: '38.5px',
|
||||
maxHeight: '38.5px',
|
||||
...(currentScript?.fileName === openScripts[index].fileName ? {
|
||||
...(editingCurrentScript ? {
|
||||
background: Settings.theme.button,
|
||||
borderColor: Settings.theme.button,
|
||||
color: Settings.theme.primary
|
||||
@ -818,7 +820,7 @@ export function Root(props: IProps): React.ReactElement {
|
||||
if (e.button === 1) onTabClose(index);
|
||||
}}
|
||||
style={{
|
||||
...(currentScript?.fileName === openScripts[index].fileName ? {
|
||||
...(editingCurrentScript ? {
|
||||
background: Settings.theme.button,
|
||||
borderColor: Settings.theme.button,
|
||||
color: Settings.theme.primary
|
||||
|
Loading…
Reference in New Issue
Block a user