Browse Source

fix: 优化首页样式 (#1709)

pull/1711/head
ssongliu 1 year ago committed by GitHub
parent
commit
1fd31fffd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      frontend/src/views/home/app/index.vue
  2. 106
      frontend/src/views/home/index.vue

5
frontend/src/views/home/app/index.vue

@ -1,6 +1,6 @@
<template>
<div>
<el-scrollbar height="500px" class="moz-height">
<el-scrollbar height="525px" class="moz-height">
<div class="h-app-card" v-for="(app, index) in apps" :key="index">
<el-row :gutter="10">
<el-col :span="5">
@ -88,6 +88,7 @@ defineExpose({
cursor: pointer;
padding: 10px 15px;
margin-right: 10px;
line-height: 18px;
.h-app-content {
padding-left: 15px;
@ -122,7 +123,7 @@ defineExpose({
/* FOR MOZILLA */
@-moz-document url-prefix() {
.moz-height {
height: 499px;
height: 524px;
}
}
</style>

106
frontend/src/views/home/index.vue

@ -126,7 +126,7 @@
<div v-if="chartOption === 'io'" style="margin-top: 40px" class="mobile-monitor-chart">
<v-charts
height="358px"
height="383px"
id="ioChart"
type="line"
:option="chartsOption['ioChart']"
@ -136,7 +136,7 @@
</div>
<div v-if="chartOption === 'network'" style="margin-top: 40px" class="mobile-monitor-chart">
<v-charts
height="358px"
height="383px"
id="networkChart"
type="line"
:option="chartsOption['networkChart']"
@ -151,56 +151,58 @@
<el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="8">
<CardWithHeader :header="$t('home.systemInfo')">
<template #body>
<el-descriptions :column="1" class="h-systemInfo">
<el-descriptions-item class-name="system-content">
<template #label>
<span class="system-label">
{{ $t('home.hostname') }}
</span>
</template>
{{ baseInfo.hostname }}
</el-descriptions-item>
<el-descriptions-item class-name="system-content">
<template #label>
<span class="system-label">
{{ $t('home.platformVersion') }}
</span>
</template>
{{ baseInfo.platform }}-{{ baseInfo.platformVersion }}
</el-descriptions-item>
<el-descriptions-item class-name="system-content">
<template #label>
<span class="system-label">
{{ $t('home.kernelVersion') }}
</span>
</template>
{{ baseInfo.kernelVersion }}
</el-descriptions-item>
<el-descriptions-item class-name="system-content">
<template #label>
<span class="system-label">
{{ $t('home.kernelArch') }}
</span>
</template>
{{ baseInfo.kernelArch }}
</el-descriptions-item>
<el-descriptions-item class-name="system-content">
<template #label>
<span class="system-label">
{{ $t('home.uptime') }}
</span>
</template>
{{ currentInfo.timeSinceUptime }}
</el-descriptions-item>
<el-descriptions-item class-name="system-content">
<template #label>
<span class="system-label">
{{ $t('home.runningTime') }}
</span>
</template>
{{ loadUpTime(currentInfo.uptime) }}
</el-descriptions-item>
</el-descriptions>
<el-scrollbar>
<el-descriptions :column="1" class="h-systemInfo">
<el-descriptions-item class-name="system-content">
<template #label>
<span class="system-label">
{{ $t('home.hostname') }}
</span>
</template>
{{ baseInfo.hostname }}
</el-descriptions-item>
<el-descriptions-item class-name="system-content">
<template #label>
<span class="system-label">
{{ $t('home.platformVersion') }}
</span>
</template>
{{ baseInfo.platform }}-{{ baseInfo.platformVersion }}
</el-descriptions-item>
<el-descriptions-item class-name="system-content">
<template #label>
<span class="system-label">
{{ $t('home.kernelVersion') }}
</span>
</template>
{{ baseInfo.kernelVersion }}
</el-descriptions-item>
<el-descriptions-item class-name="system-content">
<template #label>
<span class="system-label">
{{ $t('home.kernelArch') }}
</span>
</template>
{{ baseInfo.kernelArch }}
</el-descriptions-item>
<el-descriptions-item class-name="system-content">
<template #label>
<span class="system-label">
{{ $t('home.uptime') }}
</span>
</template>
{{ currentInfo.timeSinceUptime }}
</el-descriptions-item>
<el-descriptions-item class-name="system-content">
<template #label>
<span class="system-label">
{{ $t('home.runningTime') }}
</span>
</template>
{{ loadUpTime(currentInfo.uptime) }}
</el-descriptions-item>
</el-descriptions>
</el-scrollbar>
</template>
</CardWithHeader>

Loading…
Cancel
Save