Skip to content

Commit

Permalink
Merge pull request #561 from bitholla/2.0
Browse files Browse the repository at this point in the history
2.0
  • Loading branch information
abeikverdi authored Feb 22, 2021
2 parents d4ef227 + 786b159 commit 3fb3188
Show file tree
Hide file tree
Showing 28 changed files with 327 additions and 189 deletions.
2 changes: 1 addition & 1 deletion server/api/swagger/swagger.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
swagger: "2.0"
info:
version: "2.0.5"
version: "2.0.6"
title: HollaEx Kit
host: api.hollaex.com
basePath: /v2
Expand Down
11 changes: 8 additions & 3 deletions server/mail/templates/helpers/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,14 @@ const footerTemplate = (language = DEFAULT_LANGUAGE(), domain = DOMAIN) => {
<img src="${EMAIL_ICONS.FACEBOOK}" height="20"/>
</a>
</div>
<div style="${styles.poweredby}">
${FOOTER.POWERED_BY} <a href="${BITHOLLA_DOMAIN}"><img src="${BITHOLLA_LOGO_BLACK}" height="10"/></a>
</div>
${!LINKS().hide_referral_badge
? `<div style="${styles.poweredby}">
<a href="${LINKS().referral_link && LINKS().referral_label ? LINKS().referral_link : BITHOLLA_DOMAIN}">
${LINKS().referral_label ? LINKS().referral_label : `${FOOTER.POWERED_BY} <img src="${BITHOLLA_LOGO_BLACK}" height="10"/>`}
</a>
</div>`
: ''
}
</div>
</div>
`;
Expand Down
2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.0.5",
"version": "2.0.6",
"private": false,
"description": "HollaEx Kit",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.5
2.0.6
2 changes: 1 addition & 1 deletion web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hollaex-kit",
"version": "2.0.5",
"version": "2.0.6",
"private": true,
"dependencies": {
"@ant-design/compatible": "1.0.5",
Expand Down
11 changes: 7 additions & 4 deletions web/src/components/AppBar/MarketSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
} from 'utils/currency';
import SearchBox from './SearchBox';
import { removeFromFavourites, addToFavourites } from 'actions/appActions';
import { isLoggedIn } from 'utils/token';

class MarketSelector extends Component {
constructor(props) {
Expand Down Expand Up @@ -117,14 +118,16 @@ class MarketSelector extends Component {

isFavourite = (pair) => {
const { favourites } = this.props;
return favourites.includes(pair);
return isLoggedIn() && favourites.includes(pair);
};

toggleFavourite = (pair) => {
const { addToFavourites, removeFromFavourites } = this.props;
return this.isFavourite(pair)
? removeFromFavourites(pair)
: addToFavourites(pair);
if (isLoggedIn()) {
return this.isFavourite(pair)
? removeFromFavourites(pair)
: addToFavourites(pair);
}
};

render() {
Expand Down
40 changes: 21 additions & 19 deletions web/src/components/AppBar/TabList.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import Tab from './Tab';
import { isLoggedIn } from 'utils/token';

const TabList = ({
items,
Expand All @@ -12,25 +13,26 @@ const TabList = ({
onTabClick,
}) => (
<div className="d-flex align-items-center h-100">
{items.map((tab, index) => {
const pair = pairs[tab];
const ticker = tickers[tab];
return (
<Tab
key={`item-${index}`}
index={index}
tab={tab}
pair={pair}
ticker={ticker}
coins={coins}
selectedToOpen={selectedToOpen}
selectedToRemove={selectedToRemove}
activePairTab={activePairTab}
sortId={index}
onTabClick={onTabClick}
/>
);
})}
{isLoggedIn() &&
items.map((tab, index) => {
const pair = pairs[tab];
const ticker = tickers[tab];
return (
<Tab
key={`item-${index}`}
index={index}
tab={tab}
pair={pair}
ticker={ticker}
coins={coins}
selectedToOpen={selectedToOpen}
selectedToRemove={selectedToRemove}
activePairTab={activePairTab}
sortId={index}
onTabClick={onTabClick}
/>
);
})}
</div>
);

Expand Down
49 changes: 27 additions & 22 deletions web/src/components/Sidebar/SidebarBottom.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React, { Fragment } from 'react';
import React from 'react';
import { Link } from 'react-router';
import { ReactSVG } from 'react-svg';
import classnames from 'classnames';
import STRINGS from '../../config/localizedStrings';
import { ICONS } from '../../config/constants';
import { ButtonLink } from '../../components';
import withConfig from 'components/ConfigProvider/withConfig';
import Image from 'components/Image';

const SidebarButton = ({
title = '',
Expand All @@ -14,7 +14,7 @@ const SidebarButton = ({
}) => {
return (
<Link to={path} className={classnames('sidebar-bottom-button', { active })}>
<ReactSVG src={iconPath} className="sidebar-bottom-icon" />
<Image icon={iconPath} wrapperClassName="sidebar-bottom-icon" />
<div
className={
active ? 'bottom-text-acttive bottom-bar-text' : 'bottom-bar-text'
Expand All @@ -26,55 +26,58 @@ const SidebarButton = ({
);
};

export const SidebarBottom = ({
const SidebarBottom = ({
activePath = 'x',
pair = '',
isLogged,
enabledPlugins = [],
features = {},
icons: ICONS = {},
}) => {
return isLogged ? (
<div className="sidebar-bottom-wrapper d-flex justify-content-between">
<div className="sidebar-bottom-wrapper d-flex">
<SidebarButton
path={'/account'}
title={STRINGS['ACCOUNT_TEXT']}
iconPath={ICONS.SIDEBAR_ACCOUNT_ACTIVE}
iconPath={ICONS.ACCOUNT_LINE}
active={activePath === 'account'}
/>
{/* <SidebarButton
{features && features.quick_trade && (
<SidebarButton
path={`/quick-trade/${pair}`}
title={STRINGS["QUICK_TRADE"]}
iconPath={activePath === 'quick-trade' ? ICONS.SIDEBAR_QUICK_TRADING_ACTIVE : ICONS.SIDEBAR_QUICK_TRADING_INACTIVE}
title={STRINGS['QUICK_TRADE']}
iconPath={ICONS.QUICK_TRADE_TAB_ACTIVE}
active={activePath === 'quick-trade'}
/> */}
<SidebarButton
path={`/trade/${pair}`}
title={STRINGS['PRO_TRADE']}
iconPath={ICONS.SIDEBAR_TRADING_ACTIVE}
active={activePath === 'trade'}
/>
{features && features.chat ? (
/>
)}
{features && features.pro_trade && (
<SidebarButton
path={`/trade/${pair}`}
title={STRINGS['PRO_TRADE']}
iconPath={ICONS.SIDEBAR_TRADING_ACTIVE}
active={activePath === 'trade'}
/>
)}
{features && features.chat && (
<SidebarButton
path={`/chat`}
title={STRINGS['USER_SETTINGS.TITLE_CHAT']}
iconPath={ICONS.CHAT}
active={activePath === 'chat'}
/>
) : (
<Fragment />
)}
<SidebarButton
path="/wallet"
title={STRINGS['WALLET_TITLE']}
iconPath={ICONS.SIDEBAR_WALLET_ACTIVE}
active={activePath === 'wallet'}
/>
<SidebarButton
{/*<SidebarButton
path={'/home'}
title={STRINGS['TRADE_TAB_POSTS']}
iconPath={ICONS.SIDEBAR_POST_ACTIVE}
active={activePath === 'home'}
/>
/>*/}
</div>
) : (
<div className="d-flex w-100 p-4">
Expand All @@ -96,3 +99,5 @@ export const SidebarBottom = ({
</div>
);
};

export default withConfig(SidebarBottom);
54 changes: 44 additions & 10 deletions web/src/components/Sidebar/_Sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,31 +80,65 @@ $row--size: calc(#{$row--height} - #{$sidebar-sections-padding});
color: $base_top-bar-navigation_text;
width: 100%;
padding: 0.5rem 0.5rem 0.8rem 0.5rem;
justify-content: space-evenly;

.sidebar-bottom-button {
flex: 1;
justify-content: space-between;
flex-direction: column;
display: flex;
align-items: center;
width: 20%;

.sidebar-bottom-icon {
svg {
.post-icon,
.wallet-selected-2,
.chat-0,
.account-svg-1,
.quick-trade-tab-active {
fill: $base_top-bar-navigation_text_inactive;
}

.trade-active-2,
.chat-0,
.quick-trade-tab-active {
stroke: $base-top-bar-navigation_text_inactive;
}
}
}

&.active {
background-color: $app-background-color;
.sidebar-bottom-icon {
svg {
fill: $bottom-bar--background;
stroke: $bottom-bar--background;
.post-icon {
fill: $bottom-bar--background;
stroke: $bottom-bar--background;
.post-icon,
.wallet-selected-2,
.chat-0,
.account-svg-1,
.quick-trade-tab-active {
fill: $base_top-bar-navigation_text;
}

.trade-active-2,
.chat-0,
.quick-trade-tab-active {
stroke: $base-top-bar-navigation_text;
}
}
}
}
.bottom-bar-text {
font-size: 12px;
font-size: 10px;
text-align: center;
margin-top: -17px;
font-weight: lighter;
color: $base_top-bar-navigation_text;
color: $base_top-bar-navigation_text-inactive;
white-space: nowrap;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
}
.bottom-text-acttive {
color: $colors-main-black !important;
color: $base_top-bar-navigation_text !important;
font-weight: bolder;
}
.sidebar-bottom-icon {
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export { default as HeaderSection } from './CheckTitle/HeaderSection';
export { default as CustomTabBar } from './CheckTitle/CustomTabBar';
export { default as MobileTabBar } from './CheckTitle/MobileTabBar';
export { default as Sidebar } from './Sidebar';
export { SidebarBottom } from './Sidebar/SidebarBottom';
export { default as SidebarBottom } from './Sidebar/SidebarBottom';
export { Logout } from './Sidebar/rows';
export { default as Wallet } from './Wallet';
export { default as AssetsBlockForm } from './Wallet/AssetsBlockForm';
Expand Down
2 changes: 1 addition & 1 deletion web/src/config/lang/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ const nestedContent = {
'You must store this code securely to recover your 2FA in case you change or lose your mobile phone in future.',
MESSAGE_5: 'Manual',
WARNING:
'We highly recommend you set up 2 factor authentication (2FA). Doing so will greatly increase the security of your funds.',
'We highly recommend you set up two-factor authentication (2FA). Doing so will greatly increase the security of your funds.',
ENABLE: 'Enable Two-Factor Authentication',
DISABLE: 'Disable Two-Factor Authentication',
},
Expand Down
45 changes: 23 additions & 22 deletions web/src/containers/Admin/Deposits/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,25 @@ import { Button, Tooltip } from 'antd';
import { Link } from 'react-router';
import { formatCurrency, formatDate } from '../../../utils/index';

import { isSupport } from '../../../utils/token';

export const renderBoolean = (value) => (
/*export const renderBoolean = (value) => (
<LegacyIcon type={value ? 'check-circle' : 'close-circle-o'} />
);
);*/

const renderStatus = (_, { status, dismissed, rejected }) => {
if (status) {
return 'Completed';
}

if (dismissed) {
return 'Dismissed';
}

if (rejected) {
return 'Rejected';
}

return 'Pending';
};

const ButtonNotAvailable = () => <CloseSquareOutlined />;
export const renderValidation = ({
Expand Down Expand Up @@ -84,28 +98,15 @@ export const COLUMNS = (currency, type) => {
// { title: 'Address', dataIndex: 'address', key: 'address' },
{ title: 'Currency', dataIndex: 'currency', key: 'currency' },
{
title: 'Completed',
dataIndex: 'status',
title: 'Status',
key: 'status',
render: renderBoolean,
},
{
title: 'Dismissed',
dataIndex: 'dismissed',
key: 'dismissed',
render: renderBoolean,
render: renderStatus,
},
{
title: 'Rejected',
dataIndex: 'rejected',
key: 'rejected',
render: renderBoolean,
},
// { title: 'Amount', dataIndex: 'amount', key: 'amount' },
{ title: 'Amount', dataIndex: 'amount', key: 'amount' },
// { title: 'Fee', dataIndex: 'fee', key: 'fee' },
// { title: 'Timestamp', dataIndex: 'created_at', key: 'created_at' },
];
if (!isSupport()) {
/*if (!isSupport()) {
const adminColumns = [
{
title: 'Validate',
Expand All @@ -121,7 +122,7 @@ export const COLUMNS = (currency, type) => {
},
];
return columns.concat(adminColumns);
}
}*/
return columns;
};

Expand Down
Loading

0 comments on commit 3fb3188

Please sign in to comment.