fix(icons): sync database logos across desktop and website

This commit is contained in:
t8y2 committed 2026-07-29 11:47:27 +08:00
1 parent f2febc9c10
commit 9eab8dceab
41 files changed
+786 -61

No files matched your search

@@ -99,13 +99,10 @@ const assetIcons: Record<string, string> = {
iris: "iris",
influxdb: "influxdb",
zookeeper: "zookeeper",
oscar: "oscar.png",
jdbcx: "jdbcx",
};
const letterIcons: Record<string, { letter: string; color: string }> = {
oscar: { letter: "O", color: "#2563eb" },
};
const normalizedType = computed(() => props.dbType.toLowerCase().replace(/[\s-]+/g, "_"));
const assetName = computed(() => assetIcons[normalizedType.value]);
const assetSrc = computed(() => {
@@ -113,17 +110,10 @@ const assetSrc = computed(() => {
if (normalizedType.value === "uxdb" && isDark.value) return webPath("/icons/database/uxdb-dark.svg");
return webPath(assetName.value.includes(".") ? `/icons/database/${assetName.value}` : `/icons/database/${assetName.value}.svg`);
});
const letter = computed(() => letterIcons[normalizedType.value]);
</script>
<template>
<img v-if="assetName" :src="assetSrc" alt="" class="database-logo object-contain" aria-hidden="true" />
<svg v-else-if="letter" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<circle cx="12" cy="12" r="12" :fill="letter.color" />
<text x="12" y="16.5" text-anchor="middle" fill="white" font-size="14" font-weight="bold" font-family="system-ui, sans-serif">
{{ letter.letter }}
</text>
</svg>
<Database v-else class="text-blue-400" />
</template>