editor-modal-editorselect.vue 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. <template lang='pug'>
  2. v-dialog(v-model='isShown', persistent, max-width='700')
  3. v-card.radius-7(color='blue darken-3', dark)
  4. v-card-text.text-center.py-4
  5. .subtitle-1.white--text {{$t('editor:select.title')}}
  6. v-container(grid-list-lg, fluid)
  7. v-layout(row, wrap, justify-center)
  8. v-flex(xs4)
  9. v-hover
  10. template(v-slot:default='{ hover }')
  11. v-card.radius-7.grey.animated.fadeInUp(
  12. hover
  13. light
  14. ripple
  15. )
  16. v-card-text.text-center(@click='')
  17. img(src='/svg/editor-icon-api.svg', alt='API', style='width: 36px;')
  18. .body-2.mt-2.grey--text.text--darken-2 API Docs
  19. .caption.grey--text.text--darken-1 REST / GraphQL
  20. v-fade-transition
  21. v-overlay(
  22. v-if='hover'
  23. absolute
  24. color='primary'
  25. opacity='.8'
  26. )
  27. .body-2.mt-7 Coming Soon
  28. v-flex(xs4)
  29. v-hover
  30. template(v-slot:default='{ hover }')
  31. v-card.radius-7.grey.animated.fadeInUp.wait-p1s(
  32. hover
  33. light
  34. ripple
  35. )
  36. v-card-text.text-center(@click='')
  37. img(src='/svg/editor-icon-code.svg', alt='Code', style='width: 36px;')
  38. .body-2.mt-2.grey--text.text--darken-2 Code
  39. .caption.grey--text.text--darken-1 Raw HTML
  40. v-fade-transition
  41. v-overlay(
  42. v-if='hover'
  43. absolute
  44. color='primary'
  45. opacity='.8'
  46. )
  47. .body-2.mt-7 Coming Soon
  48. v-flex(xs4)
  49. v-card.radius-7.animated.fadeInUp.wait-p2s(
  50. hover
  51. light
  52. ripple
  53. )
  54. v-card-text.text-center(@click='selectEditor("markdown")')
  55. img(src='/svg/editor-icon-markdown.svg', alt='Markdown', style='width: 36px;')
  56. .body-2.primary--text.mt-2 Markdown
  57. .caption.grey--text Plain Text Formatting
  58. v-flex(xs4)
  59. v-hover
  60. template(v-slot:default='{ hover }')
  61. v-card.radius-7.grey.animated.fadeInUp.wait-p3s(
  62. hover
  63. light
  64. ripple
  65. )
  66. v-card-text.text-center(@click='')
  67. img(src='/svg/editor-icon-tabular.svg', alt='Tabular', style='width: 36px;')
  68. .body-2.grey--text.mt-2.text--darken-2 Tabular
  69. .caption.grey--text.text--darken-1 Excel-like
  70. v-fade-transition
  71. v-overlay(
  72. v-if='hover'
  73. absolute
  74. color='primary'
  75. opacity='.8'
  76. )
  77. .body-2.mt-7 Coming Soon
  78. //- v-flex(xs4)
  79. //- v-card.radius-7.grey(
  80. //- hover
  81. //- light
  82. //- ripple
  83. //- disabled
  84. //- )
  85. //- v-card-text.text-center(@click='selectEditor("wysiwyg")')
  86. //- img(src='/svg/icon-open-in-browser.svg', alt='Visual Builder', style='width: 36px;')
  87. //- .body-2.mt-2.grey--text.text--darken-2 Visual Builder
  88. //- .caption.grey--text.text--darken-1 Drag-n-drop
  89. v-flex(xs4)
  90. v-card.radius-7.animated.fadeInUp.wait-p4s(
  91. hover
  92. light
  93. ripple
  94. )
  95. v-card-text.text-center(@click='selectEditor("ckeditor")')
  96. img(src='/svg/editor-icon-ckeditor.svg', alt='Visual Editor', style='width: 36px;')
  97. .body-2.mt-2.primary--text Visual Editor
  98. .caption.grey--text Rich-text WYSIWYG
  99. v-flex(xs4)
  100. v-hover
  101. template(v-slot:default='{ hover }')
  102. v-card.radius-7.grey.animated.fadeInUp.wait-p5s(
  103. hover
  104. light
  105. ripple
  106. )
  107. v-card-text.text-center(@click='')
  108. img(src='/svg/editor-icon-wikitext.svg', alt='WikiText', style='width: 36px;')
  109. .body-2.grey--text.mt-2.text--darken-2 WikiText
  110. .caption.grey--text.text--darken-1 MediaWiki Format
  111. v-fade-transition
  112. v-overlay(
  113. v-if='hover'
  114. absolute
  115. color='primary'
  116. opacity='.8'
  117. )
  118. .body-2.mt-7 Coming Soon
  119. .caption.blue--text.text--lighten-2 {{$t('editor:select.cannotChange')}}
  120. v-card.radius-7.mt-3(color='teal darken-3', dark)
  121. v-card-text.text-center.py-4
  122. .subtitle-1.white--text {{$t('editor:select.customView')}}
  123. v-container(grid-list-lg, fluid)
  124. v-layout(row, wrap, justify-center)
  125. v-flex(xs4)
  126. v-hover
  127. template(v-slot:default='{ hover }')
  128. v-card.radius-7.grey.animated.fadeInUp(
  129. hover
  130. light
  131. ripple
  132. )
  133. v-card-text.text-center(@click='')
  134. img(src='/svg/icon-cube.svg', alt='From Template', style='width: 42px;')
  135. .body-2.mt-1.grey--text.text--darken-2 From Template
  136. .caption.grey--text.text--darken-1 Use an existing page / tree
  137. v-fade-transition
  138. v-overlay(
  139. v-if='hover'
  140. absolute
  141. color='teal'
  142. opacity='.8'
  143. )
  144. .body-2.mt-7 Coming Soon
  145. v-flex(xs4)
  146. v-hover
  147. template(v-slot:default='{ hover }')
  148. v-card.radius-7.grey.animated.fadeInUp.wait-p1s(
  149. hover
  150. light
  151. ripple
  152. )
  153. v-card-text.text-center(@click='')
  154. img(src='/svg/icon-tree-structure.svg', alt='Tree View', style='width: 42px;')
  155. .body-2.mt-1.grey--text.text--darken-2 Tree View
  156. .caption.grey--text.text--darken-1 List children pages
  157. v-fade-transition
  158. v-overlay(
  159. v-if='hover'
  160. absolute
  161. color='teal'
  162. opacity='.8'
  163. )
  164. .body-2.mt-7 Coming Soon
  165. v-flex(xs4)
  166. v-hover
  167. template(v-slot:default='{ hover }')
  168. v-card.radius-7.grey.animated.fadeInUp.wait-p2s(
  169. hover
  170. light
  171. ripple
  172. )
  173. v-card-text.text-center(@click='')
  174. img(src='/svg/icon-sewing-patch.svg', alt='Code', style='width: 42px;')
  175. .body-2.mt-1.grey--text.text--darken-2 Embed
  176. .caption.grey--text.text--darken-1 Include external pages
  177. v-fade-transition
  178. v-overlay(
  179. v-if='hover'
  180. absolute
  181. color='teal'
  182. opacity='.8'
  183. )
  184. .body-2.mt-7 Coming Soon
  185. v-card.radius-7.mt-3(color='grey darken-3', dark)
  186. v-toolbar(dense, flat)
  187. v-spacer
  188. v-btn(text, @click='goBack')
  189. v-icon(left) mdi-undo-variant
  190. span Cancel
  191. v-spacer
  192. </template>
  193. <script>
  194. import _ from 'lodash'
  195. import { sync } from 'vuex-pathify'
  196. export default {
  197. props: {
  198. value: {
  199. type: Boolean,
  200. default: false
  201. }
  202. },
  203. data() {
  204. return { }
  205. },
  206. computed: {
  207. isShown: {
  208. get() { return this.value },
  209. set(val) { this.$emit('input', val) }
  210. },
  211. currentEditor: sync('editor/editor')
  212. },
  213. methods: {
  214. selectEditor(name) {
  215. this.currentEditor = `editor${_.startCase(name)}`
  216. this.isShown = false
  217. },
  218. goBack() {
  219. window.history.go(-2)
  220. }
  221. }
  222. }
  223. </script>
  224. <style lang='scss'>
  225. </style>