File tree Expand file tree Collapse file tree 4 files changed +25
-2
lines changed Expand file tree Collapse file tree 4 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ Description:
18
18
</q-btn >
19
19
<q-toolbar-title > OverVue </q-toolbar-title >
20
20
<label for =" typescript" style =" margin-right : 10px ;" >
21
- <input type =" checkbox" name =" typescript" id =" typescript" />
21
+ <input type =" checkbox" name =" typescript" id =" typescript" :value = " exportAsTypescript " @change = " syncTypescriptFlag " />
22
22
Use Typescript
23
23
</label >
24
24
<SlackLoginWindow />
@@ -117,6 +117,7 @@ import OpenProjectComponent from "../components/file_system_interface/OpenProjec
117
117
import SlackLoginWindow from " ../components/slack_login/SlackLoginWindow.vue" ;
118
118
import ComponentTab from " ../components/home_sidebar_items/ComponentTab/ComponentTab.vue" ;
119
119
import StoreTab from " ../components/home_sidebar_items/StoreTab/StoreTab.vue" ;
120
+ import { mapState } from " vuex" ;
120
121
121
122
export default {
122
123
// Passed down from App.vue
@@ -137,6 +138,11 @@ export default {
137
138
ComponentTab,
138
139
StoreTab,
139
140
},
141
+ computed: {
142
+ ... mapState ([
143
+ " exportAsTypescript"
144
+ ]),
145
+ },
140
146
methods: {
141
147
undo () {
142
148
// this.$router.app.$children[0].undo();
@@ -146,6 +152,15 @@ export default {
146
152
redo () {
147
153
this .$emit (" redo" );
148
154
},
155
+ syncTypescriptFlag (e ) {
156
+ let checkboxValue;
157
+ if (e .target .value === " off" ) {
158
+ checkboxValue = " on"
159
+ } else {
160
+ checkboxValue = " off"
161
+ }
162
+ this .$store .commit (' EXPORT_AS_TYPESCRIPT' , checkboxValue);
163
+ },
149
164
},
150
165
};
151
166
</script >
Original file line number Diff line number Diff line change @@ -89,6 +89,11 @@ const mutations = {
89
89
90
90
// *** VUEX *** //////////////////////////////////////////////
91
91
92
+
93
+ [ types . EXPORT_AS_TYPESCRIPT ] : ( state , payload ) => {
94
+ state . exportAsTypescript = payload ;
95
+ } ,
96
+
92
97
[ types . CREATE_ACTION ] : ( state , payload ) => {
93
98
state . userActions . push ( payload ) ;
94
99
state . userActions . sort ( ) ;
Original file line number Diff line number Diff line change 1
1
import icons from './icons'
2
2
import htmlElementMap from './htmlElementMap'
3
3
4
+
4
5
const cloneDeep = require ( 'lodash.clonedeep' )
5
6
6
7
const newState = {
@@ -56,7 +57,7 @@ const newState = {
56
57
copyNumber : 0 ,
57
58
pastedComponent : { } ,
58
59
59
- exportAsTypescript : false ,
60
+ exportAsTypescript : 'off' ,
60
61
}
61
62
62
63
// closured method to ensure we only ever write the default state ONCE
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ export const UPDATE_COMPONENT_SIZE = 'UPDATE_COMPONENT_SIZE'
62
62
export const UPDATE_OPEN_MODAL = 'UPDATE_OPEN_MODAL'
63
63
export const DELETE_USER_ACTIONS = 'DELETE_USER_ACTIONS'
64
64
export const DELETE_USER_STATE = 'DELETE_USER_STATE'
65
+ export const EXPORT_AS_TYPESCRIPT = 'EXPORT_AS_TYPESCRIPT'
65
66
66
67
// Actions
67
68
export const addActionSelected = 'addActionSelected'
@@ -123,6 +124,7 @@ export const updateStartingSize = 'updateStartingSize'
123
124
export const deleteUserActions = 'deleteUserActions'
124
125
export const deleteUserState = 'deleteUserState'
125
126
127
+
126
128
// inactive mutations
127
129
// export const SET_STATE = 'SET_STATE'
128
130
// export const DELETE_COMPONENT = 'DELETE_COMPONENT'
You can’t perform that action at this time.
0 commit comments