1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-24 06:28:42 +01:00

fix: bug when a new container in service mode is created (#2982)

This commit is contained in:
Amir Raminfar
2024-05-24 13:04:50 -07:00
committed by GitHub
parent a089b394e0
commit c268fa4e8b
5 changed files with 62 additions and 97 deletions

View File

@@ -12,8 +12,6 @@ const { id } = defineProps<{
id: string;
}>();
const { containers } = useLoggingContext();
const colors = [
"#4B0082",
"#FF00FF",
@@ -32,10 +30,7 @@ const colors = [
"#FF4040",
] as const;
const color = computed(() => {
const index = containers.value.findIndex((container) => container.id === id);
return colors[index % colors.length];
});
const color = computed(() => colors[Math.abs(hashCode(id)) % colors.length]);
</script>
<style lang="postcss" scoped>