Skip to content

Commit

Permalink
Merge branch 'develop' into release/1.40.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Popov committed Sep 11, 2024
2 parents 5422c2c + 995ac92 commit 1f0d1ed
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 21 deletions.
1 change: 1 addition & 0 deletions src/components/pages/OrderBook/BookChartsWidget.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<price-chart-widget
v-bind="$attrs"
:dex-id="dexId"
:base-asset="baseAsset"
:quote-asset="quoteAsset"
Expand Down
1 change: 1 addition & 0 deletions src/components/pages/OrderBook/BookWidget.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<base-widget
v-bind="$attrs"
extensive
v-loading="loading"
class="stock-book book"
Expand Down
2 changes: 1 addition & 1 deletion src/components/pages/OrderBook/HistoryOrderWidget.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<base-widget class="order-history-widget s-flex-column" extensive delimeter>
<base-widget v-bind="$attrs" extensive delimeter class="order-history-widget s-flex-column">
<template #title>
<div class="order-history-buttons order-history-buttons--filter-buttons">
<span
Expand Down
1 change: 1 addition & 0 deletions src/components/pages/OrderBook/MarketTradesWidget.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<base-widget
v-bind="$attrs"
extensive
class="market-trades"
:title="t('orderBook.marketTrades')"
Expand Down
2 changes: 1 addition & 1 deletion src/components/pages/Stats/BarChart.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<base-widget :title="title" :tooltip="tooltip">
<base-widget v-bind="$attrs" :title="title" :tooltip="tooltip">
<template #filters>
<stats-filter :filters="filters" :value="filter" @input="changeFilter" />
</template>
Expand Down
2 changes: 1 addition & 1 deletion src/components/pages/Stats/NetworkStats.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<base-widget :title="t('networkStatisticsText')">
<base-widget v-bind="$attrs" :title="t('networkStatisticsText')">
<template #filters>
<stats-filter :disabled="loading" :filters="filters" :value="filter" @input="changeFilter" />
</template>
Expand Down
2 changes: 1 addition & 1 deletion src/components/pages/Stats/TvlChart.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<base-widget :title="TranslationConsts.TVL" :tooltip="t('tooltips.tvl')">
<base-widget v-bind="$attrs" :title="TranslationConsts.TVL" :tooltip="t('tooltips.tvl')">
<template #filters>
<stats-filter :filters="filters" :value="filter" @input="changeFilter" />
</template>
Expand Down
16 changes: 8 additions & 8 deletions src/views/OrderBook.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@
<customise-page-widget :visible.sync="settingsVisibility" class="setting-widget" />
</div>
<div class="column-2">
<book-charts-widget class="chart-widget" />
<history-order-widget class="history-widget" />
<book-charts-widget class="chart-widget" pip-disabled />
<history-order-widget class="history-widget" pip-disabled />
</div>
<div class="column-3">
<book-widget class="book-widget" />
<market-trades-widget class="trades-widget" />
<book-widget class="book-widget" pip-disabled />
<market-trades-widget class="trades-widget" pip-disabled />
</div>
</div>
<div v-else class="order-book-widgets">
<div class="column-2">
<set-limit-order-widget class="set-widget" />
<book-widget class="book-widget" />
<book-widget class="book-widget" pip-disabled />
</div>
<div class="column-3">
<history-order-widget class="history-widget" />
<market-trades-widget class="trades-widget" />
<history-order-widget class="history-widget" pip-disabled />
<market-trades-widget class="trades-widget" pip-disabled />
</div>
<div class="column-1">
<book-charts-widget class="chart-widget" />
<book-charts-widget class="chart-widget" pip-disabled />
</div>
</div>
</div>
Expand Down
14 changes: 7 additions & 7 deletions src/views/Stats.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<template>
<div class="stats-container">
<stats-network-stats class="grid-item" :parent-loading="parentLoading" />
<stats-network-stats class="grid-item" :parent-loading="parentLoading" pip-disabled />

<stats-tvl-chart class="grid-item grid-item--50" :parent-loading="parentLoading" />
<stats-tvl-chart class="grid-item grid-item--50" :parent-loading="parentLoading" pip-disabled />

<stats-bar-chart class="grid-item grid-item--50" :parent-loading="parentLoading" />
<stats-bar-chart class="grid-item grid-item--50" :parent-loading="parentLoading" pip-disabled />

<stats-bar-chart class="grid-item grid-item--50" fees :parent-loading="parentLoading" />
<stats-bar-chart class="grid-item grid-item--50" fees :parent-loading="parentLoading" pip-disabled />

<stats-supply-chart class="grid-item grid-item--50" :parent-loading="parentLoading" />
<supply-chart-widget class="grid-item grid-item--50" :parent-loading="parentLoading" pip-disabled />
</div>
</template>

Expand All @@ -19,14 +19,14 @@ import { Component, Mixins } from 'vue-property-decorator';
import StatsBarChart from '@/components/pages/Stats/BarChart.vue';
import StatsNetworkStats from '@/components/pages/Stats/NetworkStats.vue';
import StatsTvlChart from '@/components/pages/Stats/TvlChart.vue';
import StatsSupplyChart from '@/components/shared/Widget/SupplyChart.vue';
import SupplyChartWidget from '@/components/shared/Widget/SupplyChart.vue';
@Component({
components: {
StatsNetworkStats,
StatsTvlChart,
StatsBarChart,
StatsSupplyChart,
SupplyChartWidget,
},
})
export default class Stats extends Mixins(mixins.LoadingMixin) {}
Expand Down
18 changes: 16 additions & 2 deletions src/views/Swap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:lines="options.edit"
:loading="pageLoading"
:default-layouts="DefaultLayouts"
v-model="widgets"
v-model="widgetsModel"
>
<template v-slot:[SwapWidgets.Form]="props">
<swap-form-widget v-bind="props" primary-title full pip-disabled />
Expand All @@ -31,7 +31,7 @@
<customise-widget
v-bind="props"
v-model="customizePopper"
:widgets-model.sync="widgets"
:widgets-model.sync="widgetsModel"
:options-model.sync="options"
:labels="labels"
pip-disabled
Expand Down Expand Up @@ -170,6 +170,20 @@ export default class Swap extends Mixins(mixins.LoadingMixin, TranslationMixin,
[SwapWidgets.SupplyChart]: false,
};
get widgetsModel(): WidgetsVisibilityModel {
const model = { ...this.widgets };
if (!this.tokenTo) {
delete model[SwapWidgets.PriceChartB];
}
return model;
}
set widgetsModel(model: WidgetsVisibilityModel) {
this.widgets = { ...this.widgets, ...model };
}
get labels(): Record<string, string> {
const priceText = this.t('priceChartText');
Expand Down

0 comments on commit 1f0d1ed

Please sign in to comment.