fix: two UX issues
1. Settings X button: closeSettings() goes back, skipping hash-only navigation → No more double-click to close 2. Workspaces page: Connect Gitea link now includes &mode=link → Same link as Settings → Integrations (was missing mode=link)
This commit is contained in:
@@ -81,7 +81,7 @@
|
||||
|
||||
<div class="settings-overlay" x-data="settingsInit()" @keydown.escape="window.history.back()">
|
||||
<div class="settings-panel" style="position:relative;">
|
||||
<button class="settings-close" @click="window.history.back()" title="Close">×</button>
|
||||
<button class="settings-close" @click="closeSettings()" title="Close">×</button>
|
||||
|
||||
<!-- Left navigation -->
|
||||
<div class="settings-nav">
|
||||
@@ -798,6 +798,15 @@ document.addEventListener('alpine:init', function() {
|
||||
if (r.ok) { this.githubLinked = false; }
|
||||
} catch(e) {}
|
||||
},
|
||||
closeSettings() {
|
||||
// Go back to previous page, skipping any hash-only navigation
|
||||
if (document.referrer && document.referrer.includes('/settings')) {
|
||||
// Came from another settings tab — use history until we leave settings
|
||||
history.go(-2);
|
||||
} else {
|
||||
history.back();
|
||||
}
|
||||
},
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user