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-overlay" x-data="settingsInit()" @keydown.escape="window.history.back()">
|
||||||
<div class="settings-panel" style="position:relative;">
|
<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 -->
|
<!-- Left navigation -->
|
||||||
<div class="settings-nav">
|
<div class="settings-nav">
|
||||||
@@ -798,6 +798,15 @@ document.addEventListener('alpine:init', function() {
|
|||||||
if (r.ok) { this.githubLinked = false; }
|
if (r.ok) { this.githubLinked = false; }
|
||||||
} catch(e) {}
|
} 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();
|
||||||
|
}
|
||||||
|
},
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -88,7 +88,7 @@
|
|||||||
<!-- Not linked -->
|
<!-- Not linked -->
|
||||||
<div class="gitea-empty" x-show="giteaStatus==='not_linked'">
|
<div class="gitea-empty" x-show="giteaStatus==='not_linked'">
|
||||||
<div>Connect your Gitea account to see your projects.</div>
|
<div>Connect your Gitea account to see your projects.</div>
|
||||||
<a class="gitea-connect" href="/auth/login?provider=gitea">🔗 Connect Gitea</a>
|
<a class="gitea-connect" href="/auth/login?provider=gitea&mode=link">🔗 Connect Gitea</a>
|
||||||
<span style="margin:0 8px;color:var(--text-dim);">or</span>
|
<span style="margin:0 8px;color:var(--text-dim);">or</span>
|
||||||
<a class="gitea-connect" href="/auth/login?provider=gitea">📝 Register with Gitea</a>
|
<a class="gitea-connect" href="/auth/login?provider=gitea">📝 Register with Gitea</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user