refactor(frontend): use FormField disabled prop instead of class

Simplify FormField usages by using the new disabled prop instead of
manually setting both :class="{ disabled: ... }" and :disabled="...".
This commit is contained in:
kolaente
2026-01-10 21:09:11 +01:00
parent 3577ba5132
commit 1ea8a3cdba
7 changed files with 10 additions and 13 deletions

View File

@@ -14,8 +14,8 @@
v-model="filter.title"
v-focus
:label="$t('filters.attributes.title')"
:class="{ 'disabled': filterService.loading, 'is-danger': !titleValid }"
:disabled="filterService.loading || undefined"
:class="{ 'is-danger': !titleValid }"
:disabled="filterService.loading"
:placeholder="$t('filters.attributes.titlePlaceholder')"
type="text"
:error="titleValid ? null : $t('filters.create.titleRequired')"

View File

@@ -15,8 +15,8 @@
v-model="filter.title"
v-focus
:label="$t('filters.attributes.title')"
:class="{ 'disabled': filterService.loading, 'is-danger': !titleValid }"
:disabled="filterService.loading || undefined"
:class="{ 'is-danger': !titleValid }"
:disabled="filterService.loading"
:placeholder="$t('filters.attributes.titlePlaceholder')"
type="text"
:error="titleValid ? null : $t('filters.create.titleRequired')"

View File

@@ -10,7 +10,7 @@
v-model="label.title"
v-focus
:label="$t('label.attributes.title')"
:class="{ disabled: loading }"
:disabled="loading"
:placeholder="$t('label.attributes.titlePlaceholder')"
type="text"
:error="showError && label.title === '' ? $t('label.create.titleRequired') : null"

View File

@@ -9,7 +9,7 @@
v-model="project.title"
v-focus
:label="$t('project.title')"
:class="{ disabled: projectService.loading }"
:disabled="projectService.loading"
:placeholder="$t('project.create.titlePlaceholder')"
type="text"
name="projectTitle"

View File

@@ -13,8 +13,7 @@
v-model="project.title"
v-focus
:label="$t('project.title')"
:class="{ 'disabled': isLoading}"
:disabled="isLoading || undefined"
:disabled="isLoading"
:placeholder="$t('project.edit.titlePlaceholder')"
type="text"
@keyup.enter="save"
@@ -39,8 +38,7 @@
v-model="project.identifier"
v-tooltip="$t('project.edit.identifierTooltip')"
:label="$t('project.edit.identifier')"
:class="{ 'disabled': isLoading}"
:disabled="isLoading || undefined"
:disabled="isLoading"
:placeholder="$t('project.edit.identifierPlaceholder')"
type="text"
maxlength="10"

View File

@@ -14,8 +14,7 @@
v-model="team.name"
v-focus
:label="$t('team.attributes.name')"
:class="{ disabled: teamMemberService.loading }"
:disabled="teamMemberService.loading || undefined"
:disabled="teamMemberService.loading"
:placeholder="$t('team.attributes.namePlaceholder')"
type="text"
:error="showErrorTeamnameRequired && team.name === '' ? $t('team.attributes.nameRequired') : null"

View File

@@ -10,7 +10,7 @@
v-model="team.name"
v-focus
:label="$t('team.attributes.name')"
:class="{ 'disabled': teamService.loading }"
:disabled="teamService.loading"
:placeholder="$t('team.attributes.namePlaceholder')"
type="text"
:error="showError && team.name === '' ? $t('team.attributes.nameRequired') : null"