Skip to content

A self-hosted media server and file management system

fix: input label shows even if content is empty

aminnausin93dfb7d295c6
diff --git a/resources/js/components/forms/EditVideo.vue b/resources/js/components/forms/EditVideo.vue
index c594dc4e..b9e2b8d3 100755
--- a/resources/js/components/forms/EditVideo.vue
+++ b/resources/js/components/forms/EditVideo.vue
@@ -200,8 +200,6 @@ const handleSetTags = (newTags: VideoTagResource[]) => {
};
const handleRemoveTag = (tag: VideoTagResource) => {
- console.log(tag);
-
form.fields['video_tags'] = form.fields['video_tags']?.filter((itm) => itm.name !== tag.name);
if (tag.video_tag_id) form.fields['deleted_tags'] = [...form.fields['deleted_tags'], tag.video_tag_id];
diff --git a/resources/js/components/labels/FormInputLabel.vue b/resources/js/components/labels/FormInputLabel.vue
index b4ad56df..f4e436be 100755
--- a/resources/js/components/labels/FormInputLabel.vue
+++ b/resources/js/components/labels/FormInputLabel.vue
@@ -9,8 +9,12 @@ const props = defineProps<{
</script>
<template>
- <label :for="field?.name" :class="[`leading-none block font-medium text-gray-700 dark:text-neutral-200`, textSize ? textSize : 'text-sm', `${props.class ?? ''}`]">
- {{ field?.text }}
+ <label
+ v-if="field.text"
+ :for="field.name"
+ :class="[`leading-none block font-medium text-gray-700 dark:text-neutral-200`, textSize ? textSize : 'text-sm', `${props.class ?? ''}`]"
+ >
+ {{ field.text }}
</label>
<p v-if="field?.subtext" class="text-sm/6 text-gray-500 dark:text-gray-400">{{ field.subtext }}</p>
</template>
diff --git a/resources/js/components/table/TableBase.vue b/resources/js/components/table/TableBase.vue
index 628f5027..3d87210c 100755
--- a/resources/js/components/table/TableBase.vue
+++ b/resources/js/components/table/TableBase.vue
@@ -72,7 +72,6 @@ onMounted(() => {
<section v-if="props.useToolbar" class="flex justify-center sm:justify-between flex-col sm:flex-row gap-2">
<TextInputLabelled
:value="model ?? tableData.fields.searchQuery"
- :text="''"
:placeholder="`Search ${props.itemName ? `${props.itemName}...` : ''}`"
:id="'table-search'"
class="w-full sm:w-80"