mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-21 13:23:07 +01:00
chore: css clean up (#2988)
This commit is contained in:
@@ -44,19 +44,20 @@
|
|||||||
</summary>
|
</summary>
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="item in containers" :class="item.state" :key="item.id">
|
<li v-for="item in containers" :class="item.state" :key="item.id">
|
||||||
<popup>
|
<Popup>
|
||||||
<router-link
|
<router-link
|
||||||
:to="{ name: 'container-id', params: { id: item.id } }"
|
:to="{ name: 'container-id', params: { id: item.id } }"
|
||||||
active-class="active-primary"
|
active-class="active-primary"
|
||||||
@click.alt.stop.prevent="pinnedStore.pinContainer(item)"
|
@click.alt.stop.prevent="pinnedStore.pinContainer(item)"
|
||||||
:title="item.name"
|
:title="item.name"
|
||||||
|
class="group auto-cols-[auto_max-content_max-content]"
|
||||||
>
|
>
|
||||||
<div class="truncate">
|
<div class="truncate">
|
||||||
{{ item.name }}<span class="font-light opacity-70" v-if="item.isSwarm">.{{ item.swarmId }}</span>
|
{{ item.name }}<span class="font-light opacity-70" v-if="item.isSwarm">.{{ item.swarmId }}</span>
|
||||||
</div>
|
</div>
|
||||||
<ContainerHealth :health="item.health" />
|
<ContainerHealth :health="item.health" />
|
||||||
<span
|
<span
|
||||||
class="pin"
|
class="hidden hover:text-secondary group-hover:inline-block"
|
||||||
@click.stop.prevent="pinnedStore.pinContainer(item)"
|
@click.stop.prevent="pinnedStore.pinContainer(item)"
|
||||||
v-show="!pinnedStore.isPinned(item)"
|
v-show="!pinnedStore.isPinned(item)"
|
||||||
:title="$t('tooltip.pin-column')"
|
:title="$t('tooltip.pin-column')"
|
||||||
@@ -67,7 +68,7 @@
|
|||||||
<template #content>
|
<template #content>
|
||||||
<ContainerPopup :container="item" />
|
<ContainerPopup :container="item" />
|
||||||
</template>
|
</template>
|
||||||
</popup>
|
</Popup>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</details>
|
</details>
|
||||||
@@ -168,22 +169,7 @@ const menuItems = computed(() => {
|
|||||||
.menu {
|
.menu {
|
||||||
@apply text-[0.95rem];
|
@apply text-[0.95rem];
|
||||||
}
|
}
|
||||||
.containers a {
|
|
||||||
@apply auto-cols-[auto_max-content_max-content];
|
|
||||||
.pin {
|
|
||||||
display: none;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
@apply text-secondary;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
.pin {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
li.exited {
|
li.exited {
|
||||||
@apply opacity-50;
|
@apply opacity-50;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="relative block w-40 overflow-hidden rounded px-1.5 text-center text-sm text-white">
|
<div class="grid w-40 overflow-hidden rounded text-center text-sm text-white">
|
||||||
<div class="random-color absolute inset-0 brightness-75"></div>
|
<div class="random-color col-start-1 row-start-1 brightness-75"></div>
|
||||||
<div class="direction-rtl relative truncate">{{ containerNames[id] }}</div>
|
<div class="col-start-1 row-start-1 truncate px-2 brightness-100 [direction:rtl]">{{ containerNames[id] }}</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts">
|
||||||
const containerStore = useContainerStore();
|
|
||||||
const { containerNames } = storeToRefs(containerStore);
|
|
||||||
|
|
||||||
const { id } = defineProps<{
|
|
||||||
id: string;
|
|
||||||
}>();
|
|
||||||
|
|
||||||
const colors = [
|
const colors = [
|
||||||
"#4B0082",
|
"#4B0082",
|
||||||
"#FF00FF",
|
"#FF00FF",
|
||||||
@@ -29,6 +22,14 @@ const colors = [
|
|||||||
"#FFD700",
|
"#FFD700",
|
||||||
"#FF4040",
|
"#FF4040",
|
||||||
] as const;
|
] as const;
|
||||||
|
</script>
|
||||||
|
<script lang="ts" setup>
|
||||||
|
const containerStore = useContainerStore();
|
||||||
|
const { containerNames } = storeToRefs(containerStore);
|
||||||
|
|
||||||
|
const { id } = defineProps<{
|
||||||
|
id: string;
|
||||||
|
}>();
|
||||||
|
|
||||||
const color = computed(() => colors[Math.abs(hashCode(id)) % colors.length]);
|
const color = computed(() => colors[Math.abs(hashCode(id)) % colors.length]);
|
||||||
</script>
|
</script>
|
||||||
@@ -37,8 +38,4 @@ const color = computed(() => colors[Math.abs(hashCode(id)) % colors.length]);
|
|||||||
.random-color {
|
.random-color {
|
||||||
background-color: v-bind(color);
|
background-color: v-bind(color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.direction-rtl {
|
|
||||||
direction: rtl;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -16,11 +16,10 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { globalShowPopup } from "@/composable/popup";
|
import { globalShowPopup } from "@/composable/popup";
|
||||||
|
|
||||||
let glopbalShow = globalShowPopup();
|
const glopbalShow = globalShowPopup();
|
||||||
let show = ref(glopbalShow.value);
|
const show = ref(glopbalShow.value);
|
||||||
let delayedShow = refDebounced(show, 1000);
|
const delayedShow = refDebounced(show, 1000);
|
||||||
|
const content = ref<HTMLElement>();
|
||||||
let content = ref<HTMLElement>();
|
|
||||||
|
|
||||||
const onMouseEnter = (e: Event) => {
|
const onMouseEnter = (e: Event) => {
|
||||||
show.value = true;
|
show.value = true;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<button class="btn relative overflow-hidden" @click="cancel()">
|
<button class="btn relative overflow-hidden" @click="cancel()">
|
||||||
<div class="absolute inset-0 origin-left bg-white/30" ref="progress"></div>
|
<div class="absolute inset-0 origin-left bg-white/30" ref="progress"></div>
|
||||||
<div class="z-10">
|
<div>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
@@ -13,9 +13,13 @@ const finished = defineEmit();
|
|||||||
const cancelled = defineEmit();
|
const cancelled = defineEmit();
|
||||||
let animation: Animation | undefined;
|
let animation: Animation | undefined;
|
||||||
|
|
||||||
|
const { duration = 4000 } = defineProps<{
|
||||||
|
duration?: number;
|
||||||
|
}>();
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
animation = progress.value?.animate([{ transform: "scaleX(0)" }, { transform: "scaleX(1)" }], {
|
animation = progress.value?.animate([{ transform: "scaleX(0)" }, { transform: "scaleX(1)" }], {
|
||||||
duration: 4000,
|
duration: duration,
|
||||||
easing: "linear",
|
easing: "linear",
|
||||||
fill: "forwards",
|
fill: "forwards",
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user