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>
|
<span>Chat</span>
|
||||||
</a>
|
</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 -->
|
<!-- Paper -->
|
||||||
<a
|
<a
|
||||||
class="app-item"
|
class="app-item"
|
||||||
|
|
@ -380,6 +352,35 @@
|
||||||
<span>Paper</span>
|
<span>Paper</span>
|
||||||
</a>
|
</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 -->
|
<!-- Drive -->
|
||||||
<a
|
<a
|
||||||
class="app-item"
|
class="app-item"
|
||||||
|
|
@ -473,16 +474,16 @@
|
||||||
<span>Tasks</span>
|
<span>Tasks</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<!-- Mail -->
|
<!-- Research -->
|
||||||
<a
|
<a
|
||||||
class="app-item"
|
class="app-item"
|
||||||
href="#mail"
|
href="#research"
|
||||||
data-section="mail"
|
data-section="research"
|
||||||
role="menuitem"
|
role="menuitem"
|
||||||
aria-label="Mail application"
|
aria-label="Research application"
|
||||||
hx-get="/suite/mail/mail.html"
|
hx-get="/suite/research/research.html"
|
||||||
hx-target="#main-content"
|
hx-target="#main-content"
|
||||||
hx-push-url="/#mail"
|
hx-push-url="/#research"
|
||||||
>
|
>
|
||||||
<div class="app-icon" aria-hidden="true">
|
<div class="app-icon" aria-hidden="true">
|
||||||
<svg
|
<svg
|
||||||
|
|
@ -493,13 +494,12 @@
|
||||||
stroke="currentColor"
|
stroke="currentColor"
|
||||||
stroke-width="2"
|
stroke-width="2"
|
||||||
>
|
>
|
||||||
<path
|
<circle cx="11" cy="11" r="8" />
|
||||||
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"
|
<path d="m21 21-4.35-4.35" />
|
||||||
/>
|
<path d="M11 8v6M8 11h6" />
|
||||||
<polyline points="22,6 12,13 2,6" />
|
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<span>Mail</span>
|
<span>Research</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<!-- Meet -->
|
<!-- Meet -->
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,21 @@
|
||||||
// If target doesn't exist or response is 404, prevent the swap
|
// If target doesn't exist or response is 404, prevent the swap
|
||||||
if (!target || status === 404) {
|
if (!target || status === 404) {
|
||||||
event.detail.shouldSwap = false;
|
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;
|
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
|
// Handle successful swaps
|
||||||
document.body.addEventListener("htmx:afterSwap", (event) => {
|
document.body.addEventListener("htmx:afterSwap", (event) => {
|
||||||
// Auto-scroll messages if in chat
|
// 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>
|
<p>Manage your active login sessions</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="sessions-list" id="sessions-list"
|
<div class="sessions-list" id="sessions-list"
|
||||||
hx-get="/api/user/security</p>/sessions"
|
hx-get="/api/user/security/sessions"
|
||||||
hx-trigger="load"
|
hx-trigger="load"
|
||||||
hx-swap="innerHTML">
|
hx-swap="innerHTML">
|
||||||
<div class="loading-state">
|
<div class="loading-state">
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue