Skip to content

Commit 3499da3

Browse files
authored
Merge pull request #3409 from hollaex/beta
Beta
2 parents 867765f + 7b4f57c commit 3499da3

File tree

14 files changed

+66
-18
lines changed

14 files changed

+66
-18
lines changed

server/api/swagger/swagger.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const definition = {
44
swagger: '2.0',
55
info: {
66
title: 'HollaEx Kit',
7-
version: '2.15.1'
7+
version: '2.15.2'
88
},
99
host: 'api.hollaex.com',
1010
basePath: '/v2',

server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "2.15.1",
2+
"version": "2.15.2",
33
"private": false,
44
"description": "HollaEx Kit",
55
"keywords": [

version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.15.1
1+
2.15.2

web/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hollaex-kit",
3-
"version": "2.15.1",
3+
"version": "2.15.2",
44
"private": true,
55
"dependencies": {
66
"@ant-design/compatible": "1.0.5",

web/src/containers/Admin/Trades/Otcdeskpopup.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ const Otcdeskpopup = ({
742742
name="max"
743743
min={0}
744744
onChange={(e) =>
745-
handlePreviewChange(e.target.value, 'min_size')
745+
handlePreviewChange(Number(e.target.value), 'min_size')
746746
}
747747
value={previewData && previewData.min_size}
748748
suffix={
@@ -763,7 +763,7 @@ const Otcdeskpopup = ({
763763
name="max"
764764
min={0}
765765
onChange={(e) =>
766-
handlePreviewChange(e.target.value, 'max_size')
766+
handlePreviewChange(Number(e.target.value), 'max_size')
767767
}
768768
value={previewData && previewData.max_size}
769769
suffix={

web/src/containers/OperatorControls/_OperatorControls.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,9 @@ $operator-controls__panel-border-color: #a7a7a7;
345345
margin-left: 0.4rem;
346346
font-size: 1rem;
347347
}
348+
.operator-control-error-text {
349+
color: #ff0000;
350+
}
348351
}
349352

350353
.operator-controls__modal-open #root {
@@ -450,3 +453,9 @@ $operator-controls__panel-border-color: #a7a7a7;
450453
background-color: $operator-controls__panel-main-color !important;
451454
}
452455
}
456+
457+
.confirmation-icon-popup {
458+
.ant-modal-body {
459+
background-color: $operator-controls__panel-main-color;
460+
}
461+
}

web/src/containers/OperatorControls/components/AllIconsModal.js

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ class AllIconsModal extends Component {
9898
onOk: this.handleSave,
9999
onCancel: () => this.setState({ selectedFiles: {} }),
100100
zIndex: 10003,
101+
className: 'confirmation-icon-popup',
101102
});
102103
};
103104

@@ -160,14 +161,27 @@ class AllIconsModal extends Component {
160161

161162
onHandleConfirm = () => {
162163
const { onCloseDialog, removedKeys, onSave } = this.props;
164+
const getIcons = JSON.parse(localStorage.getItem('icons')) || {};
163165
const icons = {};
164-
localStorage.setItem('removedBackgroundItems', JSON.stringify(removedKeys));
165-
onSave(icons, true);
166+
if (!this.state?.error) {
167+
removedKeys &&
168+
(removedKeys || []).forEach((key) => {
169+
const [iconKey = '', theme = ''] = key?.split('__');
170+
if (getIcons[theme] && getIcons[theme][iconKey]) {
171+
localStorage.setItem(
172+
'removedBackgroundItems',
173+
JSON.stringify(removedKeys)
174+
);
175+
onSave(icons);
176+
}
177+
});
178+
}
166179
onCloseDialog();
167180
};
168181

169182
render() {
170183
const { isOpen, icons, onCloseDialog, searchValue, onSearch } = this.props;
184+
const { error } = this.state;
171185

172186
const modalContent = document.getElementById('all-icons-content');
173187
const modalContentHeight = modalContent ? modalContent.clientHeight : 0;
@@ -220,7 +234,18 @@ class AllIconsModal extends Component {
220234
scroll={{ y: tableContentHeight }}
221235
style={{ width: '820px' }}
222236
/>
223-
<div className="d-flex justify-content-end pt-4 mt-4">
237+
<div
238+
className={
239+
error
240+
? 'd-flex flex-column align-items-end'
241+
: 'pt-4 d-flex flex-column align-items-end'
242+
}
243+
>
244+
{error && (
245+
<span className="operator-control-error-text font-weight-bold mb-2">
246+
{error}
247+
</span>
248+
)}
224249
<Button
225250
type="primary"
226251
onClick={this.onHandleConfirm}

web/src/containers/OperatorControls/index.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,12 @@ class OperatorControls extends Component {
796796

797797
removeIcon = (themeKey, iconKey) => {
798798
const icons = this.state.iconsOverwrites;
799-
const selectedTheme = themeKey && icons?.[themeKey];
799+
let selectedTheme = themeKey && icons?.[themeKey];
800+
801+
if (!selectedTheme) {
802+
selectedTheme = {};
803+
}
804+
800805
let data = {};
801806
Object.keys(selectedTheme).forEach((item) => {
802807
if (item !== iconKey) {
@@ -1003,11 +1008,11 @@ class OperatorControls extends Component {
10031008
};
10041009

10051010
onReset = (themeKey, iconKey) => {
1006-
const { allIconsArray, removedKeys: currentRemovedKeys } = this.state;
1011+
const { iconSearchResults, removedKeys: currentRemovedKeys } = this.state;
10071012
const currentTheme = themeKey === 'white' ? 'white' : 'dark';
10081013
const removedKey = `${iconKey}__${currentTheme}`;
10091014

1010-
const updatedIcons = allIconsArray.map((iconObject = {}) => {
1015+
const updatedIcons = iconSearchResults?.map((iconObject = {}) => {
10111016
if (iconObject?.key === iconKey) {
10121017
return { ...iconObject, [themeKey]: '' };
10131018
}
@@ -1027,6 +1032,7 @@ class OperatorControls extends Component {
10271032

10281033
this.handleRemoveOrUpload('removedKeys', updatedRemovedKeys);
10291034
this.handleRemoveOrUpload('remove', true);
1035+
this.removeIcon(themeKey, iconKey);
10301036
};
10311037

10321038
render() {

web/src/containers/Summary/_Summary.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,8 @@ $trade-tab--arrow-size: 0.4rem;
533533
}
534534

535535
.deposit-icon {
536-
svg {
536+
svg,
537+
img {
537538
width: 1rem;
538539
}
539540
}

0 commit comments

Comments
 (0)