uptime-kuma/src/pages/Dashboard.vue

77 lines
2.1 KiB
Vue
Raw Normal View History

2021-06-25 09:55:49 -04:00
<template>
<div class="container-fluid">
<div class="row">
2022-05-08 14:03:24 -04:00
<div v-if="!$root.isMobile" class="col-12 col-md-5 col-xl-4">
2022-04-30 08:33:54 -04:00
<div class="dropdown dropdown-create">
<button class="btn btn-primary mb-3 dropdown-toggle" type="button" data-bs-toggle="dropdown">
<font-awesome-icon icon="plus" /> {{ $t("Create") }}
</button>
<ul class="dropdown-menu dropdown-menu-end">
<li>
2022-04-30 08:57:08 -04:00
<button type="button" class="dropdown-item" @click="$router.push('/add')">
2022-04-30 08:33:54 -04:00
<font-awesome-icon icon="heartbeat" /> {{ $t("Monitor") }}
</button>
</li>
<li>
2022-04-30 08:57:08 -04:00
<button type="button" class="dropdown-item" @click="$router.push('/addMaintenance')">
2022-05-08 14:03:24 -04:00
<font-awesome-icon icon="wrench" /> {{ $t("Maintenance") }}
2022-04-30 08:33:54 -04:00
</button>
</li>
</ul>
2021-06-25 09:55:49 -04:00
</div>
2021-09-01 13:56:02 -04:00
<MonitorList :scrollbar="true" />
2021-06-25 09:55:49 -04:00
</div>
2021-08-29 14:22:49 -04:00
<div class="col-12 col-md-7 col-xl-8 mb-3">
<!-- Add :key to disable vue router re-use the same component -->
<router-view :key="$route.fullPath" />
2021-06-25 09:55:49 -04:00
</div>
</div>
</div>
</template>
<script>
import MonitorList from "../components/MonitorList.vue";
2021-06-27 04:10:55 -04:00
2021-06-25 09:55:49 -04:00
export default {
components: {
MonitorList,
2021-06-25 09:55:49 -04:00
},
data() {
2022-04-13 12:30:32 -04:00
return {};
2021-06-25 09:55:49 -04:00
},
2022-04-13 12:30:32 -04:00
};
2021-06-25 09:55:49 -04:00
</script>
<style lang="scss" scoped>
2022-05-08 14:03:24 -04:00
@import "../assets/vars.scss";
2021-06-25 09:55:49 -04:00
.container-fluid {
2021-08-24 11:38:25 -04:00
width: 98%;
2021-06-25 09:55:49 -04:00
}
2022-05-08 14:03:24 -04:00
.dropdown-create {
display: flex;
justify-content: end;
}
.dark {
.dropdown-create {
ul {
background-color: $dark-bg;
border-color: $dark-bg2;
border-width: 2px;
li button {
color: $dark-font-color;
}
li button:hover {
background-color: $dark-bg2;
}
}
}
}
2021-06-25 09:55:49 -04:00
</style>