uptime-kuma/src/components/CertificateInfo.vue

55 lines
1.1 KiB
Vue
Raw Normal View History

2021-10-01 10:44:32 +00:00
<template>
<div>
<h4>{{ $t("Certificate Info") }}</h4>
{{ $t("Certificate Chain") }}:
2021-10-01 14:43:09 +00:00
<div
v-if="valid"
class="rounded d-inline-flex ms-2 text-white tag-valid"
>
{{ $t("Valid") }}
</div>
<div
v-if="!valid"
class="rounded d-inline-flex ms-2 text-white tag-invalid"
>
{{ $t("Invalid") }}
</div>
2021-10-01 10:44:32 +00:00
<certificate-info-row :cert="certInfo" />
</div>
</template>
<script>
import CertificateInfoRow from "./CertificateInfoRow.vue";
export default {
components: {
CertificateInfoRow,
},
props: {
/** Object representing certificate */
2021-10-01 10:44:32 +00:00
certInfo: {
type: Object,
required: true,
},
/** Is the TLS certificate valid? */
2021-10-01 10:44:32 +00:00
valid: {
type: Boolean,
required: true,
},
},
};
</script>
2021-10-01 14:43:09 +00:00
<style lang="scss" scoped>
@import "../assets/vars.scss";
.tag-valid {
padding: 2px 25px;
background-color: $primary;
}
.tag-invalid {
padding: 2px 25px;
background-color: $danger;
}
</style>