mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-08-28 17:21:05 +00:00
fix: fix feedback looks
This commit is contained in:
@@ -29,7 +29,9 @@
|
||||
initialFeedbackId?: string | null;
|
||||
}>();
|
||||
|
||||
let tab = $state<"send" | "status">(initialFeedbackId ? "status" : "send");
|
||||
let tab = $state<"send" | "status">(
|
||||
typeof initialFeedbackId === "string" && initialFeedbackId ? "status" : "send",
|
||||
);
|
||||
let category = $state<FeedbackCategory>("bug");
|
||||
let subject = $state("");
|
||||
let message = $state("");
|
||||
@@ -110,7 +112,9 @@
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
if (initialFeedbackId) void openStatusItem(initialFeedbackId);
|
||||
if (typeof initialFeedbackId === "string" && initialFeedbackId) {
|
||||
void openStatusItem(initialFeedbackId);
|
||||
}
|
||||
});
|
||||
|
||||
async function handleSubmit() {
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
};
|
||||
|
||||
const openFeedback = (feedbackId?: string | null) => {
|
||||
feedbackFocusId = feedbackId ?? null;
|
||||
feedbackFocusId = typeof feedbackId === "string" && feedbackId ? feedbackId : null;
|
||||
showFeedbackModal = true;
|
||||
};
|
||||
|
||||
@@ -442,7 +442,7 @@
|
||||
|
||||
<button
|
||||
type="button"
|
||||
onclick={openFeedback}
|
||||
onclick={() => openFeedback()}
|
||||
class="shrink-0 mt-4 w-full px-3 py-2.5 text-left text-[18px] font-medium rounded-lg transition-all duration-200
|
||||
text-zinc-700 dark:text-zinc-200
|
||||
bg-zinc-200/70 dark:bg-zinc-800/80
|
||||
|
||||
@@ -44,8 +44,8 @@ export function OpenFeedbackReplyPopup(
|
||||
<p style="margin-bottom:.75rem"><strong>${esc(title)}</strong></p>
|
||||
<div style="padding:.9rem 1rem;border-radius:.75rem;background:color-mix(in srgb,currentColor 8%,transparent);white-space:pre-wrap">${esc(response)}</div>
|
||||
<div style="display:flex;gap:.75rem;justify-content:flex-end;margin-top:1.25rem;flex-wrap:wrap">
|
||||
<button type="button" id="bsplus-feedback-reply-dismiss" style="padding:.55rem 1rem;border-radius:.6rem;border:none;cursor:pointer;font-size:1rem;background:color-mix(in srgb,currentColor 12%,transparent);color:inherit">Dismiss</button>
|
||||
<button type="button" id="bsplus-feedback-reply-view" style="padding:.55rem 1rem;border-radius:.6rem;border:none;cursor:pointer;font-size:1rem;font-weight:600;background:currentColor;color:Canvas">View reply</button>
|
||||
<button type="button" id="bsplus-feedback-reply-dismiss" style="padding:.55rem 1rem;border-radius:.6rem;border:1px solid color-mix(in srgb,var(--text-primary,#18181b) 20%,transparent);cursor:pointer;font-size:1rem;background:transparent;color:var(--text-primary,#18181b)">Dismiss</button>
|
||||
<button type="button" id="bsplus-feedback-reply-view" style="padding:.55rem 1rem;border-radius:.6rem;border:none;cursor:pointer;font-size:1rem;font-weight:600;background:var(--text-primary,#18181b);color:var(--background-primary,#fff)">View reply</button>
|
||||
</div>
|
||||
</div>
|
||||
`).firstChild as HTMLElement;
|
||||
|
||||
Reference in New Issue
Block a user