mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-15 11:58:34 +08:00
fix(ui): cron table layout, chart locale reactivity, mobile stats grid
This commit is contained in:
parent
ccd86dbb80
commit
7cf2508ded
@ -18,6 +18,15 @@
|
|||||||
<div class="page-stage">
|
<div class="page-stage">
|
||||||
<div class="table-wrap">
|
<div class="table-wrap">
|
||||||
<table class="data-table">
|
<table class="data-table">
|
||||||
|
<colgroup>
|
||||||
|
<col style="width: 22%; min-width: 160px" />
|
||||||
|
<col style="width: 18%; min-width: 140px" />
|
||||||
|
<col style="width: 16%; min-width: 130px" />
|
||||||
|
<col style="width: 12%; min-width: 100px" />
|
||||||
|
<col style="width: 12%; min-width: 100px" />
|
||||||
|
<col style="width: 8%; min-width: 70px" />
|
||||||
|
<col style="width: 12%; min-width: 100px" />
|
||||||
|
</colgroup>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{ t('cronJobs.columns.name') }}</th>
|
<th>{{ t('cronJobs.columns.name') }}</th>
|
||||||
|
|||||||
@ -144,7 +144,7 @@ import { CanvasRenderer } from 'echarts/renderers'
|
|||||||
|
|
||||||
echarts.use([LineChart, GridComponent, TooltipComponent, LegendComponent, CanvasRenderer])
|
echarts.use([LineChart, GridComponent, TooltipComponent, LegendComponent, CanvasRenderer])
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t, locale } = useI18n()
|
||||||
|
|
||||||
const overview = ref<Record<string, any>>({})
|
const overview = ref<Record<string, any>>({})
|
||||||
const recentRuns = ref<any[]>([])
|
const recentRuns = ref<any[]>([])
|
||||||
@ -258,6 +258,10 @@ function renderChart() {
|
|||||||
ro.observe(chartRef.value!)
|
ro.observe(chartRef.value!)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
watch(locale, () => {
|
||||||
|
if (trendData.value.length) renderChart()
|
||||||
|
})
|
||||||
|
|
||||||
function formatTokens(n: number): string {
|
function formatTokens(n: number): string {
|
||||||
if (!n) return '0'
|
if (!n) return '0'
|
||||||
if (n >= 1_000_000) return (n / 1_000_000).toFixed(1) + 'M'
|
if (n >= 1_000_000) return (n / 1_000_000).toFixed(1) + 'M'
|
||||||
@ -438,4 +442,10 @@ function calcDuration(run: any): string {
|
|||||||
.stats-grid { grid-template-columns: repeat(2, 1fr); }
|
.stats-grid { grid-template-columns: repeat(2, 1fr); }
|
||||||
.comparison-grid { grid-template-columns: 1fr; }
|
.comparison-grid { grid-template-columns: 1fr; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 480px) {
|
||||||
|
.stats-grid { grid-template-columns: 1fr; }
|
||||||
|
.stat-card { min-width: 0; }
|
||||||
|
.stat-value { font-size: 28px; }
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user