chore: install prettier

This commit is contained in:
Viet An
2026-05-04 15:22:27 +07:00
parent 93d29ca7d8
commit bd58e2b847
267 changed files with 22950 additions and 13581 deletions

View File

@@ -1,8 +1,12 @@
<template>
<div class="field"
<div
class="field"
style="min-width: 360px"
>
<label class="label is-flex is-align-items-center fsb-18 mb-2" for="name">
<label
class="label is-flex is-align-items-center fsb-18 mb-2"
for="name"
>
Template name <span class="has-text-danger ml-1">*</span>
</label>
<div class="control">
@@ -25,23 +29,26 @@
@click="handleSave"
:disabled="loading || !templateName.trim()"
>
<span class="icon" v-if="loading">
<span
class="icon"
v-if="loading"
>
<SvgIcon v-bind="{ name: 'loading.svg', type: 'white', size: 16 }"></SvgIcon>
</span>
<span class="icon" v-else-if="isEditMode">
<span
class="icon"
v-else-if="isEditMode"
>
<SvgIcon v-bind="{ name: 'save.svg', type: 'white', size: 16 }"></SvgIcon>
</span>
<span class="icon" v-else>
<span
class="icon"
v-else
>
<SvgIcon v-bind="{ name: 'add4.svg', type: 'white', size: 16 }"></SvgIcon>
</span>
<span>{{
loading
? isEditMode
? "Updating..."
: "Creating..."
: isEditMode
? "Update Template"
: "Create Template"
loading ? (isEditMode ? "Updating..." : "Creating...") : isEditMode ? "Update Template" : "Create Template"
}}</span>
</button>
<button
@@ -50,10 +57,16 @@
:disabled="loadingCreate"
@click="handleCreateNew"
>
<span class="icon" v-if="loadingCreate">
<span
class="icon"
v-if="loadingCreate"
>
<SvgIcon v-bind="{ name: 'loading.svg', type: 'white', size: 16 }" />
</span>
<span class="icon" v-else>
<span
class="icon"
v-else
>
<SvgIcon v-bind="{ name: 'add4.svg', type: 'white', size: 16 }"></SvgIcon>
</span>
<span>{{ loadingCreate ? "Creating..." : "Create" }}</span>
@@ -132,14 +145,14 @@ watch(
() => props.data.name,
(newName) => {
templateName.value = newName || "";
}
},
);
watch(
() => props.editMode,
(newEditMode) => {
isEditMode.value = newEditMode || false;
}
},
);
const handleSave = async () => {