format frontend files

This commit is contained in:
Yisroel Baum 2026-06-01 22:12:32 +03:00
parent 7fc8c37037
commit 757f149dea
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
2 changed files with 5 additions and 19 deletions

View file

@ -79,10 +79,7 @@ export const useElementsStore = defineStore('elements', () => {
}
}
async function updateElement(
elementId: string,
input: UpdateElementInput,
): Promise<boolean> {
async function updateElement(elementId: string, input: UpdateElementInput): Promise<boolean> {
saveError.value = null
isSaving.value = true

View file

@ -16,9 +16,7 @@ interface ElementForm {
const route = useRoute()
const elementsStore = useElementsStore()
const { element, isLoading, error, isSaving, saveError } = storeToRefs(
elementsStore,
)
const { element, isLoading, error, isSaving, saveError } = storeToRefs(elementsStore)
const savedMessage = ref<string | null>(null)
const form = reactive<ElementForm>({
@ -103,9 +101,7 @@ async function handleSubmit(): Promise<void> {
<h1 class="admin-element-page__heading">Edit Element</h1>
</header>
<p v-if="isLoading" class="admin-element-page__status">
Loading element...
</p>
<p v-if="isLoading" class="admin-element-page__status">Loading element...</p>
<p
v-else-if="error"
class="admin-element-page__status admin-element-page__status--error"
@ -113,11 +109,7 @@ async function handleSubmit(): Promise<void> {
>
{{ error }}
</p>
<form
v-else-if="element"
class="admin-element-page__form"
@submit.prevent="handleSubmit"
>
<form v-else-if="element" class="admin-element-page__form" @submit.prevent="handleSubmit">
<label class="admin-element-page__field">
<span class="admin-element-page__label">Title</span>
<input
@ -189,10 +181,7 @@ async function handleSubmit(): Promise<void> {
</button>
<p
v-if="statusMessage !== null"
:class="[
'admin-element-page__status',
'admin-element-page__status--inline',
]"
:class="['admin-element-page__status', 'admin-element-page__status--inline']"
data-cy="admin-element-status"
aria-live="polite"
>