GitHub improvements
This commit is contained in:
@@ -42,9 +42,9 @@ class Settings {
|
||||
/**
|
||||
* Opens the settings modal.
|
||||
*/
|
||||
async open() {
|
||||
async open(tabKey) {
|
||||
this._prefs = JSON.parse(JSON.stringify(this.app.state.preferences));
|
||||
this._activeTab = 'general';
|
||||
this._activeTab = tabKey || this._activeTab || 'general';
|
||||
|
||||
try {
|
||||
this._knownHosts = await window.go.api.Service.ListKnownHosts() || [];
|
||||
@@ -55,6 +55,15 @@ class Settings {
|
||||
this._render();
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens the settings modal on a specific tab.
|
||||
* @param {string} tabKey
|
||||
*/
|
||||
async openTab(tabKey) {
|
||||
this._activeTab = tabKey || 'general';
|
||||
return this.open(this._activeTab);
|
||||
}
|
||||
|
||||
/**
|
||||
* Closes the settings modal.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user