refactor: editor-video -> vue component + localization

This commit is contained in:
NGPixel
2017-05-28 20:30:58 -04:00
parent 2aaebb3ce0
commit 87e780bea7
11 changed files with 133 additions and 89 deletions

View File

@@ -4,7 +4,16 @@
"codeblocktitle": "Insert Code Block",
"codeblockinsert": "Insert Code Block",
"codeblocklanguage": "Language",
"codeblockloading": "Loading code syntax for {{name}}"
"codeblockloading": "Loading code syntax for {{name}}",
"codeblockloadingerror": "Error: Unable to load language syntax.",
"codeblocksuccess": "Your code block has been inserted.",
"videotitle": "Insert Video",
"videolinktitle": "Enter the link to the video to be embedded:",
"videoinsert": "Insert Video",
"videonotsupported": "This URL is invalid or not supported!",
"videosupportedtitle": "The following are supported:",
"videoanymp4file": "Any standard MP4 file",
"videosuccess": "The video code has been inserted."
},
"nav": {
"home": "Home"

View File

@@ -1,28 +0,0 @@
.modal#modal-editor-video
.modal-background
.modal-container
.modal-content
header.is-green Insert Video Player
section
label.label Enter the link to the video to be embedded:
p.control.is-fullwidth
input.input(type='text', placeholder='https://www.youtube.com/watch?v=xxxxxxxxxxx', v-model='link')
span.help.is-red.is-hidden This URL is invalid or not supported!
.note The following are supported:
ul
li
i.icon-youtube-play
span Youtube
li
i.icon-vimeo
span Vimeo
li
i.icon-film
span Dailymotion
li
i.icon-video
span Any standard MP4 file
footer
a.button.is-grey.is-outlined(v-on:click='cancel') Discard
a.button.is-green(v-on:click='insertVideo') Insert Video

View File

@@ -18,5 +18,7 @@ block content
.editor-area
textarea(ref='editorTextArea')= pageData.markdown
editor-video
editor-codeblock
modal-discard-page(mode='create', current-path=pageData.meta.path)
page-loader(text=t('loading.editor'))

View File

@@ -18,6 +18,7 @@ block content
.editor-area
textarea(ref='editorTextArea')= pageData.markdown
editor-video
editor-codeblock
modal-discard-page(mode='edit', current-path=pageData.meta.path)
page-loader(text=t('loading.editor'))