authscape 1.0.340 → 1.0.342
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/index.js +12 -16
- package/package.json +1 -1
- package/src/components/OEMEditor.js +24 -30
package/index.js
CHANGED
|
@@ -2257,7 +2257,7 @@ function OEMEditor(_ref) {
|
|
|
2257
2257
|
var monaco = (0, _react2.useMonaco)();
|
|
2258
2258
|
var cssEditorRef = (0, _react.useRef)(null);
|
|
2259
2259
|
var htmlEditorRef = (0, _react.useRef)(null);
|
|
2260
|
-
var _useState = (0, _react.useState)(
|
|
2260
|
+
var _useState = (0, _react.useState)(null),
|
|
2261
2261
|
_useState2 = _slicedToArray(_useState, 2),
|
|
2262
2262
|
data = _useState2[0],
|
|
2263
2263
|
setData = _useState2[1];
|
|
@@ -2333,10 +2333,9 @@ function OEMEditor(_ref) {
|
|
|
2333
2333
|
};
|
|
2334
2334
|
}();
|
|
2335
2335
|
(0, _react.useEffect)(function () {
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
// }
|
|
2336
|
+
if (oEMDomain != null) {
|
|
2337
|
+
loadDNSFields(oEMDomain);
|
|
2338
|
+
}
|
|
2340
2339
|
}, [oEMDomain]);
|
|
2341
2340
|
(0, _react.useEffect)(function () {
|
|
2342
2341
|
if (loadedUser) {
|
|
@@ -2353,16 +2352,13 @@ function OEMEditor(_ref) {
|
|
|
2353
2352
|
if (response != null && response.status == 200) {
|
|
2354
2353
|
setFonts(response.data);
|
|
2355
2354
|
}
|
|
2356
|
-
_context2.next = 6;
|
|
2357
|
-
return loadDNSFields();
|
|
2358
|
-
case 6:
|
|
2359
2355
|
if (!showAllDomains) {
|
|
2360
|
-
_context2.next =
|
|
2356
|
+
_context2.next = 11;
|
|
2361
2357
|
break;
|
|
2362
2358
|
}
|
|
2363
|
-
_context2.next =
|
|
2359
|
+
_context2.next = 7;
|
|
2364
2360
|
return apiService().get("/WhiteLabel/GetAllDomains");
|
|
2365
|
-
case
|
|
2361
|
+
case 7:
|
|
2366
2362
|
_response = _context2.sent;
|
|
2367
2363
|
if (_response != null && _response.status == 200) {
|
|
2368
2364
|
setOEMDomainList(_response.data);
|
|
@@ -2370,12 +2366,12 @@ function OEMEditor(_ref) {
|
|
|
2370
2366
|
setOEMDomain(_response.data[0].name);
|
|
2371
2367
|
}
|
|
2372
2368
|
}
|
|
2373
|
-
_context2.next = 17;
|
|
2374
|
-
break;
|
|
2375
|
-
case 13:
|
|
2376
2369
|
_context2.next = 15;
|
|
2370
|
+
break;
|
|
2371
|
+
case 11:
|
|
2372
|
+
_context2.next = 13;
|
|
2377
2373
|
return apiService().get("/WhiteLabel/GetAllDomainsUser");
|
|
2378
|
-
case
|
|
2374
|
+
case 13:
|
|
2379
2375
|
_response2 = _context2.sent;
|
|
2380
2376
|
if (_response2 != null && _response2.status == 200) {
|
|
2381
2377
|
setOEMDomainList(_response2.data);
|
|
@@ -2383,7 +2379,7 @@ function OEMEditor(_ref) {
|
|
|
2383
2379
|
setOEMDomain(_response2.data[0].name);
|
|
2384
2380
|
}
|
|
2385
2381
|
}
|
|
2386
|
-
case
|
|
2382
|
+
case 15:
|
|
2387
2383
|
case "end":
|
|
2388
2384
|
return _context2.stop();
|
|
2389
2385
|
}
|
package/package.json
CHANGED
|
@@ -25,7 +25,7 @@ export function OEMEditor({loadedUser, notification, showAllDomains = false, com
|
|
|
25
25
|
const cssEditorRef = useRef(null);
|
|
26
26
|
const htmlEditorRef = useRef(null);
|
|
27
27
|
|
|
28
|
-
const [data, setData] = useState(
|
|
28
|
+
const [data, setData] = useState(null);
|
|
29
29
|
const [value, setValue] = useState(0);
|
|
30
30
|
const [fonts, setFonts] = useState([]);
|
|
31
31
|
const [oEMDomainList, setOEMDomainList] = useState([]);
|
|
@@ -66,10 +66,10 @@ export function OEMEditor({loadedUser, notification, showAllDomains = false, com
|
|
|
66
66
|
|
|
67
67
|
useEffect(() => {
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
if (oEMDomain != null)
|
|
70
|
+
{
|
|
71
71
|
loadDNSFields(oEMDomain);
|
|
72
|
-
|
|
72
|
+
}
|
|
73
73
|
|
|
74
74
|
}, [oEMDomain]);
|
|
75
75
|
|
|
@@ -86,8 +86,6 @@ export function OEMEditor({loadedUser, notification, showAllDomains = false, com
|
|
|
86
86
|
setFonts(response.data);
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
await loadDNSFields();
|
|
90
|
-
|
|
91
89
|
if (showAllDomains)
|
|
92
90
|
{
|
|
93
91
|
let response = await apiService().get("/WhiteLabel/GetAllDomains");
|
|
@@ -244,33 +242,29 @@ export function OEMEditor({loadedUser, notification, showAllDomains = false, com
|
|
|
244
242
|
</Box>
|
|
245
243
|
|
|
246
244
|
{dnsFields != null && dnsFields.map((dnsField, index) => {
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
});
|
|
245
|
+
return (
|
|
246
|
+
<Box key={index}>
|
|
247
|
+
<Grid container spacing={2}>
|
|
248
|
+
<Grid item xs={3}>
|
|
249
|
+
{dnsField.name}
|
|
250
|
+
</Grid>
|
|
251
|
+
<Grid item xs={9}>
|
|
252
|
+
|
|
253
|
+
<ColorPicker name={dnsField.name} defaultColor={dnsField.value} onColorChanged={async (name, hex) => {
|
|
254
|
+
|
|
255
|
+
await apiService().post("/WhiteLabel/SetFieldValue", {
|
|
256
|
+
id: dnsField.id,
|
|
257
|
+
fieldId: dnsField.fieldId,
|
|
258
|
+
value: hex
|
|
259
|
+
});
|
|
263
260
|
|
|
264
|
-
|
|
261
|
+
notification(dnsField.name + " Saved");
|
|
265
262
|
|
|
266
|
-
|
|
263
|
+
}} />
|
|
264
|
+
</Grid>
|
|
267
265
|
</Grid>
|
|
268
|
-
</
|
|
269
|
-
|
|
270
|
-
)
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
266
|
+
</Box>
|
|
267
|
+
)
|
|
274
268
|
})}
|
|
275
269
|
</Box>
|
|
276
270
|
}
|