mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-03 03:56:18 -04:00
improve monitor list
This commit is contained in:
parent
e644a1e36f
commit
3ad736692f
7 changed files with 34 additions and 32 deletions
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="shadow-box list mb-4">
|
||||
<div class="shadow-box list mb-3" :class="{ scrollbar: scrollbar }">
|
||||
<div v-if="Object.keys($root.monitorList).length === 0" class="text-center mt-3">
|
||||
{{ $t("No Monitors, please") }} <router-link to="/add">{{ $t("add one") }}</router-link>
|
||||
</div>
|
||||
|
@ -34,6 +34,11 @@ export default {
|
|||
Uptime,
|
||||
HeartbeatBar,
|
||||
},
|
||||
props: {
|
||||
scrollbar: {
|
||||
type: Boolean,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
sortedMonitorList() {
|
||||
let result = Object.values(this.$root.monitorList);
|
||||
|
@ -83,8 +88,12 @@ export default {
|
|||
}
|
||||
|
||||
.list {
|
||||
height: auto;
|
||||
min-height: calc(100vh - 240px);
|
||||
&.scrollbar {
|
||||
height: calc(100vh - 20px);
|
||||
overflow-y: scroll;
|
||||
position: sticky;
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
.item {
|
||||
display: block;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue