fix feedback

This commit is contained in:
taskylizard 2023-11-03 10:35:44 +05:30
parent 55a15678c6
commit c81932d383
No known key found for this signature in database
GPG Key ID: 5CABA3D642DDC497
2 changed files with 6 additions and 8 deletions

View File

@ -68,10 +68,10 @@ export default withPwa(
], ],
}), }),
], ],
build: { // build: {
// Shut the fuck up // // Shut the fuck up
chunkSizeWarningLimit: Infinity, // chunkSizeWarningLimit: Infinity,
}, // },
}, },
themeConfig: { themeConfig: {
search: { search: {

View File

@ -4,7 +4,6 @@ import { reactive, ref } from "vue";
interface Feedback { interface Feedback {
message: string; message: string;
feedbackType?: string; feedbackType?: string;
anonymous?: boolean;
contactEmail?: string; contactEmail?: string;
} }
@ -12,7 +11,7 @@ const loading = ref(false);
const error = ref<unknown>(null); const error = ref<unknown>(null);
const success = ref(false); const success = ref(false);
const feedback = reactive<Feedback>({ message: "" }); const feedback = reactive<Feedback>({ message: "", contactEmail: "" });
const feedbackOptions = [ const feedbackOptions = [
{ label: "🐞 Bug", value: "bug" }, { label: "🐞 Bug", value: "bug" },
@ -33,12 +32,12 @@ function getFeedbackOption(value: string) {
async function handleSubmit(type?: string) { async function handleSubmit(type?: string) {
if (type) feedback.feedbackType = type as string; if (type) feedback.feedbackType = type as string;
loading.value = true;
const body: Feedback = { const body: Feedback = {
message: feedback.message, message: feedback.message,
feedbackType: feedback.feedbackType, feedbackType: feedback.feedbackType,
contactEmail: feedback.contactEmail, contactEmail: feedback.contactEmail,
anonymous: feedback.anonymous,
}; };
try { try {
@ -175,7 +174,6 @@ async function handleSubmit(type?: string) {
color: var(--vp-c-text-2); color: var(--vp-c-text-2);
} }
.fade-enter-active, .fade-enter-active,
.fade-leave-active { .fade-leave-active {
transition: opacity 0.25s ease; transition: opacity 0.25s ease;