GitHub improvements

This commit is contained in:
Andy Dixon
2026-04-20 13:40:00 +01:00
parent 1d97e907e0
commit c5debd9c77
20 changed files with 2525 additions and 1238 deletions
+11 -2
View File
@@ -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.
*/