mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-23 05:05:29 -04:00
many update again
This commit is contained in:
parent
9fa84a0a2b
commit
46f07fc17e
9 changed files with 345 additions and 45 deletions
39
src/components/Status.vue
Normal file
39
src/components/Status.vue
Normal file
|
@ -0,0 +1,39 @@
|
|||
<template>
|
||||
<span class="badge rounded-pill" :class=" 'bg-' + color ">{{ text }}</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
status: Number
|
||||
},
|
||||
|
||||
computed: {
|
||||
color() {
|
||||
if (this.status === 0) {
|
||||
return "danger"
|
||||
} else if (this.status === 1) {
|
||||
return "primary"
|
||||
} else {
|
||||
return "secondary"
|
||||
}
|
||||
},
|
||||
|
||||
text() {
|
||||
if (this.status === 0) {
|
||||
return "Down"
|
||||
} else if (this.status === 1) {
|
||||
return "Up"
|
||||
} else {
|
||||
return "Unknown"
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
span {
|
||||
width: 45px;
|
||||
}
|
||||
</style>
|
Loading…
Add table
Add a link
Reference in a new issue