11<script setup lang="ts">
2- import { computed , nextTick , onBeforeUnmount , onMounted , ref } from ' vue'
2+ import { computed , nextTick , onBeforeUnmount , onMounted , ref , type DefineComponent } from ' vue'
33import { useRouter } from ' vue-router'
4- import * as echarts from ' echarts'
5- import { message } from ' ant-design-vue'
4+ import AButton from ' ant-design-vue/es/button'
5+ import message from ' ant-design-vue/es/message'
6+ import ASpin from ' ant-design-vue/es/spin'
7+ import AntTable from ' ant-design-vue/es/table'
8+ import ATag from ' ant-design-vue/es/tag'
9+ import Typography from ' ant-design-vue/es/typography'
610import {
711 BarChartOutlined ,
812 ClockCircleOutlined ,
@@ -29,15 +33,19 @@ import {
2933 type Session
3034} from ' ../api'
3135import { chartPalette , usageChartColors } from ' ../chartPalette'
36+ import { init , type ECharts } from ' ../chartRuntime'
3237import { notifyAppDataChanged } from ' ../events'
3338
39+ const ATable = AntTable as unknown as DefineComponent
40+ const ATypographyText = Typography .Text
41+
3442const router = useRouter ()
3543const loading = ref (true )
3644const startupIndexing = ref (false )
3745const overview = ref <Overview | null >(null )
3846const settings = ref <Settings | null >(null )
3947const chartEl = ref <HTMLDivElement | null >(null )
40- let chart: echarts . ECharts | null = null
48+ let chart: ECharts | null = null
4149
4250const hasIndexedData = computed (() => (overview .value ?.totalSessions || 0 ) > 0 )
4351const sourcePathDisplay = computed (() => settings .value ?.sourcePath || settings .value ?.defaultSourcePath || ' ' )
@@ -112,7 +120,7 @@ function renderChart() {
112120 return
113121 }
114122 if (! chartEl .value ) return
115- if (! chart ) chart = echarts . init (chartEl .value )
123+ if (! chart ) chart = init (chartEl .value )
116124 const days = dailyUsage .map ((item ) => item .date .slice (5 ))
117125 chart .setOption ({
118126 color: usageChartColors ,
0 commit comments