mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-13 19:23:42 +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="table-wrap">
|
||||
<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>
|
||||
<tr>
|
||||
<th>{{ t('cronJobs.columns.name') }}</th>
|
||||
|
||||
@ -144,7 +144,7 @@ import { CanvasRenderer } from 'echarts/renderers'
|
||||
|
||||
echarts.use([LineChart, GridComponent, TooltipComponent, LegendComponent, CanvasRenderer])
|
||||
|
||||
const { t } = useI18n()
|
||||
const { t, locale } = useI18n()
|
||||
|
||||
const overview = ref<Record<string, any>>({})
|
||||
const recentRuns = ref<any[]>([])
|
||||
@ -258,6 +258,10 @@ function renderChart() {
|
||||
ro.observe(chartRef.value!)
|
||||
}
|
||||
|
||||
watch(locale, () => {
|
||||
if (trendData.value.length) renderChart()
|
||||
})
|
||||
|
||||
function formatTokens(n: number): string {
|
||||
if (!n) return '0'
|
||||
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); }
|
||||
.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>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user