1
1
import { linkFields } from "../blocks" ;
2
2
import { CmsCollection } from "../types" ;
3
3
4
-
5
4
const permissionOptions = [
6
5
{
7
6
label : "All" ,
@@ -43,7 +42,7 @@ const permissionOptions = [
43
42
label : "Roadmap and Announcements" ,
44
43
value : "roadmap" ,
45
44
} ,
46
- ]
45
+ ] ;
47
46
48
47
export const settingsCollectionConfig = {
49
48
crowdin : true ,
@@ -65,7 +64,7 @@ export const settingsCollectionConfig = {
65
64
label : "Title" ,
66
65
name : "title" ,
67
66
widget : "string" ,
68
- crowdin : true
67
+ crowdin : true ,
69
68
} ,
70
69
{
71
70
label : "Columns" ,
@@ -83,7 +82,7 @@ export const settingsCollectionConfig = {
83
82
name : "title" ,
84
83
required : false ,
85
84
widget : "string" ,
86
- crowdin : true
85
+ crowdin : true ,
87
86
} ,
88
87
{
89
88
label : "Menu Items" ,
@@ -120,12 +119,12 @@ export const settingsCollectionConfig = {
120
119
{
121
120
name : "source" ,
122
121
widget : "string" ,
123
- crowdin : false
122
+ crowdin : false ,
124
123
} ,
125
124
{
126
125
name : "destination" ,
127
126
widget : "string" ,
128
- crowdin : false
127
+ crowdin : false ,
129
128
} ,
130
129
] ,
131
130
} ,
@@ -143,14 +142,14 @@ export const settingsCollectionConfig = {
143
142
widget : "list" ,
144
143
fields : [
145
144
{
146
- name : ' category' ,
147
- label : ' Category' ,
148
- widget : ' relation' ,
149
- collection : ' categories' ,
150
- search_fields : [ ' name' ] ,
151
- value_field : 'id' ,
152
- display_fields : [ ' name' ] ,
153
- options_length : 300
145
+ name : " category" ,
146
+ label : " Category" ,
147
+ widget : " relation" ,
148
+ collection : " categories" ,
149
+ search_fields : [ " name" ] ,
150
+ value_field : "id" ,
151
+ display_fields : [ " name" ] ,
152
+ options_length : 300 ,
154
153
} ,
155
154
] ,
156
155
} ,
@@ -171,7 +170,7 @@ export const settingsCollectionConfig = {
171
170
label : "Name" ,
172
171
name : "name" ,
173
172
widget : "string" ,
174
- crowdin : true
173
+ crowdin : true ,
175
174
} ,
176
175
{
177
176
label : "Type" ,
@@ -202,19 +201,19 @@ export const settingsCollectionConfig = {
202
201
label : "Twitter handle" ,
203
202
name : "twitter" ,
204
203
widget : "string" ,
205
- crowdin : false
204
+ crowdin : false ,
206
205
} ,
207
206
{
208
207
label : "Website url" ,
209
208
name : "website_url" ,
210
209
widget : "string" ,
211
- crowdin : false
210
+ crowdin : false ,
212
211
} ,
213
212
{
214
213
label : "Description" ,
215
214
name : "body" ,
216
215
widget : "string" ,
217
- crowdin : true
216
+ crowdin : true ,
218
217
} ,
219
218
] ,
220
219
} ,
@@ -255,7 +254,7 @@ export const settingsCollectionConfig = {
255
254
name : "title" ,
256
255
label : "Title" ,
257
256
widget : "string" ,
258
- crowdin : true
257
+ crowdin : true ,
259
258
} ,
260
259
{
261
260
name : "body" ,
@@ -268,7 +267,7 @@ export const settingsCollectionConfig = {
268
267
hint : "If page url is not specified (e.g. 'learn/glossary'), it will be used globally" ,
269
268
required : false ,
270
269
widget : "string" ,
271
- crowdin : false
270
+ crowdin : false ,
272
271
} ,
273
272
] ,
274
273
} ,
@@ -294,7 +293,7 @@ export const settingsCollectionConfig = {
294
293
search_fields : [ "title" ] ,
295
294
value_field : "id" ,
296
295
display_fields : [ "title" ] ,
297
- options_length : 300
296
+ options_length : 300 ,
298
297
} ,
299
298
] ,
300
299
} ,
@@ -315,36 +314,36 @@ export const settingsCollectionConfig = {
315
314
label : "Hero banner title" ,
316
315
widget : "string" ,
317
316
required : true ,
318
- crowdin : true
317
+ crowdin : true ,
319
318
} ,
320
319
{
321
320
name : "hero_description" ,
322
321
label : "Hero description" ,
323
322
widget : "string" ,
324
323
required : true ,
325
- crowdin : true
324
+ crowdin : true ,
326
325
} ,
327
326
{
328
327
name : "show_hero_cta" ,
329
328
label : "Show hero banner CTA" ,
330
329
widget : "boolean" ,
331
330
default : true ,
332
- crowdin : true
331
+ crowdin : true ,
333
332
} ,
334
333
{
335
334
name : "hero_cta_copy" ,
336
335
label : "Hero banner CTA copy" ,
337
336
widget : "string" ,
338
337
required : false ,
339
- crowdin : true
338
+ crowdin : true ,
340
339
} ,
341
340
{
342
341
name : "roadmap_post_ps" ,
343
342
label : "Roadmap post p.s. copy" ,
344
343
widget : "markdown" ,
345
344
required : false ,
346
- crowdin : true
347
- }
345
+ crowdin : true ,
346
+ } ,
348
347
] ,
349
348
} ,
350
349
{
@@ -369,14 +368,55 @@ export const settingsCollectionConfig = {
369
368
label : "Name" ,
370
369
widget : "string" ,
371
370
crowdin : false ,
372
- required : false
371
+ required : false ,
373
372
} ,
374
373
{
375
374
name : "access" ,
376
375
label : "Access to collections" ,
377
376
multiple : true ,
378
377
widget : "select" ,
379
- options : permissionOptions
378
+ options : permissionOptions ,
379
+ } ,
380
+ ] ,
381
+ } ,
382
+ ] ,
383
+ } ,
384
+ {
385
+ label : "Latest Announcements" ,
386
+ name : "LatestAnnouncements" ,
387
+ file : `_data/settings/latest-announcements.yml` ,
388
+ crowdin : false ,
389
+ fields : [
390
+ {
391
+ label : "announcements" ,
392
+ name : "announcements" ,
393
+ widget : "list" ,
394
+ fields : [
395
+ {
396
+ name : "image" ,
397
+ widget : "image" ,
398
+ crowdin : false ,
399
+ } ,
400
+ {
401
+ name : "text" ,
402
+ widget : "string" ,
403
+ crowdin : false ,
404
+ } ,
405
+ {
406
+ name : "buttonText" ,
407
+ widget : "string" ,
408
+ crowdin : false ,
409
+ } ,
410
+ {
411
+ name : "buttonLink" ,
412
+ widget : "string" ,
413
+ crowdin : false ,
414
+ } ,
415
+ {
416
+ name : "isActive" ,
417
+ widget : "boolean" ,
418
+ default : true ,
419
+ crowdin : false ,
380
420
} ,
381
421
] ,
382
422
} ,
0 commit comments