-
Notifications
You must be signed in to change notification settings - Fork 1
/
ww-config.js
64 lines (64 loc) · 2.09 KB
/
ww-config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
export default {
editor: {
settings: {
edit: () => import('./src/components/SettingsEdit.vue'),
summary: () => import('./src/components/SettingsSummary.vue'),
getIsValid(settings) {
return !!settings.privateData.apiKey;
},
},
collection: {
edit: () => import('./src/components/CollectionEdit.vue'),
summary: () => import('./src/components/CollectionSummary.vue'),
getIsValid(config) {
return !!config.baseId && !!config.tableId && !!config.view;
},
},
},
actions: [
{
name: 'Create a record',
code: 'createRecord',
isAsync: true,
/* wwEditor:start */
edit: () => import('./src/components/RecordCreate.vue'),
getIsValid({ collectionId, data }) {
return !!collectionId && !!data;
},
/* wwEditor:end */
},
{
name: 'Update a record',
code: 'updateRecord',
isAsync: true,
/* wwEditor:start */
edit: () => import('./src/components/RecordUpdate.vue'),
getIsValid({ collectionId, recordId, data }) {
return !!collectionId && !!recordId && !!data;
},
/* wwEditor:end */
},
{
name: 'Delete a record',
code: 'deleteRecord',
isAsync: true,
/* wwEditor:start */
edit: () => import('./src/components/RecordDelete.vue'),
getIsValid({ collectionId, recordId }) {
return !!collectionId && !!recordId;
},
/* wwEditor:end */
},
{
name: 'Sync a record',
code: 'syncRecord',
isAsync: true,
/* wwEditor:start */
edit: () => import('./src/components/RecordSync.vue'),
getIsValid({ collectionId, recordId }) {
return !!collectionId && !!recordId;
},
/* wwEditor:end */
},
],
};