mockaton 7.5.0 → 7.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "mockaton",
3
3
  "description": "A deterministic server-side for developing and testing frontend clients",
4
4
  "type": "module",
5
- "version": "7.5.0",
5
+ "version": "7.5.2",
6
6
  "main": "index.js",
7
7
  "types": "index.d.ts",
8
8
  "license": "MIT",
package/src/Dashboard.css CHANGED
@@ -7,10 +7,10 @@
7
7
  --color4xxBackground: #ffedd1;
8
8
  --colorAccent: #1e88e5;
9
9
  --colorBackground: #fff;
10
+ --colorHeaderBackground: #eee;
10
11
  --colorComboBoxBackground: #fafafa;
11
12
  --colorComboBoxHeaderBackground: #fff;
12
- --colorDisabled: #222;
13
- --colorHeaderBackground: #fff;
13
+ --colorDisabled: #555;
14
14
  --colorHover: #dfefff;
15
15
  --colorLabel: #666;
16
16
  --colorLightRed: #ffe4ee;
@@ -24,10 +24,10 @@
24
24
  --color4xxBackground: #403630;
25
25
  --colorAccent: #1f91ff;
26
26
  --colorBackground: #161616;
27
+ --colorHeaderBackground: #090909;
27
28
  --colorComboBoxBackground: #252525;
28
29
  --colorComboBoxHeaderBackground: #222;
29
- --colorDisabled: #aaa;
30
- --colorHeaderBackground: #141414;
30
+ --colorDisabled: #bbb;
31
31
  --colorHover: #023661;
32
32
  --colorLabel: #aaa;
33
33
  --colorLightRed: #ffe4ee;
@@ -55,6 +55,7 @@ body {
55
55
  }
56
56
 
57
57
  select {
58
+ font-size: 100%;
58
59
  background: var(--colorComboBoxBackground);
59
60
  color: var(--colorText);
60
61
  cursor: pointer;
@@ -69,9 +70,7 @@ select {
69
70
  background: var(--colorHover);
70
71
  }
71
72
  &:disabled {
72
- background: transparent;
73
73
  cursor: not-allowed;
74
- color: var(--colorDisabled);
75
74
  }
76
75
  }
77
76
 
@@ -83,12 +82,14 @@ menu {
83
82
  display: flex;
84
83
  width: 100%;
85
84
  align-items: flex-end;
86
- padding: 16px 16px;
85
+ padding: 20px 16px;
87
86
  background: var(--colorHeaderBackground);
87
+ border-bottom: 1px solid rgba(127, 127, 127, 0.17);
88
88
  gap: 16px;
89
89
 
90
90
  img {
91
91
  width: 140px;
92
+ align-self: center;
92
93
  margin-right: 75px;
93
94
  }
94
95
 
@@ -135,7 +136,7 @@ menu {
135
136
  main {
136
137
  display: flex;
137
138
  align-items: flex-start;
138
- margin-top: 56px;
139
+ margin-top: 64px;
139
140
 
140
141
  > table {
141
142
  border-collapse: collapse;
@@ -147,7 +148,7 @@ main {
147
148
  }
148
149
 
149
150
  tr {
150
- border-bottom: 2px solid transparent;
151
+ border-top: 1px solid transparent;
151
152
  }
152
153
  }
153
154
  }
@@ -155,7 +156,7 @@ main {
155
156
 
156
157
  .PayloadViewer {
157
158
  position: sticky;
158
- top: 60px;
159
+ top: 72px;
159
160
  width: 50%;
160
161
  margin-left: 20px;
161
162
 
@@ -165,9 +166,8 @@ main {
165
166
 
166
167
  pre {
167
168
  overflow: auto;
168
- max-height: calc(100vh - 160px);
169
- padding: 12px;
170
- padding-left: 0;
169
+ max-height: calc(100vh - 72px);
170
+ padding-top: 12px;
171
171
 
172
172
  code {
173
173
  white-space: pre;
@@ -213,6 +213,13 @@ main {
213
213
  &.status4xx {
214
214
  background: var(--color4xxBackground);
215
215
  }
216
+ &:disabled {
217
+ appearance: none;
218
+ background: transparent;
219
+ cursor: default;
220
+ color: var(--colorDisabled);
221
+ opacity: 1;
222
+ }
216
223
  }
217
224
 
218
225
  .DelayToggler {
package/src/Dashboard.js CHANGED
@@ -93,18 +93,22 @@ function CookieSelector({ list }) {
93
93
  }
94
94
 
95
95
  function BulkSelector({ comments }) {
96
+ const disabled = !comments.length
97
+ const list = disabled
98
+ ? []
99
+ : [Strings.select_one].concat(comments)
96
100
  return (
97
101
  r('label', null,
98
102
  r('span', null, Strings.bulk_select_by_comment),
99
103
  r('select', {
100
104
  autocomplete: 'off',
101
- disabled: comments.length <= 1,
105
+ disabled,
102
106
  onChange() {
103
107
  mockaton.bulkSelectByComment(this.value)
104
108
  .then(init)
105
109
  .catch(console.error)
106
110
  }
107
- }, [Strings.select_one].concat(comments).map(item =>
111
+ }, list.map(item =>
108
112
  r('option', {
109
113
  value: item
110
114
  }, item)))))
@@ -2,8 +2,8 @@
2
2
  <svg version="1.1" viewBox="0 0 570 100" xmlns="http://www.w3.org/2000/svg">
3
3
  <style>
4
4
  :root { --color: #000000; }
5
- @media (prefers-color-scheme: light) { :root { --color: #000000 } }
6
- @media (prefers-color-scheme: dark) { :root { --color: #fff } }
5
+ @media (prefers-color-scheme: light) { :root { --color: #444 } }
6
+ @media (prefers-color-scheme: dark) { :root { --color: #eee } }
7
7
  path { fill: var(--color) }
8
8
  </style>
9
9
  <path