Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/bitholla/hollaex-kit int…
Browse files Browse the repository at this point in the history
…o develop
  • Loading branch information
abeikverdi committed Feb 21, 2023
2 parents 081994e + e6f20d3 commit 0866f3c
Show file tree
Hide file tree
Showing 8 changed files with 179 additions and 81 deletions.
8 changes: 7 additions & 1 deletion web/src/containers/Admin/Billing/generalContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ const GeneralContent = ({
dashExchange.period !== 'year' ? true : false
);
const [invoiceData, setinvoiceData] = useState([]);
const [activateInvoiceData, setActivateInvoiceData] = useState({});
const [priceData, setPriceData] = useState({});
const [paymentOptions, setOptions] = useState([]);
const [showPayAddress, setShowPayAddress] = useState(false);
Expand Down Expand Up @@ -300,6 +301,7 @@ const GeneralContent = ({
setPaymentAddressDetails({});
setPendingPay(false);
setHideBreadcrumb(false);
setActivateInvoiceData({});
};

const handleViewPlan = () => {
Expand Down Expand Up @@ -333,7 +335,9 @@ const GeneralContent = ({
default:
break;
}
const invoiceId = selectedPendingId
const invoiceId = activateInvoiceData.id
? activateInvoiceData.id
: selectedPendingId
? selectedPendingId
: invoiceData[0].id;
const res = await requestStoreInvoice(invoiceId, { method });
Expand Down Expand Up @@ -528,6 +532,7 @@ const GeneralContent = ({
const res = await getPluginActivateDetails(pluginData.name);
if (res && res.data) {
setinvoiceData([res.data]);
setActivateInvoiceData(res.data);
setExchangePlanType('method');
}
} catch (error) {
Expand Down Expand Up @@ -1080,6 +1085,7 @@ const GeneralContent = ({
storePaymentMethod(selectedPendingItem?.id);
} else if (exchangePlanType === 'payment') {
setOpenPlanModal(false);
setActivateInvoiceData({});
}
};

Expand Down
8 changes: 5 additions & 3 deletions web/src/containers/Admin/Billing/pluginSubscription.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ const PluginSubscription = ({
<div>Save 6%.</div>
<div className="d-flex mt-2 gray-text">
<InfoCircleOutlined />
<div>Requires plugin activation ({name})</div>
<div>
Requires plugin activation ({price}-{name})
</div>
</div>
<div className="d-flex mt-2 gray-text footer-text">
<span className="d-flex">
Expand Down Expand Up @@ -69,13 +71,13 @@ const PluginSubscription = ({
Cost :
{paymentAddressDetails?.activation &&
paymentAddressDetails?.activation?.price
? `${paymentAddressDetails?.activation?.price}* USDT`
? `${paymentAddressDetails?.activation?.price} USDT`
: !['method', 'item'].includes(exchangePlanType) &&
paymentAddressDetails?.currency
? `${paymentAddressDetails?.currency?.toUpperCase()} ${
paymentAddressDetails?.amount
}`
: `${price}* USDT`}
: `${price} USDT`}
</p>
</div>
</div>
Expand Down
58 changes: 27 additions & 31 deletions web/src/containers/Admin/Plugins/MyPlugins.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
import { Button, Input, Spin, Modal, message } from 'antd';
import { Button, Input, Modal, message } from 'antd';
import _debounce from 'lodash/debounce';

import { STATIC_ICONS } from 'config/icons';
Expand Down Expand Up @@ -289,7 +289,9 @@ class MyPlugins extends Component {
const { myPlugins, isPluginFetchLoading } = this.props;

return (
<div className={!is_zoom ? 'myplugin-container' : ''}>
<div
className={`myplugin-wrapper ${!is_zoom ? 'myplugin-container' : ''}`}
>
<div className="header">My plugins apps</div>
<div className="d-flex my-plugin-content">
<div>
Expand All @@ -309,7 +311,7 @@ class MyPlugins extends Component {
</div>
<div>
<Button type="primary" onClick={this.handlePlugin}>
ADD THIRD PARTY PLUGIN.
ADD THIRD PARTY PLUGIN
</Button>
</div>
</div>
Expand All @@ -333,35 +335,29 @@ class MyPlugins extends Component {
: `url(${STATIC_ICONS.EXCHANGE_APP_STORE_BACKGROUND_SPLASH_2})`,
}}
>
<Spin
spinning={isPluginFetchLoading}
className="plugin-spinner"
size="large"
>
{myPlugins.length ? (
<>{this.renderList()}</>
) : (
!isPluginFetchLoading && (
<div className="installed-plugin">
<div>
{this.state.isSearchTerm ? (
<>Can't find any plugin apps by that search term.</>
) : (
<>You haven't installed any exchange plugin apps yet.</>
)}
</div>
{!this.state.isSearchTerm ? (
<div onClick={this.onHandleRedirect}>
<span className="underline-text m-3 pointer">
Click here
</span>{' '}
to find more plugin apps.
</div>
) : null}
{myPlugins.length ? (
<>{this.renderList()}</>
) : (
!isPluginFetchLoading && (
<div className="installed-plugin">
<div>
{this.state.isSearchTerm ? (
<>Can't find any plugin apps by that search term.</>
) : (
<>You haven't installed any exchange plugin apps yet.</>
)}
</div>
)
)}
</Spin>
{!this.state.isSearchTerm ? (
<div onClick={this.onHandleRedirect}>
<span className="underline-text m-3 pointer">
Click here
</span>{' '}
to find more plugin apps.
</div>
) : null}
</div>
)
)}
</div>

<div className="container-wrapper" onClick={this.onHandleRedirect}>
Expand Down
54 changes: 28 additions & 26 deletions web/src/containers/Admin/Plugins/PluginAppStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,35 @@ const PluginAppStore = ({ onChangeNextType, router }) => {
<div className="app-store-wrapper">
<div
className="underline-text m-3 pointer"
onClick={() => onChangeNextType('myplugin')}
onClick={() => onChangeNextType('myPlugin')}
>{`<Back`}</div>{' '}
<div
style={{
backgroundImage: `url(${STATIC_ICONS.EXCHANGE_APP_STORE_BACKGROUND_SPLASH})`,
}}
className="apps-store-background-img"
>
<div className="exchange-plugin-content-wrapper w-100">
<div className="text-center">
<img
src={STATIC_ICONS.HOLLAEX_NETWORK_WHITE}
alt=""
className="exchange-plugin-image"
/>
<div className="exchange-plugin-title">
Exchange Plugin App Store
</div>
<div>
Marketplace to buy, sell and install plugin apps for your crypto
platform.
</div>
<div
className="link-text blink_me pointer"
onClick={() => router.push(`/admin/plugins/store`)}
>
Click to enter
<div className="image-wrapper">
<div
style={{
backgroundImage: `url(${STATIC_ICONS.EXCHANGE_APP_STORE_BACKGROUND_SPLASH})`,
}}
className="apps-store-background-img"
>
<div className="exchange-plugin-content-wrapper w-100">
<div className="text-center">
<img
src={STATIC_ICONS.HOLLAEX_NETWORK_WHITE}
alt=""
className="exchange-plugin-image"
/>
<div className="exchange-plugin-title">
Exchange Plugin App Store
</div>
<div>
Marketplace to buy, sell and install plugin apps for your crypto
platform.
</div>
<div
className="link-text blink_me pointer"
onClick={() => router.push(`/admin/plugins/store`)}
>
Click to enter
</div>
</div>
</div>
</div>
Expand Down
56 changes: 43 additions & 13 deletions web/src/containers/Admin/Plugins/PluginDetails.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
import { Button, Modal, Divider, Spin, message } from 'antd';
import { Button, Modal, Divider, Spin, message, Tooltip } from 'antd';
import {
StarFilled,
ClockCircleOutlined,
Expand Down Expand Up @@ -233,25 +233,33 @@ const PluginDetails = ({
<p>{`Description: ${pluginData.description}`}</p>
<div>
{' '}
{!!pluginData?.free_for?.length ? (
{!!free_for?.length ? (
<>
<p>Note:</p>{' '}
<div>
<InfoCircleOutlined />
<InfoCircleOutlined className="pt-2" />
</div>{' '}
{pluginData?.free_for?.map((item) => (
<p>{item}</p>
{free_for?.map((item, inx) => (
<p>{`${inx === 0 ? '' : `, `} ${
exchangeType[item]
}`}</p>
))}
</>
) : (
''
)}{' '}
</div>
<p>
<p className="tooltip-container">
Author:
<ReactSVG
src={STATIC_ICONS['VERIFIED_BADGE_PLUGIN_APPS']}
/>{' '}
<Tooltip
placement="rightBottom"
title={`Verified plugin by ${author}`}
>
<ReactSVG
src={STATIC_ICONS['VERIFIED_BADGE_PLUGIN_APPS']}
className="verified-icon"
/>
</Tooltip>{' '}
{pluginData.author}
</p>
<p>
Expand All @@ -274,6 +282,22 @@ const PluginDetails = ({
''
)}{' '}
</p>
{only_for?.length ? (
<div>
<p className="mr-2">Only For:</p>
{only_for?.map((item, inx) => (
<p>{`${inx === 0 ? '' : `, `} ${exchangeType[item]}`}</p>
))}
</div>
) : null}
{free_for?.length ? (
<div>
<p className="mr-2">Free For:</p>{' '}
{free_for?.map((item, inx) => (
<p>{` ${inx === 0 ? '' : `, `} ${exchangeType[item]}`}</p>
))}
</div>
) : null}
{pluginData.price && (
<div>
<p>Price: </p>{' '}
Expand Down Expand Up @@ -630,11 +654,17 @@ const PluginDetails = ({
''
)}{' '}
</div>
<p>
<p className="tooltip-container">
Author:
<ReactSVG
src={STATIC_ICONS['VERIFIED_BADGE_PLUGIN_APPS']}
/>{' '}
<Tooltip
placement="rightBottom"
title={`Verified plugin by ${author}`}
>
<ReactSVG
src={STATIC_ICONS['VERIFIED_BADGE_PLUGIN_APPS']}
className="verified-icon"
/>
</Tooltip>{' '}
{author}
</p>
{free_for?.length ? (
Expand Down
2 changes: 1 addition & 1 deletion web/src/containers/Admin/Plugins/PluginStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class Plugins extends Component {
};

onChangeNextType = (nextType) => {
this.setState({ nextType });
this.setState({ nextType, type: '', isConfigure: false });
};

onHandleCard = (key) => {
Expand Down
Loading

0 comments on commit 0866f3c

Please sign in to comment.