fix: 修改移动端样式 (#6440)

pull/6441/head
ssongliu 3 months ago committed by GitHub
parent 48281ddf86
commit f88a3059be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -151,12 +151,12 @@ func (u *DashboardService) LoadCurrentInfo(ioOption string, netOption string) *d
currentInfo.Procs = hostInfo.Procs currentInfo.Procs = hostInfo.Procs
currentInfo.CPUTotal, _ = cpu.Counts(true) currentInfo.CPUTotal, _ = cpu.Counts(true)
totalPercent, _ := cpu.Percent(1*time.Second, false) totalPercent, _ := cpu.Percent(100*time.Millisecond, false)
if len(totalPercent) == 1 { if len(totalPercent) == 1 {
currentInfo.CPUUsedPercent = totalPercent[0] currentInfo.CPUUsedPercent = totalPercent[0]
currentInfo.CPUUsed = currentInfo.CPUUsedPercent * 0.01 * float64(currentInfo.CPUTotal) currentInfo.CPUUsed = currentInfo.CPUUsedPercent * 0.01 * float64(currentInfo.CPUTotal)
} }
currentInfo.CPUPercent, _ = cpu.Percent(1*time.Second, true) currentInfo.CPUPercent, _ = cpu.Percent(100*time.Millisecond, true)
loadInfo, _ := load.Avg() loadInfo, _ := load.Avg()
currentInfo.Load1 = loadInfo.Load1 currentInfo.Load1 = loadInfo.Load1

@ -444,6 +444,12 @@ html {
cursor: pointer; cursor: pointer;
} }
.dialog-footer{
display: flex;
align-items: center;
justify-content: flex-end;
}
.monaco-editor-tree-light .el-tree-node__content:hover { .monaco-editor-tree-light .el-tree-node__content:hover {
background-color: #e5eefd; background-color: #e5eefd;
} }

@ -25,28 +25,17 @@
</el-alert> </el-alert>
</template> </template>
<template #toolbar> <template #toolbar>
<div class="hidden sm:block sm:flex sm:flex-row sm:w-full sm:justify-between"> <div class="flex justify-between gap-2 flex-wrap sm:flex-row">
<div> <div class="flex flex-wrap gap-3">
<el-button type="primary" @click="onOpenDialog()"> <el-button type="primary" @click="onOpenDialog()">
{{ $t('container.createCompose') }} {{ $t('container.createCompose') }}
</el-button> </el-button>
</div> </div>
<div class="flex flex-row gap-2"> <div class="flex flex-wrap gap-3">
<TableSetting @search="search()" /> <TableSetting @search="search()" />
<TableSearch @search="search()" v-model:searchName="searchName" /> <TableSearch @search="search()" v-model:searchName="searchName" />
</div> </div>
</div> </div>
<div class="block flex flex-col gap-2 sm:hidden">
<div class="flex justify-between">
<el-button type="primary" @click="onOpenDialog()">
{{ $t('container.createCompose') }}
</el-button>
<TableSetting @search="search()" />
</div>
<div class="flex justify-end">
<TableSearch @search="search()" v-model:searchName="searchName" />
</div>
</div>
</template> </template>
<template #main> <template #main>
<ComplexTable <ComplexTable

@ -45,9 +45,3 @@ const buttons = [
}, },
]; ];
</script> </script>
<style>
.el-button + .el-button {
margin: 0;
}
</style>

@ -8,24 +8,13 @@
<LayoutContent :title="$t('container.repo')" :class="{ mask: dockerStatus != 'Running' }"> <LayoutContent :title="$t('container.repo')" :class="{ mask: dockerStatus != 'Running' }">
<template #toolbar> <template #toolbar>
<div class="block flex flex-col gap-2 sm:hidden"> <div class="flex justify-between gap-2 flex-wrap sm:flex-row">
<div class="flex flex-row justify-between"> <div class="flex flex-wrap gap-3">
<el-button type="primary" @click="onOpenDialog('add')">
{{ $t('container.createRepo') }}
</el-button>
<TableSetting @search="search()" />
</div>
<div class="flex flex-row justify-end">
<TableSearch @search="search()" v-model:searchName="searchName" />
</div>
</div>
<div class="hidden sm:block sm:flex sm:justify-between">
<div>
<el-button type="primary" @click="onOpenDialog('add')"> <el-button type="primary" @click="onOpenDialog('add')">
{{ $t('container.createRepo') }} {{ $t('container.createRepo') }}
</el-button> </el-button>
</div> </div>
<div class="flex flex-row gap-2"> <div class="flex flex-wrap gap-3">
<TableSetting @search="search()" /> <TableSetting @search="search()" />
<TableSearch @search="search()" v-model:searchName="searchName" /> <TableSearch @search="search()" v-model:searchName="searchName" />
</div> </div>

@ -5,11 +5,16 @@
<back-button name="MySQL" :header="$t('database.remoteDB')" /> <back-button name="MySQL" :header="$t('database.remoteDB')" />
</template> </template>
<template #toolbar> <template #toolbar>
<el-button type="primary" @click="onOpenDialog('create')"> <div class="flex justify-between gap-2 flex-wrap sm:flex-row">
{{ $t('database.createRemoteDB') }} <div class="flex flex-wrap gap-3">
</el-button> <el-button type="primary" @click="onOpenDialog('create')">
{{ $t('database.createRemoteDB') }}
<TableSearch @search="search()" v-model:searchName="searchName" /> </el-button>
</div>
<div class="flex flex-wrap gap-3">
<TableSearch @search="search()" v-model:searchName="searchName" />
</div>
</div>
</template> </template>
<template #main> <template #main>
<ComplexTable :pagination-config="paginationConfig" @sort-change="search" @search="search" :data="data"> <ComplexTable :pagination-config="paginationConfig" @sort-change="search" @search="search" :data="data">

@ -5,11 +5,16 @@
<back-button name="PostgreSQL" :header="$t('database.remoteDB')" /> <back-button name="PostgreSQL" :header="$t('database.remoteDB')" />
</template> </template>
<template #toolbar> <template #toolbar>
<el-button type="primary" @click="onOpenDialog('create')"> <div class="flex justify-between gap-2 flex-wrap sm:flex-row">
{{ $t('database.createRemoteDB') }} <div class="flex flex-wrap gap-3">
</el-button> <el-button type="primary" @click="onOpenDialog('create')">
{{ $t('database.createRemoteDB') }}
<TableSearch @search="search()" v-model:searchName="searchName" /> </el-button>
</div>
<div class="flex flex-wrap gap-3">
<TableSearch @search="search()" v-model:searchName="searchName" />
</div>
</div>
</template> </template>
<template #main> <template #main>
<ComplexTable :pagination-config="paginationConfig" @sort-change="search" @search="search" :data="data"> <ComplexTable :pagination-config="paginationConfig" @sort-change="search" @search="search" :data="data">

@ -51,12 +51,16 @@
</el-select> </el-select>
</template> </template>
<template #toolbar v-if="!isOnSetting"> <template #toolbar v-if="!isOnSetting">
<el-button v-if="currentDB" type="primary" plain @click="onLoadConn"> <div class="flex justify-between gap-2 flex-wrap sm:flex-row">
{{ $t('database.databaseConnInfo') }} <div class="flex flex-wrap gap-3">
</el-button> <el-button v-if="currentDB" type="primary" plain @click="onLoadConn">
<el-button @click="goRemoteDB" type="primary" plain> {{ $t('database.databaseConnInfo') }}
{{ $t('database.remoteDB') }} </el-button>
</el-button> <el-button @click="goRemoteDB" type="primary" plain>
{{ $t('database.remoteDB') }}
</el-button>
</div>
</div>
</template> </template>
</LayoutContent> </LayoutContent>

@ -5,16 +5,16 @@
<back-button name="Redis" :header="$t('database.remoteDB')" /> <back-button name="Redis" :header="$t('database.remoteDB')" />
</template> </template>
<template #toolbar> <template #toolbar>
<el-row> <div class="flex justify-between gap-2 flex-wrap sm:flex-row">
<el-col :xs="24" :sm="20" :md="20" :lg="20" :xl="20"> <div class="flex flex-wrap gap-3">
<el-button type="primary" @click="onOpenDialog('create')"> <el-button type="primary" @click="onOpenDialog('create')">
{{ $t('database.createRemoteDB') }} {{ $t('database.createRemoteDB') }}
</el-button> </el-button>
</el-col> </div>
<el-col :xs="24" :sm="4" :md="4" :lg="4" :xl="4"> <div class="flex flex-wrap gap-3">
<TableSearch @search="search()" v-model:searchName="searchName" /> <TableSearch @search="search()" v-model:searchName="searchName" />
</el-col> </div>
</el-row> </div>
</template> </template>
<template #main> <template #main>
<ComplexTable :pagination-config="paginationConfig" @sort-change="search" @search="search" :data="data"> <ComplexTable :pagination-config="paginationConfig" @sort-change="search" @search="search" :data="data">

@ -5,15 +5,19 @@
<el-alert type="info" :title="$t('terminal.quickCommandHelper')" :closable="false" /> <el-alert type="info" :title="$t('terminal.quickCommandHelper')" :closable="false" />
</template> </template>
<template #toolbar> <template #toolbar>
<el-button type="primary" @click="onCreate()"> <div class="flex w-full flex-col gap-4 md:justify-between md:flex-row">
{{ $t('commons.button.create') }} {{ $t('terminal.quickCommand') }} <div class="flex flex-wrap gap-4">
</el-button> <el-button type="primary" @click="onCreate()">
<el-button type="primary" plain @click="onOpenGroupDialog()"> {{ $t('commons.button.create') }} {{ $t('terminal.quickCommand') }}
{{ $t('terminal.group') }} </el-button>
</el-button> <el-button type="primary" plain @click="onOpenGroupDialog()">
<el-button type="primary" plain :disabled="selects.length === 0" @click="batchDelete(null)"> {{ $t('terminal.group') }}
{{ $t('commons.button.delete') }} </el-button>
</el-button> <el-button type="primary" plain :disabled="selects.length === 0" @click="batchDelete(null)">
{{ $t('commons.button.delete') }}
</el-button>
</div>
</div>
</template> </template>
<template #search> <template #search>
<el-row :gutter="5"> <el-row :gutter="5">

@ -2,8 +2,8 @@
<div> <div>
<LayoutContent v-loading="loading" :title="$t('terminal.host')"> <LayoutContent v-loading="loading" :title="$t('terminal.host')">
<template #toolbar> <template #toolbar>
<el-row> <div class="flex w-full flex-col gap-4 md:justify-between md:flex-row">
<el-col :span="20"> <div class="flex flex-wrap gap-4">
<el-button type="primary" @click="onOpenDialog('create')"> <el-button type="primary" @click="onOpenDialog('create')">
{{ $t('terminal.addHost') }} {{ $t('terminal.addHost') }}
</el-button> </el-button>
@ -13,11 +13,11 @@
<el-button type="primary" plain :disabled="selects.length === 0" @click="onBatchDelete(null)"> <el-button type="primary" plain :disabled="selects.length === 0" @click="onBatchDelete(null)">
{{ $t('commons.button.delete') }} {{ $t('commons.button.delete') }}
</el-button> </el-button>
</el-col> </div>
<el-col :span="4"> <div class="flex flex-wrap gap-3">
<TableSearch @search="search()" v-model:searchName="info" /> <TableSearch @search="search()" v-model:searchName="info" />
</el-col> </div>
</el-row> </div>
</template> </template>
<template #search> <template #search>
<el-select v-model="group" @change="search()" clearable class="p-w-200"> <el-select v-model="group" @change="search()" clearable class="p-w-200">

@ -2,8 +2,8 @@
<div> <div>
<LayoutContent v-loading="loading" :title="$t('logs.login')"> <LayoutContent v-loading="loading" :title="$t('logs.login')">
<template #toolbar> <template #toolbar>
<el-row> <div class="flex justify-between gap-2 flex-wrap sm:flex-row">
<el-col :xs="24" :sm="16" :md="16" :lg="16" :xl="16"> <div class="flex flex-wrap gap-3">
<el-button class="tag-button no-active" @click="onChangeRoute('OperationLog')"> <el-button class="tag-button no-active" @click="onChangeRoute('OperationLog')">
{{ $t('logs.operation') }} {{ $t('logs.operation') }}
</el-button> </el-button>
@ -13,14 +13,12 @@
<el-button class="tag-button no-active" @click="onChangeRoute('SystemLog')"> <el-button class="tag-button no-active" @click="onChangeRoute('SystemLog')">
{{ $t('logs.system') }} {{ $t('logs.system') }}
</el-button> </el-button>
</el-col> </div>
<el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8"> <div class="flex flex-wrap gap-3">
<div class="flex justify-end"> <TableSetting @search="search()" />
<TableSetting @search="search()" /> <TableSearch @search="search()" v-model:searchName="searchIP" />
<TableSearch @search="search()" v-model:searchName="searchIP" /> </div>
</div> </div>
</el-col>
</el-row>
</template> </template>
<template #search> <template #search>

@ -28,8 +28,8 @@
<div v-if="form.isExist"> <div v-if="form.isExist">
<LayoutContent v-loading="loading" title="FTP"> <LayoutContent v-loading="loading" title="FTP">
<template #toolbar> <template #toolbar>
<el-row> <div class="flex justify-between gap-2 flex-wrap sm:flex-row">
<el-col :xs="24" :sm="16" :md="16" :lg="16" :xl="16"> <div class="flex flex-wrap gap-3">
<el-button type="primary" :disabled="!form.isActive" @click="onOpenDialog('add')"> <el-button type="primary" :disabled="!form.isActive" @click="onOpenDialog('add')">
{{ $t('commons.button.add') }} FTP {{ $t('commons.button.add') }} FTP
</el-button> </el-button>
@ -39,11 +39,11 @@
<el-button plain :disabled="selects.length === 0 || !form.isActive" @click="onDelete(null)"> <el-button plain :disabled="selects.length === 0 || !form.isActive" @click="onDelete(null)">
{{ $t('commons.button.delete') }} {{ $t('commons.button.delete') }}
</el-button> </el-button>
</el-col> </div>
<el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8"> <div class="flex flex-wrap gap-3">
<TableSearch @search="search()" v-model:searchName="searchName" /> <TableSearch @search="search()" v-model:searchName="searchName" />
</el-col> </div>
</el-row> </div>
</template> </template>
<template #main> <template #main>
<ComplexTable <ComplexTable

Loading…
Cancel
Save