@@ -17,168 +17,14 @@ import App from './app'
17
17
import { EventBus } from './EventBus.js'
18
18
import db from './db.js'
19
19
20
- import YdDisplay from './pages/YdDisplay'
21
- import YdResource from './pages/YdResource'
22
-
23
20
import VueTouch from 'vue-touch'
24
21
Vue . use ( VueTouch , { name : 'v-touch' } )
25
22
26
23
import VueI18n from 'vue-i18n'
27
24
Vue . use ( VueI18n )
28
25
29
- const messages = {
30
- en : {
31
- message : {
32
- // Display
33
- done : 'Done' ,
34
- library : 'Library' ,
35
- new : 'New' ,
36
- settings : 'Settings' ,
37
- downloading : 'Uncompressing image resources, please wait' ,
38
-
39
- // Dialogs
40
- edit_card : 'Edit Card' ,
41
- choose_animation : 'Choose animation' ,
42
- none : 'None' ,
43
- enlarge : 'Enlarge' ,
44
- swing : 'Swing' ,
45
- delete_card : 'Delete this card' ,
46
- mute : 'Mute' ,
47
- edit_category : 'Edit Category' ,
48
- delete_courseware : 'Delete this courseware' ,
49
- edit_courseware_title : 'Edit courseware' ,
50
- choose_layout : 'Choose layout' ,
51
- // Resource
52
- back : 'Back' ,
53
- new_card : 'New Card' ,
54
- new_category : 'New Category' ,
55
- camera : 'Camera' ,
56
- album : 'Album' ,
57
- record : 'Record' ,
58
- play : 'Play' ,
59
- delete : 'Delete' ,
60
- cancel : 'Cancel' ,
61
- confirm : 'Confirm' ,
62
- choose_cover : 'Choose cover' ,
63
- category_name : 'Category name' ,
64
-
65
- // Alerts
66
- // Courseware settings
67
- cannot_delete_all : 'Cannot delete "All"' ,
68
- forbidden : 'Forbidden' ,
69
- are_you_sure : 'Are you sure?' ,
70
- delete_whole_category : 'Delete whole category' ,
71
- // Pick item
72
- cannot_navi_chosen_items : 'Please add chosen items before navigating to another folder' ,
73
- // Edit card
74
- missing_info_body : 'Please choose name, category and image before save' ,
75
- missing_info_title : 'Missing infomation' ,
76
- // Edit category
77
- require_category_title : 'Category title is required' ,
78
- cannot_edit_in_all : 'Cannot edit in "All" category' ,
79
- modify_card_in_library : 'Can be modified in Asset library' ,
80
- cannot_delete_in_all : 'Cannot delete items in "All" category' ,
81
- // New category
82
- must_choose_name : 'Please choose a name before save' ,
83
- alert_delete_card : 'Delete card' ,
84
- notice : 'Notice' ,
85
- press_again_to_exit : 'Press back button again to exit app' ,
86
- // Other category
87
- other : 'Other' ,
88
- // OK, Cancel
89
- ok : 'Ok' ,
90
- all : 'All' ,
91
- // Drawer back image
92
- drawer_back : 'drawer-back-en' ,
93
- // YdCard text class
94
- card_text_class : 'card-text-small' ,
95
-
96
- // Startup checks
97
- download_confirm_title : 'Download content' ,
98
- download_confirm_body : 'Preload content not found, will start downloading. This will use about 30Mb data' ,
99
- download_fail_body : 'Failed to download from server. Please reopen app to try again' ,
100
- download_fail_title : 'Failded' ,
101
-
102
- helper_message : 'Press and hold these 3 areas simultaneously to enter edit mode'
103
- }
104
- } ,
105
- zh : {
106
- message : {
107
- // Display
108
- done : '结束编辑' ,
109
- library : '素材库' ,
110
- new : '新建' ,
111
- settings : '设置' ,
112
- downloading : '正在解压小雨滴卡片资源,请稍候...' ,
113
-
114
- // Dialogs
115
- edit_card : '编辑卡片' ,
116
- choose_animation : '选择动画' ,
117
- none : '无' ,
118
- enlarge : '放大' ,
119
- swing : '旋转' ,
120
- delete_card : '删除卡片' ,
121
- mute : '静音' ,
122
- edit_category : '编辑分类' ,
123
- delete_courseware : '删除课件' ,
124
- edit_courseware_title : '编辑课件' ,
125
- choose_layout : '选择布局' ,
126
-
127
- // Resource
128
- back : '后退' ,
129
- new_card : '新卡片' ,
130
- new_category : '新分类' ,
131
- camera : '相机' ,
132
- album : '相册' ,
133
- record : '录音' ,
134
- play : '播放' ,
135
- delete : '删除' ,
136
- cancel : '取消' ,
137
- confirm : '确认' ,
138
- choose_cover : '选择封面' ,
139
- category_name : '分类名称' ,
140
-
141
- // Alerts
142
- // Courseware settings
143
- cannot_delete_all : '不能删除“全部”课件' ,
144
- forbidden : '禁止' ,
145
- are_you_sure : '是否确定?' ,
146
- delete_whole_category : '删除整个课件' ,
147
- // Pick item
148
- cannot_navi_chosen_items : '已有选择的卡片,不能切换到其他分类,请先保存已选择的卡片' ,
149
- // Edit card
150
- missing_info_body : '请选择名称、分类和图片,然后保存' ,
151
- missing_info_title : '缺少信息' ,
152
- // Edit category
153
- require_category_title : '必须输入一个名称' ,
154
- cannot_edit_in_all : '不能在”全部“中编辑' ,
155
- modify_card_in_library : '可以在素材库中编辑' ,
156
- cannot_delete_in_all : '不能在”全部“中删除分类或课件' ,
157
- // New category
158
- must_choose_name : '请输入一个名称,然后保存' ,
159
- alert_delete_card : '删除卡片' ,
160
- notice : '提示' ,
161
- press_again_to_exit : '再按一次后退键退出应用' ,
162
- // Other category
163
- other : '其他' ,
164
- // OK, Cancel
165
- ok : '确认' ,
166
- all : '全部' ,
167
- // Drawer back image
168
- drawer_back : 'drawer-back' ,
169
- // YdCard text class
170
- card_text_class : 'card-text' ,
171
-
172
- // Startup checks
173
- download_confirm_title : '下载' ,
174
- download_confirm_body : '没有找到内置卡片,需要下载,这将花费约30M流量' ,
175
- download_fail_body : '下载失败,请重新打开app下载' ,
176
- download_fail_title : '失败' ,
177
-
178
- helper_message : '手指同时触摸这三个位置可以进入家长编辑模式'
179
- }
180
- }
181
- }
26
+ import messages from './strings'
27
+ import routes from './routes'
182
28
183
29
// Create VueI18n instance with options
184
30
const i18n = new VueI18n ( {
@@ -193,33 +39,6 @@ window.oncontextmenu = function(event) {
193
39
return false
194
40
}
195
41
196
- var routes = [
197
- { path : '/display' ,
198
- name : 'YdDisplay' ,
199
- component : ( resolve ) => {
200
- EventBus . $on ( 'RESOURCE_LOADED' , function ( ) {
201
- resolve ( YdDisplay )
202
- } )
203
- }
204
- } ,
205
- {
206
- path : '/resource' ,
207
- name : 'YdResource' ,
208
- component : YdResource ,
209
- props : { mode : 'show' }
210
- } ,
211
- {
212
- path : '/resource/pick' ,
213
- name : 'YdResource' ,
214
- component : YdResource ,
215
- props : { mode : 'pick' }
216
- } ,
217
- {
218
- path : '/' ,
219
- redirect : '/display'
220
- }
221
- ]
222
-
223
42
var router = new Router ( { routes } )
224
43
225
44
var initApp = function ( ) {
0 commit comments