Fix All Applications dropdown order to match main menu
- Reorder apps: Chat, Paper, Mail, Drive, Calendar, Tasks first - Then other apps: Research, Meet, Analytics, Monitoring
This commit is contained in:
parent
e79bb880fd
commit
faaabefc1c
5 changed files with 2419 additions and 1426 deletions
|
|
@ -321,34 +321,6 @@
|
|||
<span>Chat</span>
|
||||
</a>
|
||||
|
||||
<!-- Research -->
|
||||
<a
|
||||
class="app-item"
|
||||
href="#research"
|
||||
data-section="research"
|
||||
role="menuitem"
|
||||
aria-label="Research application"
|
||||
hx-get="/suite/research/research.html"
|
||||
hx-target="#main-content"
|
||||
hx-push-url="/#research"
|
||||
>
|
||||
<div class="app-icon" aria-hidden="true">
|
||||
<svg
|
||||
width="20"
|
||||
height="20"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
>
|
||||
<circle cx="11" cy="11" r="8" />
|
||||
<path d="m21 21-4.35-4.35" />
|
||||
<path d="M11 8v6M8 11h6" />
|
||||
</svg>
|
||||
</div>
|
||||
<span>Research</span>
|
||||
</a>
|
||||
|
||||
<!-- Paper -->
|
||||
<a
|
||||
class="app-item"
|
||||
|
|
@ -380,6 +352,35 @@
|
|||
<span>Paper</span>
|
||||
</a>
|
||||
|
||||
<!-- Mail -->
|
||||
<a
|
||||
class="app-item"
|
||||
href="#mail"
|
||||
data-section="mail"
|
||||
role="menuitem"
|
||||
aria-label="Mail application"
|
||||
hx-get="/suite/mail/mail.html"
|
||||
hx-target="#main-content"
|
||||
hx-push-url="/#mail"
|
||||
>
|
||||
<div class="app-icon" aria-hidden="true">
|
||||
<svg
|
||||
width="20"
|
||||
height="20"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
>
|
||||
<path
|
||||
d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"
|
||||
/>
|
||||
<polyline points="22,6 12,13 2,6" />
|
||||
</svg>
|
||||
</div>
|
||||
<span>Mail</span>
|
||||
</a>
|
||||
|
||||
<!-- Drive -->
|
||||
<a
|
||||
class="app-item"
|
||||
|
|
@ -473,16 +474,16 @@
|
|||
<span>Tasks</span>
|
||||
</a>
|
||||
|
||||
<!-- Mail -->
|
||||
<!-- Research -->
|
||||
<a
|
||||
class="app-item"
|
||||
href="#mail"
|
||||
data-section="mail"
|
||||
href="#research"
|
||||
data-section="research"
|
||||
role="menuitem"
|
||||
aria-label="Mail application"
|
||||
hx-get="/suite/mail/mail.html"
|
||||
aria-label="Research application"
|
||||
hx-get="/suite/research/research.html"
|
||||
hx-target="#main-content"
|
||||
hx-push-url="/#mail"
|
||||
hx-push-url="/#research"
|
||||
>
|
||||
<div class="app-icon" aria-hidden="true">
|
||||
<svg
|
||||
|
|
@ -493,13 +494,12 @@
|
|||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
>
|
||||
<path
|
||||
d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"
|
||||
/>
|
||||
<polyline points="22,6 12,13 2,6" />
|
||||
<circle cx="11" cy="11" r="8" />
|
||||
<path d="m21 21-4.35-4.35" />
|
||||
<path d="M11 8v6M8 11h6" />
|
||||
</svg>
|
||||
</div>
|
||||
<span>Mail</span>
|
||||
<span>Research</span>
|
||||
</a>
|
||||
|
||||
<!-- Meet -->
|
||||
|
|
|
|||
|
|
@ -43,6 +43,21 @@
|
|||
// If target doesn't exist or response is 404, prevent the swap
|
||||
if (!target || status === 404) {
|
||||
event.detail.shouldSwap = false;
|
||||
console.warn("HTMX swap prevented: target not found or 404 response");
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if target is actually in the DOM (prevents insertBefore errors)
|
||||
if (!document.body.contains(target)) {
|
||||
event.detail.shouldSwap = false;
|
||||
console.warn("HTMX swap prevented: target not in DOM");
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if target has a parent (required for most swap operations)
|
||||
if (!target.parentNode) {
|
||||
event.detail.shouldSwap = false;
|
||||
console.warn("HTMX swap prevented: target has no parent");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -55,6 +70,17 @@
|
|||
}
|
||||
});
|
||||
|
||||
// Handle swap errors gracefully
|
||||
document.body.addEventListener("htmx:swapError", (event) => {
|
||||
console.error("HTMX swap error:", event.detail);
|
||||
// Don't show notification for swap errors - they're usually timing issues
|
||||
});
|
||||
|
||||
// Handle HTMX errors more gracefully
|
||||
document.body.addEventListener("htmx:onLoadError", (event) => {
|
||||
console.error("HTMX load error:", event.detail);
|
||||
});
|
||||
|
||||
// Handle successful swaps
|
||||
document.body.addEventListener("htmx:afterSwap", (event) => {
|
||||
// Auto-scroll messages if in chat
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -258,7 +258,7 @@
|
|||
<p>Manage your active login sessions</p>
|
||||
</div>
|
||||
<div class="sessions-list" id="sessions-list"
|
||||
hx-get="/api/user/security</p>/sessions"
|
||||
hx-get="/api/user/security/sessions"
|
||||
hx-trigger="load"
|
||||
hx-swap="innerHTML">
|
||||
<div class="loading-state">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue