Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
suraj-webkul committed Sep 13, 2023
2 parents 78dcb44 + 1482cd8 commit e446744
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,17 @@ class="text-gray-600"

{{-- Boolean/Switch input --}}
@elseif ($field['type'] == 'boolean')
@php $selectedOption = core()->getConfigData($nameKey, $currentChannel->code, $currentLocale->code) ?? ($field['default_value'] ?? ''); @endphp
@php
$selectedOption = core()->getConfigData($nameKey, $currentChannel->code, $currentLocale->code) ?? ($field['default_value'] ?? '');
@endphp

<!-- Hidden Fild for unseleted Switch button -->
<x-admin::form.control-group.control
type="hidden"
:name="$name"
value="0"
>
</x-admin::form.control-group.control>

<x-admin::form.control-group.control
type="switch"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,6 @@ class="icon-bin text-[24px] text-black cursor-pointer"
return;
}
if (typeof this.uploadedFiles == 'object') {
return;
}
this.uploadedFiles.splice(index, 1);
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,14 @@ class="max-h-[609px] max-w-[560px]"
<img
class="min-w-[450px] rounded-[12px]"
:src="baseFile.path"
v-if='baseFile.type == "image"'
v-if="baseFile.type == 'image'"
@load="onMediaLoad()"
/>

<div class="min-w-[450px] rounded-[12px]" v-if='baseFile.type == "video"'>
<div
class="min-w-[450px] rounded-[12px]"
v-if="baseFile.type == 'video'"
>
<video
controls
width='475'
Expand Down Expand Up @@ -102,7 +105,7 @@ class="min-w-[450px] max-sm:min-w-full w-[490px]"
this.baseFile.type = 'image';
this.baseFile.path = this.media.images[0].large_image_url;
} else {
this.baseFile.type = this.media.videos[0].type;
this.baseFile.type = 'video';
this.baseFile.path = this.media.videos[0].video_url;
}
},
Expand All @@ -113,11 +116,13 @@ class="min-w-[450px] max-sm:min-w-full w-[490px]"
},
change(file) {
if (file.type == 'video') {
this.baseFile.type = file.type;
if (file.type == 'videos') {
this.baseFile.type = 'video';
this.baseFile.path = file.video_url;
} else {
this.baseFile.type = 'image';
this.baseFile.path = file.large_image_url;
}
Expand Down

0 comments on commit e446744

Please sign in to comment.