MLE: Fix Modal
This commit is contained in:
parent
fede183873
commit
eb95d7fb8d
2 changed files with 32 additions and 26 deletions
|
|
@ -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();
|
||||
}
|
||||
})
|
||||
}
|
||||
]}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue