diff --git a/src/components/MagicoPagebuilderPlugin.js b/src/components/MagicoPagebuilderPlugin.js index 210e5fa..ed1f327 100644 --- a/src/components/MagicoPagebuilderPlugin.js +++ b/src/components/MagicoPagebuilderPlugin.js @@ -1,36 +1,40 @@ -import MagicoPagebuilder from "./MagicoPagebuilder.vue"; +import MagicoPagebuilder from './MagicoPagebuilder.vue' export default { install: (app) => { - app.component("MagicoPagebuilder", MagicoPagebuilder); + app.component('MagicoPagebuilder', MagicoPagebuilder) - console.log(app); + console.log(app) app.config.globalProperties.$pagebuilder = { items: { core_section_text: { - label: "Pole nagłowek", - svg_off: "", + label: 'Pole nagłowek', + svg_off: '' }, core_section_textarea: { - label: "Pole tekstowe", - svg_off: "", + label: 'Pole tekstowe', + svg_off: '' }, core_section_html: { - label: "Pole HTML", - svg_off: "", + label: 'Pole HTML', + svg_off: '' }, core_section_image: { - label: "Obrazek", - svg_off: "", + label: 'Obrazek', + svg_off: '' }, + core_section_video: { + label: 'Wideo', + svg_off: '' + } }, axios: null, registerPlugin(name, item, component) { - this.items[name] = item; - if(component){ - app.component(name, component); + this.items[name] = item + if (component) { + app.component(name, component) } - }, - }; - }, -}; + } + } + } +} diff --git a/src/components/PagebuilderContent.vue b/src/components/PagebuilderContent.vue index 908c6fb..66401e5 100644 --- a/src/components/PagebuilderContent.vue +++ b/src/components/PagebuilderContent.vue @@ -94,6 +94,8 @@ import draggable from 'vuedraggable' import MagicoModal from './MagicoModal.vue' import SectionText from './plugin/SectionText.vue' import SectionTextarea from './plugin/SectionTextarea.vue' +import SectionVideo from './plugin/SectionVideo.vue' + import SectionHtml from './plugin/SectionHtml.vue' import SectionImage from './plugin/SectionImage.vue' @@ -120,7 +122,7 @@ export default { core_section_text: SectionText, core_section_html: SectionHtml, core_section_image: SectionImage, - + core_section_video: SectionVideo, DropdownSectionSection }, methods: { diff --git a/src/components/plugin/SectionVideo.vue b/src/components/plugin/SectionVideo.vue new file mode 100644 index 0000000..bd57b79 --- /dev/null +++ b/src/components/plugin/SectionVideo.vue @@ -0,0 +1,211 @@ + + + diff --git a/src/locale/en.js b/src/locale/en.js index 8c29ffe..f157c31 100644 --- a/src/locale/en.js +++ b/src/locale/en.js @@ -15,5 +15,12 @@ export default { section_type: 'Section type', container: 'Container', full_width: '100% width', - section_settings: 'Section settings' + section_settings: 'Section settings', + core_section_video: 'Video', + core_section_video_title: 'Video URL', + core_section_video_file: 'File', + core_section_video_ytlink: 'Youtube address of the video', + core_section_video_ytcode: 'Youtube IFRAME Code', + core_section_video_vimeocode: 'Vimeo IFRAME code', + core_section_video_type: 'Video type' } diff --git a/src/locale/pl.js b/src/locale/pl.js index 3389ace..b079c22 100644 --- a/src/locale/pl.js +++ b/src/locale/pl.js @@ -15,5 +15,12 @@ export default { section_type: 'Typ sekcji', container: 'Kontener', full_width: '100% szerokości', - section_settings: 'Ustawienia sekcji' + section_settings: 'Ustawienia sekcji', + core_section_video: 'Wideo', + core_section_video_title: 'Adres URL filmu', + core_section_video_file: 'Plik', + core_section_video_ytlink: 'Adres Youtube filmu', + core_section_video_ytcode: 'Kod IFRAME Youtube', + core_section_video_vimeocode: 'Kod IFRAME Vimeo', + core_section_video_type: 'Typ filmu' }