@@ -339,7 +339,7 @@ export class ServerManagerView {
339339 firstTab . properties . tabId ,
340340 ) ! ;
341341 let lastActiveTab = this . getTabById ( lastActiveTabId ) ! ;
342- if ( lastActiveTab . properties . index >= servers . length ) {
342+ if ( lastActiveTab . properties . order >= servers . length ) {
343343 lastActiveTab = firstTab ;
344344 }
345345
@@ -367,15 +367,15 @@ export class ServerManagerView {
367367 }
368368 }
369369
370- initServer ( server : ServerConfig , index : number ) : ServerTab {
370+ initServer ( server : ServerConfig , order : number ) : ServerTab {
371371 const tabId = server . id ;
372372 const tab : ServerTab = new ServerTab ( {
373373 role : "server" ,
374374 icon : DomainUtil . iconAsUrl ( server . icon ) ,
375375 label : server . alias ,
376376 $root : this . $tabsContainer ,
377377 onClick : this . activateLastTab . bind ( this , tabId ) ,
378- index ,
378+ order ,
379379 tabId,
380380 onHover : this . onHover . bind ( this , tabId ) ,
381381 onHoverOut : this . onHoverOut . bind ( this , tabId ) ,
@@ -555,7 +555,7 @@ export class ServerManagerView {
555555 return ;
556556 }
557557
558- const index = this . tabs . length ;
558+ const order = this . tabs . length ;
559559 const tabId = this . generateTabId ( ) ;
560560 this . functionalTabs . set ( tabProperties . page , tabId ) ;
561561 const $view = await tabProperties . makeView ( ) ;
@@ -568,7 +568,7 @@ export class ServerManagerView {
568568 label : tabProperties . label ,
569569 page : tabProperties . page ,
570570 $root : this . $tabsContainer ,
571- index ,
571+ order ,
572572 tabId,
573573 onClick : this . activateTab . bind ( this , tabId ) ,
574574 onDestroy : async ( ) => {
@@ -636,7 +636,6 @@ export class ServerManagerView {
636636 }
637637
638638 async activateLastTab ( id : string ) : Promise < void > {
639- // Open all the tabs in background, also activate the tab based on the index
640639 await this . activateTab ( id ) ;
641640 // Save last active tab via main process to avoid JSON DB errors
642641 ipcRenderer . send ( "save-last-tab" , id ) ;
@@ -650,7 +649,7 @@ export class ServerManagerView {
650649 role : tab . properties . role ,
651650 page : tab . properties . page ,
652651 label : tab . properties . label ,
653- index : tab . properties . index ,
652+ order : tab . properties . order ,
654653 id : tab . properties . tabId ,
655654 } ;
656655 }
@@ -663,7 +662,7 @@ export class ServerManagerView {
663662 tabs : ServerOrFunctionalTab [ ] ,
664663 order : number ,
665664 ) : ServerOrFunctionalTab | undefined {
666- return tabs . find ( ( tab ) => tab . properties . index === order ) ;
665+ return tabs . find ( ( tab ) => tab . properties . order === order ) ;
667666 }
668667
669668 async activateTab ( id : string , hideOldTab = true ) : Promise < void > {
@@ -767,7 +766,7 @@ export class ServerManagerView {
767766 }
768767
769768 async reloadView ( ) : Promise < void > {
770- // Save and remember the index of last active tab so that we can use it later
769+ // Save and remember the id of last active tab so that we can use it later
771770 const { activeTab} = this ;
772771 if ( activeTab !== undefined ) {
773772 ConfigUtil . setConfigItem ( "lastActiveTabId" , activeTab . properties . tabId ) ;
0 commit comments