You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

231 lines
9.1 KiB

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