Ver código fonte

added icon and color to app list of mockapi + ep workspace/:id now returns the workspace id in request

Skylsmoi 6 anos atrás
pai
commit
a549b1b972
2 arquivos alterados com 37 adições e 7 exclusões
  1. 1 1
      jsonserver/server.js
  2. 36 6
      jsonserver/static_db.json

+ 1 - 1
jsonserver/server.js Ver arquivo

@@ -53,7 +53,7 @@ server.get('/user/:id/workspace', (req, res) => res.jsonp(jsonDb.workspace_list)
53 53
 
54 54
 server.get('/workspace/:id', (req, res) => res.jsonp(
55 55
   // {...jsonDb.workspace_detail, content: shuffle(jsonDb.workspace_detail.content)})
56
-  Object.assign({}, jsonDb.workspace_detail, {content: shuffle(jsonDb.workspace_detail.content)})
56
+  Object.assign({}, jsonDb.workspace_detail, {content: shuffle(jsonDb.workspace_detail.content)}, {id: req.params.id})
57 57
 ))
58 58
 
59 59
 server.get('/user/:id/roles', (req, res) => res.jsonp(jsonDb.user_role))

+ 36 - 6
jsonserver/static_db.json Ver arquivo

@@ -27,40 +27,70 @@
27 27
   },
28 28
   "app_config": [{
29 29
     "name": "PageHtml",
30
+    "label": {
31
+      "fr": "Page Html",
32
+      "en": "Html page"
33
+    },
30 34
     "componentLeft": "PageHtml",
31 35
     "componentRight": "Timeline",
32 36
     "customClass": "wsContentPageHtml",
33
-    "icon": "fa fa-file-word-o"
37
+    "icon": "fa fa-fw fa-file-word-o",
38
+    "color": "#65c7f2"
34 39
   }, {
35 40
     "name": "PageMarkdown",
41
+    "label": {
42
+      "fr": "Page Markdown",
43
+      "en": "Markdown page"
44
+    },
36 45
     "componentLeft": "PageMarkdown",
37 46
     "componentRight": "undefined",
38 47
     "customClass": "wsContentPageMarkdown",
39
-    "icon": "fa fa-file-code-o"
48
+    "icon": "fa fa-fw fa-file-code-o",
49
+    "color": "#e0082b"
40 50
   }, {
41 51
     "name": "File",
52
+    "label": {
53
+      "fr": "Fichier",
54
+      "en": "File"
55
+    },
42 56
     "componentLeft": "File",
43 57
     "componentRight": "undefined",
44 58
     "customClass": "wsContentFile",
45
-    "icon": "fa fa-file-text-o"
59
+    "icon": "fa fa-fw fa-file-text-o",
60
+    "color": "#263462"
46 61
   }, {
47 62
     "name": "Thread",
63
+    "label": {
64
+      "fr": "Discussion",
65
+      "en": "Thread"
66
+    },
48 67
     "componentLeft": "Thread",
49 68
     "componentRight": "undefined",
50 69
     "customClass": "wsContentThread",
51
-    "icon": "fa fa-comments-o"
70
+    "icon": "fa fa-fw fa-comments-o",
71
+    "color": "#2674d3"
52 72
   }, {
53 73
     "name": "Task",
74
+    "label": {
75
+      "fr": "Tâche",
76
+      "en": "Task"
77
+    },
54 78
     "componentLeft": "Task",
55 79
     "componentRight": "undefined",
56 80
     "customClass": "wsContentTask",
57
-    "icon": "fa fa-list-ul"
81
+    "icon": "fa fa-fw fa-list-ul",
82
+    "color": "#2d5a88"
58 83
   }, {
59 84
     "name": "Issue",
85
+    "label": {
86
+      "fr": "Ticket",
87
+      "en": "Issue"
88
+    },
60 89
     "componentLeft": "Issue",
61 90
     "componentRight": "undefined",
62 91
     "customClass": "wsContentIssue",
63
-    "icon": "fa fa-ticket"
92
+    "icon": "fa fa-fw fa-ticket",
93
+    "color": "#a4835e"
64 94
   }],
65 95
   "workspace_detail": {
66 96
     "id": 1,