2
0

editor-modal-editorselect.vue 7.7 KB

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