Skip to content

Commit

Permalink
D3 | Set account quorum equal to iroha quorum (#232)
Browse files Browse the repository at this point in the history
* style: fixes linter warnings

* chore: removed quorum

* feat: show correct number of pending txs
  • Loading branch information
Pobepto authored Oct 21, 2019
1 parent 0163245 commit 5ba0a30
Show file tree
Hide file tree
Showing 33 changed files with 229 additions and 112 deletions.
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-->
<template>
<div id="app">
<router-view/>
<router-view />
</div>
</template>

Expand Down
4 changes: 3 additions & 1 deletion src/components/Dashboard/DashboardChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
:class="[portfolioChart.filter !== value ? 'chart_time-filter' : 'chart_time-filter selected']"
@click="selectLabel(value)"
>
<p class="chart_time-filter_value">{{ value }}</p>
<p class="chart_time-filter_value">
{{ value }}
</p>
</div>
</el-col>
</el-row>
Expand Down
6 changes: 4 additions & 2 deletions src/components/Dashboard/DashboardDonutChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
<el-row>
<el-col :span="16">
<div class="crypto_header">
<p class="crypto_header-title">Portfolio structure</p>
<p class="crypto_header-title">
Portfolio structure
</p>
</div>
<div class="list_crypto">
<div class="list_crypto-content">
Expand All @@ -32,7 +34,7 @@
:span="8"
class="donut-chart"
>
<donut-chart :data="filterPortfolio"/>
<donut-chart :data="filterPortfolio" />
</el-col>
</el-row>
</el-card>
Expand Down
8 changes: 4 additions & 4 deletions src/components/Dashboard/DashboardPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
-->
<template>
<el-container
v-loading.fullscreen="isDashboardLoading"
v-if="isDashboardLoading"
v-loading.fullscreen="isDashboardLoading"
/>
<el-container v-else-if="hasNonEmptyWallets">
<el-main class="column-fullheight">
Expand All @@ -17,7 +17,7 @@
/>
</el-col>
<el-col :span="8">
<dashboard-donut-chart :portfolio="portfolioPercent"/>
<dashboard-donut-chart :portfolio="portfolioPercent" />
</el-col>
</el-row>
<el-row>
Expand All @@ -31,10 +31,10 @@
/>
</el-col>
<el-col :span="1">
<div class="vertical_devider"/>
<div class="vertical_devider" />
</el-col>
<el-col :span="14">
<dashboard-chart :dashboard-chart-height="dashboardChartHeight"/>
<dashboard-chart :dashboard-chart-height="dashboardChartHeight" />
</el-col>
</el-card>
</el-row>
Expand Down
20 changes: 14 additions & 6 deletions src/components/Dashboard/DashboardPortfolio.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
class="portfolio_card-padding"
>
<div class="portfolio_header">
<p class="portfolio_header-title">My Portfolio</p>
<p class="portfolio_header-title">
My Portfolio
</p>
</div>
<div class="portfolio_current-price">
<el-tooltip
Expand All @@ -23,7 +25,9 @@
<p
class="portfolio_current-price_value"
justify="center"
>{{ price.value | formatNumberLong }} {{ currencySymbol }}</p>
>
{{ price.value | formatNumberLong }} {{ currencySymbol }}
</p>
</el-tooltip>
</div>
<div class="portfolio_diff-price">
Expand All @@ -38,23 +42,27 @@
</div>
</el-col>
<el-col :span="1">
<div class="vertical_devider"/>
<div class="vertical_devider" />
</el-col>
<el-col :span="15">
<div class="chart_header">
<div class="chart_header-name">Portfolio history</div>
<div class="chart_header-name">
Portfolio history
</div>
<div class="chart_header-filter">
<div
v-for="(value, index) in daysLabels"
:key="index"
:class="[portfolioFilter !== value ? 'chart_time-filter' : 'chart_time-filter selected']"
@click="selectLabel(value)"
>
<p class="chart_time-filter_value">{{ value }}</p>
<p class="chart_time-filter_value">
{{ value }}
</p>
</div>
</div>
</div>
<div class="chart_header-divider"/>
<div class="chart_header-divider" />
<line-chart-portfolio
v-loading="portfolioHistoryIsLoading"
:data="chartData"
Expand Down
14 changes: 10 additions & 4 deletions src/components/Dashboard/DashboardTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,15 @@
justify="center"
class="table_header"
>
<div class="table_header-title currency">Currency</div>
<div class="table_header-title text-left balance">Balance</div>
<div class="table_header-title text-right changes">Changes</div>
<div class="table_header-title currency">
Currency
</div>
<div class="table_header-title text-left balance">
Balance
</div>
<div class="table_header-title text-right changes">
Changes
</div>
</el-row>
<el-row class="table_body">
<div
Expand All @@ -70,8 +76,8 @@
>
<div
v-for="(value, index) in sortedPortfolio"
:class="['table_body-item', portfolioChart.crypto === value.asset ? 'active' : '' ]"
:key="index"
:class="['table_body-item', portfolioChart.crypto === value.asset ? 'active' : '' ]"
>
<div
class="table_body-item_content"
Expand Down
8 changes: 1 addition & 7 deletions src/components/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-->
<template>
<el-container>
<Menu :quorum="accountQuorum"/>
<Menu :quorum="accountQuorum" />
<el-main style="width: 100%; height: 100vh; padding: 0; padding-left: 160px;">
<router-view />
</el-main>
Expand Down Expand Up @@ -41,12 +41,6 @@ export default {
this.getCustomAssets()
},

updated () {
console.log(
this.accountQuorum
)
},

mounted () {
document.documentElement.style.setProperty('--show-loading', 'none')
},
Expand Down
44 changes: 33 additions & 11 deletions src/components/Home/Menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
<SvgIcon
icon-name="Chart"
icon-class="menu-icon"
><ChartIcon/></SvgIcon>
>
<ChartIcon />
</SvgIcon>
<span
slot="title"
class="title-left"
Expand All @@ -31,7 +33,9 @@
<SvgIcon
icon-name="Wallet"
icon-class="menu-icon"
><WalletIcon/></SvgIcon>
>
<WalletIcon />
</SvgIcon>
<span
slot="title"
class="title-left"
Expand All @@ -47,13 +51,17 @@
<SvgIcon
icon-name="Exchange"
icon-class="menu-icon"
><ExchangeIcon/></SvgIcon>
>
<ExchangeIcon />
</SvgIcon>
</el-badge>
<SvgIcon
v-else
icon-name="Exchange"
icon-class="menu-icon"
><ExchangeIcon/></SvgIcon>
>
<ExchangeIcon />
</SvgIcon>
<span
slot="title"
class="title-left"
Expand All @@ -63,7 +71,9 @@
<SvgIcon
icon-name="Report"
icon-class="menu-icon"
><ReportIcon/></SvgIcon>
>
<ReportIcon />
</SvgIcon>
<span
slot="title"
class="title-left"
Expand All @@ -73,7 +83,9 @@
<SvgIcon
icon-name="Report"
icon-class="menu-icon"
><ReportIcon/></SvgIcon>
>
<ReportIcon />
</SvgIcon>
<span
slot="title"
class="title-left"
Expand All @@ -92,13 +104,17 @@
<SvgIcon
icon-name="Transaction"
icon-class="menu-icon"
><TransactionsIcon/></SvgIcon>
>
<TransactionsIcon />
</SvgIcon>
</el-badge>
<SvgIcon
v-else
icon-name="Transaction"
icon-class="menu-icon"
><TransactionsIcon/></SvgIcon>
>
<TransactionsIcon />
</SvgIcon>
<span
slot="title"
class="title-left"
Expand All @@ -108,7 +124,9 @@
<SvgIcon
icon-name="Settings"
icon-class="menu-icon"
><SettingsIcon/></SvgIcon>
>
<SettingsIcon />
</SvgIcon>
<span
slot="title"
class="title-left"
Expand All @@ -122,7 +140,9 @@
<SvgIcon
icon-name="Logout"
icon-class="menu-icon"
><LogoutIcon/></SvgIcon>
>
<LogoutIcon />
</SvgIcon>
<span
slot="title"
class="title-left"
Expand Down Expand Up @@ -178,7 +198,9 @@ export default {
return this.$route.path
},
pendingTransactionsAmount () {
return this.pendingTransferTransactions.length + this.pendingSettingsTransactions.length
const transferTransactionsAmount = new Set(this.pendingTransferTransactions.map(({ id }) => id)).size
const settingsTransactionsAmount = new Set(this.pendingSettingsTransactions.map(({ id }) => id)).size
return transferTransactionsAmount + settingsTransactionsAmount
}
},
watch: {
Expand Down
12 changes: 9 additions & 3 deletions src/components/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@
<div
v-if="_isError($v.form.privateKey)"
class="el-form-item__error"
>{{ _showError($v.form.privateKey) }}</div>
>
{{ _showError($v.form.privateKey) }}
</div>
</el-form-item>
<el-form-item
label="Username"
Expand All @@ -85,7 +87,9 @@
<div
v-if="_isError($v.form.username)"
class="el-form-item__error"
>{{ _showError($v.form.username) }}</div>
>
{{ _showError($v.form.username) }}
</div>
</el-form-item>
<el-form-item
label="Node IP"
Expand Down Expand Up @@ -117,7 +121,9 @@
<div
v-if="_isError($v.form.nodeIp)"
class="el-form-item__error"
>{{ _showError($v.form.nodeIp) }}</div>
>
{{ _showError($v.form.nodeIp) }}
</div>
</el-form-item>
<el-form-item class="auth-button-container">
<el-row class="auth-button_actions">
Expand Down
4 changes: 2 additions & 2 deletions src/components/Reports/ReportsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
style="margin-top: 40px;"
@click="downloadSeveral({ date }, 'pdf')"
>
<fa-icon icon="download"/>
<fa-icon icon="download" />
PDF
</el-button>
</el-col>
Expand All @@ -145,7 +145,7 @@
style="margin-top: 40px;"
@click="downloadSeveral({ date, assets: selectedWallets }, 'csv')"
>
<fa-icon icon="download"/>
<fa-icon icon="download" />
CSV
</el-button>
</el-col>
Expand Down
16 changes: 12 additions & 4 deletions src/components/Settings/components/Leftside/CurrencyItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
title="Currency"
>
<el-row class="currencies_list">
<p class="list-title">Dashboard (Portfolio, Market, Balance and Changes)</p>
<p class="list-title">
Dashboard (Portfolio, Market, Balance and Changes)
</p>
<el-col>
<el-radio-group
v-model="currentFiat"
Expand All @@ -20,12 +22,16 @@
:label="value"
class="currencies_list-select"
border
>{{ value }}</el-radio>
>
{{ value }}
</el-radio>
</el-radio-group>
</el-col>
</el-row>
<el-row class="currencies_list">
<p class="list-title">Wallets (Market)</p>
<p class="list-title">
Wallets (Market)
</p>
<el-col>
<el-radio-group
v-model="currentCrypto"
Expand All @@ -37,7 +43,9 @@
:label="value"
class="currencies_list-select"
border
>{{ value }}</el-radio>
>
{{ value }}
</el-radio>
</el-radio-group>
</el-col>
</el-row>
Expand Down
Loading

0 comments on commit 5ba0a30

Please sign in to comment.