MLE: Fix Modal

This commit is contained in:
thororen1234 2026-05-18 18:59:25 -04:00
parent fede183873
commit eb95d7fb8d
No known key found for this signature in database
2 changed files with 32 additions and 26 deletions

View file

@ -114,24 +114,20 @@ export function LogsModal({ modalProps, initalQuery }: Props) {
}
actions={[
{
text: "Clear All Logs",
variant: "dangerPrimary",
onClick: () => Alerts.show({
title: "Clear Logs",
body: "Are you sure you want to clear all the logs",
confirmText: "Clear",
// @ts-expect-error not typed
confirmVariant: "critical-primary",
cancelText: "Cancel",
onConfirm: async () => {
await clearLogs();
reset();
}
})
text: `Sort ${sortNewest ? "Oldest First" : "Newest First"}`,
variant: "secondary",
onClick: () => {
setSortNewest(e => {
const val = !e;
settings.store.sortNewest = val;
return val;
});
contentRef.current?.firstElementChild?.scrollTo(0, 0);
}
},
{
text: "Clear Visible Logs",
variant: "dangerSecondary",
variant: "critical-secondary",
disabled: messages?.length === 0,
onClick: () => Alerts.show({
title: "Clear Logs",
@ -147,16 +143,20 @@ export function LogsModal({ modalProps, initalQuery }: Props) {
})
},
{
text: `Sort ${sortNewest ? "Oldest First" : "Newest First"}`,
variant: "secondary",
onClick: () => {
setSortNewest(e => {
const val = !e;
settings.store.sortNewest = val;
return val;
});
contentRef.current?.firstElementChild?.scrollTo(0, 0);
}
text: "Clear All Logs",
variant: "critical-primary",
onClick: () => Alerts.show({
title: "Clear Logs",
body: "Are you sure you want to clear all the logs",
confirmText: "Clear",
// @ts-expect-error not typed
confirmVariant: "critical-primary",
cancelText: "Cancel",
onConfirm: async () => {
await clearLogs();
reset();
}
})
}
]}
>

View file

@ -54,7 +54,9 @@
.vc-msg-logger-enhanced-modal-tab-bar {
margin-top: 20px;
width: 100%;
margin-bottom: -24px;
margin-left: -24px;
width: 114.5%;
justify-content: space-around;
}
@ -100,4 +102,8 @@
.vc-updater-modal-content {
padding: 1rem 2rem;
}
header:has(.vc-msg-logger-enhanced-modal-tab-bar) [class*="headerTrailing_"] {
margin-top: 0;
}