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.

103 lines
3.5 KiB

  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-xs-center.py-4
  5. .subheading Which editor do you want to use for this page?
  6. v-container(grid-list-lg, fluid)
  7. v-layout(row, wrap, justify-center)
  8. v-flex(xs4)
  9. v-card.radius-7.grey(
  10. hover
  11. light
  12. ripple
  13. )
  14. v-card-text.text-xs-center(@click='selectEditor("api")')
  15. img(src='/svg/icon-rest-api.svg', alt='API', style='width: 36px;')
  16. .body-2.mt-2.grey--text.text--darken-2 API Docs
  17. .caption.grey--text.text--darken-1 REST / GraphQL
  18. v-flex(xs4)
  19. v-card.radius-7.grey(
  20. hover
  21. light
  22. ripple
  23. )
  24. v-card-text.text-xs-center(@click='selectEditor("code")')
  25. img(src='/svg/icon-source-code.svg', alt='Code', style='width: 36px;')
  26. .body-2.mt-2.grey--text.text--darken-2 Code
  27. .caption.grey--text.text--darken-1 Raw HTML
  28. v-flex(xs4)
  29. v-card.radius-7(
  30. hover
  31. light
  32. ripple
  33. )
  34. v-card-text.text-xs-center(@click='selectEditor("markdown")')
  35. img(src='/svg/icon-markdown.svg', alt='Markdown', style='width: 36px;')
  36. .body-2.mt-2 Markdown
  37. .caption.grey--text Default
  38. v-flex(xs4)
  39. v-card.radius-7.grey(
  40. hover
  41. light
  42. ripple
  43. )
  44. v-card-text.text-xs-center(@click='selectEditor("tabular")')
  45. img(src='/svg/icon-table.svg', alt='Tabular', style='width: 36px;')
  46. .body-2.grey--text.mt-2.text--darken-2 Tabular
  47. .caption.grey--text.text--darken-1 Excel-like
  48. v-flex(xs4)
  49. v-card.radius-7.grey(
  50. hover
  51. light
  52. ripple
  53. )
  54. v-card-text.text-xs-center(@click='selectEditor("wysiwyg")')
  55. img(src='/svg/icon-open-in-browser.svg', alt='Visual Builder', style='width: 36px;')
  56. .body-2.mt-2.grey--text.text--darken-2 Visual Builder
  57. .caption.grey--text.text--darken-1 Drag-n-drop
  58. v-flex(xs4)
  59. v-card.radius-7.grey(
  60. hover
  61. light
  62. ripple
  63. )
  64. v-card-text.text-xs-center(@click='selectEditor("wikitext")')
  65. img(src='/svg/icon-news.svg', alt='WikiText', style='width: 36px;')
  66. .body-2.grey--text.mt-2.text--darken-2 WikiText
  67. .caption.grey--text.text--darken-1 MediaWiki Format
  68. .caption.blue--text.text--lighten-2 This cannot be changed once the page is created.
  69. </template>
  70. <script>
  71. import _ from 'lodash'
  72. import { sync } from 'vuex-pathify'
  73. export default {
  74. props: {
  75. value: {
  76. type: Boolean,
  77. default: false
  78. }
  79. },
  80. data() {
  81. return { }
  82. },
  83. computed: {
  84. isShown: {
  85. get() { return this.value },
  86. set(val) { this.$emit('input', val) }
  87. },
  88. currentEditor: sync('editor/editor')
  89. },
  90. methods: {
  91. selectEditor(name) {
  92. this.currentEditor = `editor${_.startCase(name)}`
  93. this.isShown = false
  94. }
  95. }
  96. }
  97. </script>
  98. <style lang='scss'>
  99. </style>