diff options
Diffstat (limited to 'web/react/utils/utils.jsx')
-rw-r--r-- | web/react/utils/utils.jsx | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index 238a209a4..e2a5b9620 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -392,6 +392,10 @@ export function areObjectsEqual(x, y) { return x.toString() === y.toString(); } + if (x instanceof Map && y instanceof Map) { + return areMapsEqual(x, y); + } + // At last checking prototypes as good a we can if (!(x instanceof Object && y instanceof Object)) { return false; @@ -456,6 +460,24 @@ export function areObjectsEqual(x, y) { return true; } +export function areMapsEqual(a, b) { + if (a.size !== b.size) { + return false; + } + + for (const [key, value] of a) { + if (!b.has(key)) { + return false; + } + + if (!areObjectsEqual(value, b.get(key))) { + return false; + } + } + + return true; +} + export function replaceHtmlEntities(text) { var tagsToReplace = { '&': '&', @@ -680,6 +702,7 @@ export function applyTheme(theme) { } if (theme.centerChannelColor) { + changeCss('.post-list__arrows', 'fill:' + changeOpacity(theme.centerChannelColor, 0.3), 1); changeCss('.sidebar--left, .sidebar--right .sidebar--right__header', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2), 1); changeCss('.app__content, .post-create__container .post-create-body .btn-file, .post-create__container .post-create-footer .msg-typing, .command-name, .modal .modal-content, .dropdown-menu, .popover, .mentions-name, .tip-overlay', 'color:' + theme.centerChannelColor, 1); changeCss('#archive-link-home', 'background:' + changeOpacity(theme.centerChannelColor, 0.15), 1); @@ -1373,7 +1396,7 @@ export function languages() { }, { value: 'es', - name: 'Español' + name: 'Español (Beta)' } ] ); |