diff --git a/src/App.vue b/src/App.vue index 8ad27b7..17c6856 100644 --- a/src/App.vue +++ b/src/App.vue @@ -39,7 +39,9 @@ const confirmLiveDataSetFetched = useFetchingDataStore().confirmLiveDataSetFetch - +
+ +
diff --git a/src/components/DataCharts.vue b/src/components/DataCharts.vue index 02b9c8a..9e155b4 100644 --- a/src/components/DataCharts.vue +++ b/src/components/DataCharts.vue @@ -9,7 +9,7 @@ import { TitleComponent, TooltipComponent, LegendComponent } from "echarts/compo import type { EChartsOption } from "echarts" import VChart, { THEME_KEY } from "vue-echarts" -import { ref, provide } from "vue" +import { ref, provide, computed } from "vue" import type { Ref } from "vue" const itemTypesAndCounts = storeToRefs(useFetchingDataStore()).itemTypesAndCounts @@ -19,7 +19,7 @@ const seriesData: object[] = [] for (const [index, itemTypeAndCount] of itemTypesAndCounts.value.entries()) { const type: string = itemTypeAndCount.type legendData.push(type) - const count = itemTypesAndCounts.value[index].count + const count = computed(() => itemTypesAndCounts.value[index].count) seriesData.push({ value: count, name: type }) } @@ -65,5 +65,6 @@ const option: Ref = ref({ diff --git a/src/components/SettingItems.vue b/src/components/SettingItems.vue index 3e486d1..b866e9c 100644 --- a/src/components/SettingItems.vue +++ b/src/components/SettingItems.vue @@ -13,23 +13,22 @@ function reset() { } diff --git a/src/views/HackerNewsView.vue b/src/views/HackerNewsView.vue index 087dcce..4125177 100644 --- a/src/views/HackerNewsView.vue +++ b/src/views/HackerNewsView.vue @@ -5,6 +5,7 @@ import ControlPanel from "@/components/ControlPanel.vue" import SettingItems from "@/components/SettingItems.vue" import NavigatingButtons from "@/components/NavigatingButtons.vue" import ItemPost from "@/components/ItemPost.vue" +import DataCharts from "@/components/DataCharts.vue" import { useLocalStorage } from "@vueuse/core" import { useCoreDataStore } from "@/stores/coreData" @@ -20,43 +21,48 @@ const foldSign = computed(() => (folded.value ? " ∨ " : " ∧ ")) function fold() { folded.value = !folded.value } +const isLargeScreen = computed(() => window.matchMedia("(min-width: 2560px)").matches) // TODO Be able to drag controlPanel diff --git a/src/views/SettingsView.vue b/src/views/SettingsView.vue index 19339a1..42851cd 100644 --- a/src/views/SettingsView.vue +++ b/src/views/SettingsView.vue @@ -4,6 +4,7 @@ import SettingItems from "@/components/SettingItems.vue"