2022-02-08 04:04:45 +00:00
|
|
|
<template>
|
2022-02-12 06:23:07 +00:00
|
|
|
<div :class="{tile: true, alive: appData.healthcheckStatus === true, dead: appData.healthcheckStatus === false}" @click="click">
|
2022-02-15 23:29:57 +00:00
|
|
|
<font-awesome-icon v-if="appData.glyph && !appData.favicon" :icon="appData.glyph" size="2x" />
|
|
|
|
<img :src="favicon" v-if="appData.favicon" width="30" height="30"/>
|
2022-02-08 04:04:45 +00:00
|
|
|
<div class="label">
|
|
|
|
<div class="title">{{appData.appName}}</div>
|
|
|
|
<div class="description">{{appData.description}}</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
props: ["appData"],
|
2022-02-15 23:29:57 +00:00
|
|
|
computed: {
|
|
|
|
favicon() {
|
|
|
|
try {
|
|
|
|
const url = new URL(this.appData.url);
|
2022-02-16 00:02:17 +00:00
|
|
|
return `${url.protocol}//${url.hostname}/favicon.ico`;
|
2022-02-15 23:29:57 +00:00
|
|
|
} catch {
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2022-02-08 04:04:45 +00:00
|
|
|
methods: {
|
|
|
|
click(e) {
|
|
|
|
this.$emit("clicked", e, this.appData);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
2022-02-15 23:29:57 +00:00
|
|
|
<style scoped>
|
2022-02-08 04:04:45 +00:00
|
|
|
.tile {
|
|
|
|
transition: all 0.5s;
|
|
|
|
padding: 16px 25px;
|
|
|
|
border-radius: 5px;
|
|
|
|
margin: 5px;
|
|
|
|
cursor: pointer;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
align-items: flex-start;
|
|
|
|
background: transparent;
|
|
|
|
}
|
|
|
|
.tile:hover {
|
|
|
|
transition: all 0.1s;
|
2022-02-13 02:59:38 +00:00
|
|
|
background-color: rgba(50,50,50, 0.5);
|
2022-02-08 04:04:45 +00:00
|
|
|
box-shadow: rgba(0, 0, 0, 0.5) 0px 20px 30px -10px;
|
|
|
|
}
|
|
|
|
.label {
|
|
|
|
flex: 1;
|
|
|
|
text-align: left;
|
|
|
|
}
|
2022-02-15 23:29:57 +00:00
|
|
|
svg, img {
|
2022-02-08 04:04:45 +00:00
|
|
|
color: #fff;
|
|
|
|
margin-right: 20px;
|
|
|
|
}
|
2022-02-12 06:23:07 +00:00
|
|
|
|
2022-02-15 00:46:49 +00:00
|
|
|
.lightMode svg {
|
|
|
|
color: #444;
|
|
|
|
}
|
|
|
|
|
2022-02-12 06:23:07 +00:00
|
|
|
.tile.alive svg {
|
|
|
|
color: #009900;
|
|
|
|
}
|
2022-02-15 23:29:57 +00:00
|
|
|
.tile.dead svg {
|
2022-02-12 06:23:07 +00:00
|
|
|
color: #900;
|
|
|
|
}
|
2022-02-08 04:04:45 +00:00
|
|
|
.title {
|
|
|
|
color: #fff;
|
|
|
|
font-weight: bold;
|
|
|
|
text-transform: uppercase;
|
|
|
|
line-height: 1;
|
|
|
|
}
|
|
|
|
.description {
|
|
|
|
color: #ccc;
|
|
|
|
font-size: 0.8em;
|
|
|
|
line-height: 1;
|
2022-02-15 23:29:57 +00:00
|
|
|
margin-top: 4px;
|
2022-02-08 04:04:45 +00:00
|
|
|
}
|
2022-02-15 00:46:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
.lightMode .title {
|
|
|
|
color: #000;
|
|
|
|
}
|
|
|
|
.lightMode .description {
|
|
|
|
color: #444;
|
|
|
|
}
|
|
|
|
|
|
|
|
.lightMode .tile:hover {
|
|
|
|
background-color: rgba(200,200,200, 0.5);
|
|
|
|
}
|
2022-02-15 23:29:57 +00:00
|
|
|
.tile.dead {
|
|
|
|
background: rgba(50,0,0,0.4);
|
|
|
|
}
|
2022-02-08 04:04:45 +00:00
|
|
|
</style>
|