Skip to content

Commit f44944a

Browse files
fix: Use imageControl to upload video poster
closes: frappe#407
1 parent 833eda4 commit f44944a

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

frontend/src/components/BlockPropertySections/VideoOptionsSection.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import InlineInput from "@/components/Controls/InlineInput.vue";
22
import OptionToggle from "@/components/Controls/OptionToggle.vue";
3+
import PropertyControl from "@/components/Controls/PropertyControl.vue";
4+
import ImageUploadInput from "@/components/ImageUploadInput.vue";
35
import blockController from "@/utils/blockController";
46

57
const videoOptionsSectionProperties = [
@@ -17,17 +19,20 @@ const videoOptionsSectionProperties = [
1719
},
1820
},
1921
{
20-
component: InlineInput,
22+
component: PropertyControl,
2123
getProps: () => {
2224
return {
25+
component: ImageUploadInput,
26+
controlType: "attribute",
27+
styleProperty: "poster",
2328
label: "Poster",
24-
modelValue: blockController.getAttribute("poster"),
29+
imageURL: blockController.getAttribute("poster"),
2530
};
2631
},
27-
searchKeyWords: "Poster",
2832
events: {
29-
"update:modelValue": (val: string) => blockController.setAttribute("poster", val),
33+
"update:imageURL": (val: string) => blockController.setAttribute("poster", val),
3034
},
35+
searchKeyWords: "Poster, Image, Thumbnail, Preview",
3136
},
3237
{
3338
component: OptionToggle,

0 commit comments

Comments
 (0)