26
26
v-icon( color ='blue' , :left ='$vuetify.breakpoint.lgAndUp' ) sort_by_alpha
27
27
span.white--text ( v-if ='$vuetify.breakpoint.lgAndUp' ) {{ $t('editor:page') }}
28
28
v-content
29
- editor-code
29
+ component ( :is = 'currentEditor' )
30
30
component( :is ='currentModal' )
31
31
v-dialog( v-model ='dialogProgress' , persistent , max-width ='350' )
32
32
v-card( color ='blue darken-3' , dark )
38
38
)
39
39
.subheading {{ $t('editor:save.processing') }}
40
40
.caption.blue--text.text--lighten-3 {{ $t('editor:save.pleaseWait') }}
41
+ v-dialog( v-model ='dialogEditorSelector' , persistent , max-width ='550' )
42
+ v-card( color ='blue darken-3' , dark )
43
+ v-card-text.text-xs-center.py-4
44
+ .subheading Which editor do you want to use?
45
+ v-container( grid-list-lg , fluid )
46
+ v-layout( row , wrap , justify-center )
47
+ v-flex( xs4 )
48
+ v-card(
49
+ hover
50
+ light
51
+ ripple
52
+ )
53
+ v-card-text.text-xs-center ( @click ='selectEditor("code")' )
54
+ v-icon( large , color ='primary' ) code
55
+ .body-2.mt-2 Code
56
+ v-flex( xs4 )
57
+ v-card(
58
+ hover
59
+ light
60
+ ripple
61
+ )
62
+ v-card-text.text-xs-center ( @click ='selectEditor("markdown")' )
63
+ v-icon( large , color ='primary' ) list_alt
64
+ .body-2.mt-2 Markdown
65
+ v-flex( xs4 )
66
+ v-card.grey (
67
+ hover
68
+ light
69
+ ripple
70
+ )
71
+ v-card-text.text-xs-center ( @click ='selectEditor("wysiwyg")' )
72
+ v-icon( large , color ='grey darken-1' ) web
73
+ .body-2.mt-2.grey--text.text--darken-2 Visual Builder
41
74
42
75
v-snackbar(
43
76
:color ='notification.style'
@@ -69,12 +102,16 @@ export default {
69
102
components: {
70
103
AtomSpinner,
71
104
editorCode : () => import (/* webpackChunkName: "editor-code" */ ' ./editor/editor-code.vue' ),
105
+ editorMarkdown : () => import (/* webpackChunkName: "editor-markdown" */ ' ./editor/editor-markdown.vue' ),
106
+ editorWysiwyg : () => import (/* webpackChunkName: "editor-wysiwyg" */ ' ./editor/editor-wysiwyg.vue' ),
72
107
editorModalProperties : () => import (/* webpackChunkName: "editor" */ ' ./editor/editor-modal-properties.vue' )
73
108
},
74
109
data () {
75
110
return {
76
111
currentModal: ' ' ,
77
- dialogProgress: false
112
+ currentEditor: ' ' ,
113
+ dialogProgress: false ,
114
+ dialogEditorSelector: false
78
115
}
79
116
},
80
117
computed: {
@@ -85,11 +122,20 @@ export default {
85
122
mounted () {
86
123
if (this .mode === ' create' ) {
87
124
_ .delay (() => {
88
- this .openModal ( ' properties ' )
125
+ this .dialogEditorSelector = true
89
126
}, 500 )
90
127
}
91
128
},
92
129
methods: {
130
+ selectEditor (name ) {
131
+ this .currentEditor = ` editor${ _ .startCase (name)} `
132
+ this .dialogEditorSelector = false
133
+ if (this .mode === ' create' ) {
134
+ _ .delay (() => {
135
+ this .openModal (' properties' )
136
+ }, 500 )
137
+ }
138
+ },
93
139
openModal (name ) {
94
140
this .currentModal = ` editorModal${ _ .startCase (name)} `
95
141
},
0 commit comments