From ba1f59eef7c902d8d8be650642752053a3771466 Mon Sep 17 00:00:00 2001
From: Jan Michek <15363559+janmichek@users.noreply.github.com>
Date: Mon, 6 May 2024 15:26:48 +0200
Subject: [PATCH] feat: Transactions chart page (#719)
---
src/components/AppSelect.vue | 56 +++++++++------
src/components/ChartControls.vue | 62 ++++++++---------
src/components/ContractsChartPanel.vue | 30 ++++----
src/components/LineChart.vue | 45 +++++++++---
src/components/NamesChartPanel.vue | 32 +++++----
src/components/RangePicker.vue | 10 +--
src/components/TheNavigation.vue | 10 +++
src/components/TransactionsChartPanel.vue | 84 +++++++++++++++--------
src/components/TransactionsSelect.vue | 5 ++
src/pages/charts/index.vue | 54 +++++++++++++++
src/pages/names/index.vue | 4 +-
src/pages/transactions/index.vue | 4 +-
src/stores/charts.js | 30 ++++++++
src/stores/contracts.js | 8 +--
src/stores/names.js | 8 +--
src/stores/status.js | 2 +-
src/stores/transactions.js | 13 ----
src/utils/constants.js | 7 ++
src/utils/hints/chartsHints.js | 3 +
19 files changed, 321 insertions(+), 146 deletions(-)
create mode 100644 src/pages/charts/index.vue
create mode 100644 src/stores/charts.js
create mode 100644 src/utils/hints/chartsHints.js
diff --git a/src/components/AppSelect.vue b/src/components/AppSelect.vue
index c17a5e19f..1ba761896 100644
--- a/src/components/AppSelect.vue
+++ b/src/components/AppSelect.vue
@@ -9,7 +9,10 @@
:disabled="disabled"
:searchable="searchable"
:hide-selected="hideSelected"
- :preselect-first="preselectFirst">
+ :preselect-first="preselectFirst"
+ :class="[
+ size ? `multiselect--${size}` : null,
+ ]">
@@ -63,6 +66,11 @@ const props = defineProps({
type: Boolean,
default: false,
},
+ size: {
+ type: String,
+ default: null,
+ validator: val => ['sm'].includes(val),
+ },
modelValue: undefined,
})
const emit = defineEmits(['update:modelValue'])
@@ -89,13 +97,9 @@ const selectedValue = useVModel(props, 'modelValue', emit)
&__single {
color: var(--color-midnight);
- font-size: 16px;
+ font-size: 14px;
line-height: 20px;
padding-left: var(--space-0);
-
- @media (--desktop) {
- font-size: 14px;
- }
}
&__content-wrapper {
@@ -110,19 +114,14 @@ const selectedValue = useVModel(props, 'modelValue', emit)
}
&__option {
- height: 36px;
display: flex;
align-items: center;
border: solid var(--color-midnight-35);
border-width: 1px 0;
color: solid var(--color-midnight);
- font-size: 12px;
+ font-size: 14px;
line-height: 20px;
- @media (--desktop) {
- font-size: 14px;
- }
-
&:last-child {
border-width: 1px 0 0;
}
@@ -142,15 +141,12 @@ const selectedValue = useVModel(props, 'modelValue', emit)
}
&__input {
- font-size: 16px;
+ font-size: 14px;
line-height: 20px;
-
- @media (--desktop) {
- font-size: 14px;
- }
}
&__select {
+ height: 36px;
display: flex;
justify-content: center;
align-items: center;
@@ -178,13 +174,31 @@ const selectedValue = useVModel(props, 'modelValue', emit)
&__placeholder {
color: var(--color-midnight-35);
- font-size: 16px;
+ font-size: 14px;
line-height: 20px;
- padding-top: 0;
padding-left: var(--space-0);
+ padding-top: var(--space-0);
+ margin-bottom: var(--space-0);
+ }
+
+ &--sm {
+ .multiselect__tags {
+ min-height: 28px;
+ padding: 0 40px 0 8px;
+ }
- @media (--desktop) {
- font-size: 14px;
+ .multiselect__single {
+ padding-top: var(--space-0);
+ margin-bottom: var(--space-0);
+ }
+
+ .multiselect__input {
+ padding-top: var(--space-0);
+ margin-bottom: var(--space-0);
+ }
+
+ .multiselect__select {
+ height: 29px;
}
}
}
diff --git a/src/components/ChartControls.vue b/src/components/ChartControls.vue
index af2766df1..34329aa31 100644
--- a/src/components/ChartControls.vue
+++ b/src/components/ChartControls.vue
@@ -2,55 +2,55 @@