formatting

This commit is contained in:
taskylizard 2023-11-03 12:08:42 +05:30
parent eb40a4f049
commit 1da62476e4
No known key found for this signature in database
GPG Key ID: 5CABA3D642DDC497
6 changed files with 19 additions and 11 deletions

View File

@ -1 +1,2 @@
**/*.md **/*.md
pnpm-lock.yaml

View File

@ -5,14 +5,14 @@ interface Feedback {
message: string; message: string;
feedbackType?: string; feedbackType?: string;
contactEmail?: string; contactEmail?: string;
anonymous: boolean anonymous: boolean;
} }
const loading = ref(false); 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: "", anonymous: false,contactEmail: "" }); const feedback = reactive<Feedback>({ message: "", anonymous: false, contactEmail: "" });
const feedbackOptions = [ const feedbackOptions = [
{ label: "🐞 Bug", value: "bug" }, { label: "🐞 Bug", value: "bug" },
@ -73,7 +73,11 @@ async function handleSubmit(type?: string) {
</div> </div>
</div> </div>
<div class="button-container"> <div class="button-container">
<button v-for="item in feedbackOptions" :key="item.value" class="btn" @click="handleSubmit(item.value)"> <button
v-for="item in feedbackOptions"
:key="item.value"
class="btn"
@click="handleSubmit(item.value)">
<span>{{ item.label }}</span> <span>{{ item.label }}</span>
</button> </button>
</div> </div>
@ -83,7 +87,10 @@ async function handleSubmit(type?: string) {
<p class="desc">The wiki is...</p> <p class="desc">The wiki is...</p>
<div> <div>
<span>{{ getFeedbackOption(feedback.feedbackType)?.label }}</span> <span>{{ getFeedbackOption(feedback.feedbackType)?.label }}</span>
<button style="margin-left: 0.5rem" class="btn" @click="feedback.feedbackType = undefined"> <button
style="margin-left: 0.5rem"
class="btn"
@click="feedback.feedbackType = undefined">
<span class="i-carbon-close-large">close</span> <span class="i-carbon-close-large">close</span>
</button> </button>
</div> </div>
@ -101,7 +108,7 @@ async function handleSubmit(type?: string) {
</template> </template>
<style scoped> <style scoped>
.step>*+* { .step > * + * {
margin-top: 1rem; margin-top: 1rem;
} }

View File

@ -13,5 +13,5 @@ export default {
"sidebar-nav-before": () => h(Sidebar), "sidebar-nav-before": () => h(Sidebar),
}); });
}, },
enhanceApp({ app, router, siteData }) { }, enhanceApp({ app, router, siteData }) {},
} satisfies Theme; } satisfies Theme;

View File

@ -1,3 +1,3 @@
import { registerSW } from 'virtual:pwa-register' import { registerSW } from "virtual:pwa-register";
registerSW({ immediate: true }) registerSW({ immediate: true });

View File

@ -1,4 +1,4 @@
declare module '*.vue' { declare module "*.vue" {
import Vue from 'vue'; import Vue from "vue";
export default Vue; export default Vue;
} }

View File

@ -5,7 +5,7 @@
"docs:dev": "vitepress dev", "docs:dev": "vitepress dev",
"docs:build": "vitepress build", "docs:build": "vitepress build",
"docs:preview": "vitepress preview", "docs:preview": "vitepress preview",
"format": "prettier -w ." "format": "prettier -w --cache ."
}, },
"dependencies": { "dependencies": {
"@headlessui/vue": "^1.7.16", "@headlessui/vue": "^1.7.16",