mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-21 21:33:18 +01:00
25 lines
951 B
Vue
25 lines
951 B
Vue
<template>
|
|
<div class="dropdown">
|
|
<button tabindex="0" role="button" class="btn btn-xs md:btn-sm"><slot /> <carbon:caret-down /></button>
|
|
<ul tabindex="0" class="dropdown-content menu rounded-box bg-base-100 shadow-sm">
|
|
<li v-for="other in containers">
|
|
<router-link :to="{ name: '/container/[id]', params: { id: other.id } }" class="text-nowrap">
|
|
<div
|
|
class="status data-[state=exited]:status-error data-[state=running]:status-success"
|
|
:data-state="other.state"
|
|
></div>
|
|
{{ other.name }}
|
|
<div v-if="other.state === 'running'">running</div>
|
|
<DistanceTime :date="other.created" strict class="text-base-content/70 text-xs" v-else />
|
|
</router-link>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</template>
|
|
<script lang="ts" setup>
|
|
import { type Container } from "@/models/Container";
|
|
const { containers } = defineProps<{
|
|
containers: Container[];
|
|
}>();
|
|
</script>
|