mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-21 21:33:18 +01:00
49 lines
1.3 KiB
Vue
49 lines
1.3 KiB
Vue
<template>
|
|
<div class="columns is-marginless has-text-weight-bold is-family-monospace">
|
|
<div class="column is-ellipsis">
|
|
<container-health :health="container.health" v-if="container.health"></container-health>
|
|
<div class="name">
|
|
<span>{{ container.name }}</span
|
|
><span v-if="container.isSwarm" class="swarm-id is-ellipsis">{{ container.swarmId }}</span>
|
|
</div>
|
|
<tag class="is-hidden-mobile">{{ container.image.replace(/@sha.*/, "") }}</tag>
|
|
<span class="icon is-clickable" @click="togglePinnedContainer(container.storageKey)">
|
|
<carbon:star-filled v-if="pinned" />
|
|
<carbon:star v-else />
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { Container } from "@/models/Container";
|
|
import { type ComputedRef } from "vue";
|
|
|
|
const container = inject("container") as ComputedRef<Container>;
|
|
const pinned = computed(() => pinnedContainers.value.has(container.value.storageKey));
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.icon {
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.name {
|
|
display: inline-flex;
|
|
.swarm-id {
|
|
max-width: 1.5em;
|
|
display: inline-block;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
transition: max-width 0.2s ease-in-out;
|
|
will-change: max-width;
|
|
}
|
|
|
|
&:hover {
|
|
.swarm-id {
|
|
max-width: 400px;
|
|
}
|
|
}
|
|
}
|
|
</style>
|