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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user