refactor(RuntimeQueues): enhance UI layout and styling for better readability

Updated the RuntimeQueues component to improve the layout and styling of the task queue display. Changes include a new grid layout for pool items, updated class names for better semantic structure, and adjustments to font sizes and spacing for improved readability. Additionally, added a note section with enhanced styling for clarity.
This commit is contained in:
wizardchen
2026-07-10 23:52:44 +08:00
committed by lyingbug
parent d496d0fc73
commit 80556fbaa7
+96 -84
View File
@@ -99,16 +99,20 @@
<h3>{{ t('system.globalSettings.runtime.poolsTitle') }}</h3> <h3>{{ t('system.globalSettings.runtime.poolsTitle') }}</h3>
<p>{{ t('system.globalSettings.runtime.poolsDescription') }}</p> <p>{{ t('system.globalSettings.runtime.poolsDescription') }}</p>
</div> </div>
<span>{{ t('system.globalSettings.runtime.perInstance') }}</span> <span class="rq-pools-note">{{ t('system.globalSettings.runtime.perInstance') }}</span>
</div> </div>
<div class="rq-pool-strip"> <div class="rq-pool-grid">
<div v-for="pool in pools" :key="pool.name" class="rq-pool-item"> <div v-for="pool in pools" :key="pool.name" class="rq-pool-card">
<div class="rq-pool-topline"> <div class="rq-pool-topline">
<span>{{ poolLabel(pool.name) }}</span> <span class="rq-pool-name">{{ poolLabel(pool.name) }}</span>
<strong>{{ pool.concurrency }}</strong> <strong class="rq-pool-value">{{ pool.concurrency }}</strong>
</div> </div>
<p>{{ poolDescription(pool.name) }}</p> <p class="rq-pool-desc">
<small>{{ t('system.globalSettings.runtime.queueCount', { value: pool.queue_count }) }}</small> {{ poolDescription(pool.name) }}
<span class="rq-pool-meta">
{{ t('system.globalSettings.runtime.queueCount', { value: pool.queue_count }) }}
</span>
</p>
</div> </div>
</div> </div>
</section> </section>
@@ -347,8 +351,8 @@ onUnmounted(() => stopPolling())
max-width: 560px; max-width: 560px;
margin: 0; margin: 0;
color: var(--td-text-color-secondary); color: var(--td-text-color-secondary);
font-size: 13px; font-size: 14px;
line-height: 1.65; line-height: 1.6;
text-wrap: pretty; text-wrap: pretty;
} }
} }
@@ -366,7 +370,7 @@ onUnmounted(() => stopPolling())
gap: 7px; gap: 7px;
min-height: 32px; min-height: 32px;
color: var(--td-text-color-secondary); color: var(--td-text-color-secondary);
font-size: 12px; font-size: 13px;
white-space: nowrap; white-space: nowrap;
cursor: pointer; cursor: pointer;
} }
@@ -440,7 +444,7 @@ onUnmounted(() => stopPolling())
span { span {
max-width: 560px; max-width: 560px;
color: var(--td-text-color-secondary); color: var(--td-text-color-secondary);
font-size: 13px; font-size: 14px;
line-height: 1.55; line-height: 1.55;
} }
} }
@@ -467,7 +471,7 @@ onUnmounted(() => stopPolling())
align-items: center; align-items: center;
gap: 9px; gap: 9px;
color: var(--td-text-color-primary); color: var(--td-text-color-primary);
font-size: 13px; font-size: 14px;
font-weight: 600; font-weight: 600;
white-space: nowrap; white-space: nowrap;
} }
@@ -511,7 +515,7 @@ onUnmounted(() => stopPolling())
.rq-metric-label { .rq-metric-label {
color: var(--td-text-color-secondary); color: var(--td-text-color-secondary);
font-size: 11px; font-size: 13px;
line-height: 1.35; line-height: 1.35;
white-space: nowrap; white-space: nowrap;
} }
@@ -530,85 +534,92 @@ onUnmounted(() => stopPolling())
.rq-pools-header { .rq-pools-header {
display: flex; display: flex;
align-items: flex-end; align-items: flex-start;
justify-content: space-between; justify-content: space-between;
gap: 20px; gap: 20px;
margin-bottom: 12px; margin-bottom: 14px;
h3 { h3 {
margin: 0 0 4px; margin: 0 0 6px;
color: var(--td-text-color-primary); color: var(--td-text-color-primary);
font-size: 15px; font-size: 16px;
font-weight: 600; font-weight: 600;
} }
p, p {
> span {
margin: 0; margin: 0;
color: var(--td-text-color-secondary); color: var(--td-text-color-secondary);
font-size: 12px; font-size: 13px;
line-height: 1.5; line-height: 1.55;
}
> span {
flex-shrink: 0;
color: var(--td-text-color-secondary);
font-size: 11px;
} }
} }
.rq-pool-strip { .rq-pools-note {
flex-shrink: 0;
margin-top: 2px;
padding: 4px 10px;
border-radius: 999px;
color: var(--td-text-color-secondary);
font-size: 12px;
line-height: 1.4;
white-space: nowrap;
background: var(--td-bg-color-secondarycontainer);
}
.rq-pool-grid {
display: grid; display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 1px; gap: 12px;
overflow: hidden;
border: 1px solid var(--td-component-stroke);
border-radius: 8px;
background: var(--td-component-stroke);
} }
.rq-pool-item { .rq-pool-card {
display: flex; display: flex;
min-width: 0; min-width: 0;
min-height: 106px;
flex-direction: column; flex-direction: column;
padding: 14px 16px 13px; gap: 8px;
padding: 16px 18px;
border: 1px solid var(--td-component-stroke);
border-radius: 10px;
background: var(--td-bg-color-container); background: var(--td-bg-color-container);
p {
margin: 6px 0 8px;
color: var(--td-text-color-secondary);
font-size: 11px;
line-height: 1.45;
text-wrap: pretty;
}
small {
margin-top: auto;
color: var(--td-text-color-placeholder);
font-size: 10px;
}
} }
.rq-pool-topline { .rq-pool-topline {
display: flex; display: flex;
align-items: baseline; align-items: center;
justify-content: space-between; justify-content: space-between;
gap: 12px; gap: 12px;
}
span { .rq-pool-name {
color: var(--td-text-color-primary); color: var(--td-text-color-primary);
font-size: 12px; font-size: 14px;
font-weight: 500; font-weight: 500;
} line-height: 1.35;
}
strong { .rq-pool-value {
color: var(--td-brand-color); color: var(--td-brand-color);
font-size: 18px; font-size: 22px;
font-weight: 600; font-weight: 600;
letter-spacing: -0.02em; line-height: 1;
font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
} font-variant-numeric: tabular-nums;
}
.rq-pool-desc {
margin: 0;
color: var(--td-text-color-secondary);
font-size: 13px;
line-height: 1.55;
text-wrap: pretty;
}
.rq-pool-meta {
display: block;
margin-top: 4px;
color: var(--td-text-color-placeholder);
font-size: 12px;
line-height: 1.4;
} }
.rq-details { .rq-details {
@@ -617,23 +628,23 @@ onUnmounted(() => stopPolling())
.rq-details-header { .rq-details-header {
display: flex; display: flex;
align-items: flex-end; align-items: flex-start;
justify-content: space-between; justify-content: space-between;
gap: 20px; gap: 20px;
margin-bottom: 13px; margin-bottom: 14px;
h3 { h3 {
margin: 0 0 4px; margin: 0 0 6px;
color: var(--td-text-color-primary); color: var(--td-text-color-primary);
font-size: 15px; font-size: 16px;
font-weight: 600; font-weight: 600;
} }
p { p {
margin: 0; margin: 0;
color: var(--td-text-color-secondary); color: var(--td-text-color-secondary);
font-size: 12px; font-size: 13px;
line-height: 1.5; line-height: 1.55;
} }
} }
@@ -643,7 +654,7 @@ onUnmounted(() => stopPolling())
gap: 5px; gap: 5px;
flex-shrink: 0; flex-shrink: 0;
color: var(--td-text-color-placeholder); color: var(--td-text-color-placeholder);
font-size: 11px; font-size: 12px;
font-variant-numeric: tabular-nums; font-variant-numeric: tabular-nums;
} }
@@ -670,7 +681,7 @@ onUnmounted(() => stopPolling())
.rq-queue-name { .rq-queue-name {
overflow: hidden; overflow: hidden;
color: var(--td-text-color-primary); color: var(--td-text-color-primary);
font-size: 13px; font-size: 14px;
font-weight: 500; font-weight: 500;
line-height: 1.35; line-height: 1.35;
text-overflow: ellipsis; text-overflow: ellipsis;
@@ -679,8 +690,8 @@ onUnmounted(() => stopPolling())
.rq-queue-meta { .rq-queue-meta {
color: var(--td-text-color-placeholder); color: var(--td-text-color-placeholder);
font-size: 10px; font-size: 12px;
line-height: 1.35; line-height: 1.4;
} }
.rq-number, .rq-number,
@@ -712,7 +723,7 @@ onUnmounted(() => stopPolling())
small { small {
color: var(--td-text-color-placeholder); color: var(--td-text-color-placeholder);
font-size: 9px; font-size: 11px;
white-space: nowrap; white-space: nowrap;
} }
} }
@@ -722,7 +733,7 @@ onUnmounted(() => stopPolling())
align-items: center; align-items: center;
gap: 6px; gap: 6px;
color: var(--td-text-color-secondary); color: var(--td-text-color-secondary);
font-size: 11px; font-size: 12px;
white-space: nowrap; white-space: nowrap;
i { i {
@@ -754,18 +765,19 @@ onUnmounted(() => stopPolling())
background-color: var(--td-bg-color-container); background-color: var(--td-bg-color-container);
&:deep(thead th) { &:deep(thead th) {
height: 38px; height: 40px;
color: var(--td-text-color-secondary); color: var(--td-text-color-secondary);
font-size: 11px; font-size: 12px;
font-weight: 500; font-weight: 500;
letter-spacing: 0.01em; letter-spacing: 0.01em;
background-color: var(--td-bg-color-secondarycontainer) !important; background-color: var(--td-bg-color-secondarycontainer) !important;
} }
&:deep(.t-table td) { &:deep(.t-table td) {
height: 54px; height: 56px;
padding-top: 8px; padding-top: 10px;
padding-bottom: 8px; padding-bottom: 10px;
font-size: 14px;
font-variant-numeric: tabular-nums; font-variant-numeric: tabular-nums;
} }
@@ -777,8 +789,8 @@ onUnmounted(() => stopPolling())
.rq-footnote { .rq-footnote {
margin: 12px 0 0; margin: 12px 0 0;
color: var(--td-text-color-placeholder); color: var(--td-text-color-placeholder);
font-size: 11px; font-size: 12px;
line-height: 1.5; line-height: 1.55;
} }
@media (max-width: 860px) { @media (max-width: 860px) {
@@ -808,7 +820,7 @@ onUnmounted(() => stopPolling())
grid-template-columns: repeat(4, minmax(64px, 1fr)); grid-template-columns: repeat(4, minmax(64px, 1fr));
} }
.rq-pool-strip { .rq-pool-grid {
grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-columns: repeat(2, minmax(0, 1fr));
} }
} }
@@ -824,7 +836,7 @@ onUnmounted(() => stopPolling())
gap: 16px; gap: 16px;
} }
.rq-pool-strip { .rq-pool-grid {
grid-template-columns: 1fr; grid-template-columns: 1fr;
} }