refactor: improve SystemSection.vue by adding computed properties for upload state management, enhancing code readability and maintainability
This commit is contained in:
parent
3d00511626
commit
c3db522c87
@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { useForm } from '@inertiajs/vue3';
|
||||
import { Save } from '@lucide/vue';
|
||||
import { ref } from 'vue';
|
||||
import { computed, ref } from 'vue';
|
||||
import { toast } from 'vue-sonner';
|
||||
import { PhoneNumberInput } from '@/components/form/phone-number-input';
|
||||
import MediaDropzone from '@/components/media/MediaDropzone.vue';
|
||||
@ -32,9 +32,9 @@ const logoState = ref<MediaUploadState>(createMediaUploadState());
|
||||
const faviconState = ref<MediaUploadState>(createMediaUploadState());
|
||||
const loginCoverState = ref<MediaUploadState>(createMediaUploadState());
|
||||
|
||||
const isUploading = computed(() =>
|
||||
logoState.value.pendingUploads > 0 ||
|
||||
faviconState.value.pendingUploads > 0 ||
|
||||
const isUploading = computed(() =>
|
||||
logoState.value.pendingUploads > 0 ||
|
||||
faviconState.value.pendingUploads > 0 ||
|
||||
loginCoverState.value.pendingUploads > 0
|
||||
);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user