dockge/frontend/src/components/Uptime.vue
Aonodensetsu d92ea2dac9
Added Polski (#132)
* Create pl-PL.json

from https://github.com/louislam/dockge/pull/90 with merged review

* Update pl-PL.json

missed a few and noticed a few things that could be changed

* Add to list

* No overflow text

---------

Co-authored-by: Louis Lam <louislam@users.noreply.github.com>
2023-11-22 00:04:51 +08:00

56 lines
1 KiB
Vue

<template>
<span :class="className">{{ statusName }}</span>
</template>
<script>
import { statusColor, statusNameShort } from "../../../backend/util-common";
export default {
props: {
stack: {
type: Object,
default: null,
},
fixedWidth: {
type: Boolean,
default: false,
},
},
computed: {
uptime() {
return this.$t("notAvailableShort");
},
color() {
return statusColor(this.stack?.status);
},
statusName() {
return this.$t(statusNameShort(this.stack?.status));
},
className() {
let className = `badge rounded-pill bg-${this.color}`;
if (this.fixedWidth) {
className += " fixed-width";
}
return className;
},
},
};
</script>
<style scoped>
.badge {
min-width: 62px;
overflow: hidden;
text-overflow: ellipsis;
}
.fixed-width {
width: 62px;
}
</style>