Skip to content

Commit

Permalink
merged with hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
abeikverdi committed Jan 19, 2023
2 parents e5ad0b1 + 27035e1 commit 4410ffa
Show file tree
Hide file tree
Showing 11 changed files with 507 additions and 252 deletions.
12 changes: 6 additions & 6 deletions server/utils/hollaex-network-lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2213,19 +2213,19 @@ class HollaExNetwork {
if (isBoolean(opts.rejected)) {
data.rejected = opts.rejected;
} else {
data.rejected = true;
data.rejected = false;
}

if (isBoolean(opts.dismissed)) {
data.dismissed = opts.dismissed;
} else {
data.dismissed = true;
data.dismissed = false;
}

if (isBoolean(opts.waiting)) {
data.waiting = opts.waiting;
} else {
data.waiting = true;
data.waiting = false;
}

if (isBoolean(opts.email)) {
Expand Down Expand Up @@ -2410,19 +2410,19 @@ class HollaExNetwork {
if (isBoolean(opts.rejected)) {
data.rejected = opts.rejected;
} else {
data.rejected = true;
data.rejected = false;
}

if (isBoolean(opts.dismissed)) {
data.dismissed = opts.dismissed;
} else {
data.dismissed = true;
data.dismissed = false;
}

if (isBoolean(opts.waiting)) {
data.waiting = opts.waiting;
} else {
data.waiting = true;
data.waiting = false;
}

if (isBoolean(opts.email)) {
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.0
2.5.0
3 changes: 3 additions & 0 deletions web/public/assets/images/manual-plugin-upgrade.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions web/src/config/icons/static.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ const icons = {
CLOCK: '/assets/images/clock.svg',
QR_CODE_SHOW: '/assets/images/mini-qr-code.svg',
QR_CODE_SCAN: '/assets/images/camera-scan.svg',
MANUAL_PLUGIN_UPGRADE: '/assets/images/manual-plugin-upgrade.svg',
};

export default icons;
2 changes: 1 addition & 1 deletion web/src/containers/Admin/Deposits/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const renderResendContent = (renderData, onOpenModal) => {
!renderData.status &&
!renderData.dismissed &&
!renderData.rejected &&
!renderData.processing
renderData.waiting
) {
return (
<div className="d-flex validate-wrapper">
Expand Down
114 changes: 114 additions & 0 deletions web/src/containers/Admin/Plugins/AddPlugin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
import React from 'react';
import { Button, Input, Radio } from 'antd';
import { DownloadOutlined } from '@ant-design/icons';

const radioStyle = {
display: 'flex',
alignItems: 'center',
height: '30px',
lineHeight: '1.2',
padding: '24px 0',
margin: 0,
paddingLeft: '1px',
whiteSpace: 'normal',
letterSpacing: '-0.15px',
};

const AddThirdPartyPlugin = ({
handleChange,
thirdPartyType,
handleFileChange,
handleURL,
thirdPartyError,
handleBack,
thirdParty,
getJSONFromURL,
updateState,
handleStep,
handleUpdatePlugin = () => {},
}) => {
return (
<div className="admin-plugin-modal-wrapper">
<h2>
<b>Add third party plugin</b>
</h2>
<div>
<Radio.Group
name="thirdPartyType"
onChange={handleChange}
value={thirdPartyType}
>
<Radio value={'upload_json'} style={radioStyle}>
Upload a json file
</Radio>
{thirdPartyType === 'upload_json' ? (
<div className="plugin-file-wrapper">
<div className="plugin-file-container">
<div className="plugin-img-content">
<DownloadOutlined />
<label className="upload-link">
<span>Upload</span>
<input
type="file"
accept="application/JSON"
name="upload"
onChange={handleFileChange}
/>
</label>
</div>
</div>
</div>
) : null}
<Radio value={'input_url'} style={radioStyle}>
Input URL path
</Radio>
{thirdPartyType === 'input_url' ? (
<div>
<span className="url-path">URL path</span>
<Input
placeholder="Input URL path"
className="mt-2"
onChange={handleURL}
/>
</div>
) : null}
</Radio.Group>
{thirdPartyError ? (
<div className="field-wrapper error">{thirdPartyError}</div>
) : null}
</div>
<div className="my-4 btn-wrapper d-flex justify-content-between">
<Button
type="primary"
size="large"
className={'add-btn w-48'}
onClick={handleBack}
>
Back
</Button>
<Button
type="primary"
size="large"
className={'add-btn w-48'}
onClick={() => {
if (
thirdPartyType === 'upload_json' &&
thirdParty?.name &&
!thirdPartyError
) {
handleUpdatePlugin();
} else if (thirdPartyType === 'input_url') {
getJSONFromURL();
} else if (thirdPartyType === 'upload_json' && !thirdParty.name) {
updateState('Upload a valid JSON');
}
}}
>
Next
</Button>
</div>
</div>
);
};

export default AddThirdPartyPlugin;
Loading

0 comments on commit 4410ffa

Please sign in to comment.