🐛 fix(database-icons): 替换数据源官方图标并修正透明底展示

- 为 OceanBase、GaussDB、GoldenDB、Kafka、RocketMQ 等数据源替换官方品牌资源
- 扩展 DatabaseIcons 对 svg/png/ico 的统一加载与底色边框控制
- 补充图标资源断言测试并移除未使用的字母块 fallback
This commit is contained in:
Syngnat
2026-06-14 14:43:03 +08:00
parent cd6d034d6c
commit 6bbe5ad30d
25 changed files with 339 additions and 221 deletions

View File

@@ -1,7 +1 @@
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<title>Chroma</title>
<circle cx="8.5" cy="12" r="4.3" fill="#7C3AED" opacity="0.96"/>
<circle cx="14.7" cy="8.7" r="4" fill="#EC4899" opacity="0.88"/>
<circle cx="14.7" cy="15.3" r="4" fill="#22C55E" opacity="0.88"/>
<circle cx="11.8" cy="12" r="2.2" fill="#FFFFFF"/>
</svg>
<svg width="163" height="40" fill="none" xmlns="http://www.w3.org/2000/svg"><mask id="prefix__a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="2" width="53" height="36"><path d="M52.503 2.501H.003v35h52.5v-35z" fill="#fff"/></mask><g mask="url(#prefix__a)"><path d="M17.503 2.501c-9.665 0-17.5 7.835-17.5 17.5s7.835 17.5 17.5 17.5 17.5-7.835 17.5-17.5-7.835-17.5-17.5-17.5z" fill="#327EFF"/><path d="M35.003 2.501c-9.665 0-17.5 7.835-17.5 17.5s7.835 17.5 17.5 17.5 17.5-7.834 17.5-17.5c0-9.665-7.835-17.5-17.5-17.5z" fill="#FFDE2D"/><path d="M17.503 20.002c0-9.665 7.835-17.5 17.5-17.5v17.5h-17.5z" fill="#FF6446"/><path d="M35.003 20.001c0 9.665-7.835 17.5-17.5 17.5v-17.5h17.5z" fill="#FF6446"/></g><path d="M68.543 30.45c-6.03 0-10.32-4.65-10.32-11.1 0-6.36 3.96-11.22 10.29-11.22 5.28 0 8.4 3.15 8.85 7.23h-4.32c-.39-2.16-2.01-3.57-4.53-3.57-3.96 0-5.85 3.3-5.85 7.56 0 4.38 2.28 7.53 5.88 7.53 2.55 0 4.35-1.53 4.62-3.78h4.26a7.596 7.596 0 01-2.37 5.07c-1.47 1.38-3.54 2.28-6.51 2.28zM83.41 8.55v8.07h.09c1.11-1.62 2.37-2.43 4.47-2.43 3.18 0 5.31 2.4 5.31 5.76V30H89.2v-9.45c0-1.65-.96-2.82-2.67-2.82-1.8 0-3.12 1.44-3.12 3.54V30h-4.08V8.55h4.08zm16.315 6.06v2.46h.09c.93-1.74 1.98-2.64 3.78-2.64.45 0 .72.03.96.12v3.57h-.09c-2.67-.27-4.59 1.14-4.59 4.38V30h-4.08V14.61h3.93zm13.438 15.84c-4.77 0-8.04-3.54-8.04-8.13 0-4.59 3.27-8.13 8.04-8.13s8.04 3.54 8.04 8.13c0 4.59-3.27 8.13-8.04 8.13zm0-3.12c2.49 0 3.9-2.01 3.9-5.01s-1.41-5.04-3.9-5.04c-2.52 0-3.9 2.04-3.9 5.04s1.38 5.01 3.9 5.01zM123.1 30V14.61h3.93v2.07h.09c.84-1.41 2.34-2.49 4.47-2.49 1.95 0 3.51 1.08 4.26 2.7h.06c1.05-1.68 2.67-2.7 4.62-2.7 3.24 0 5.07 2.1 5.07 5.46V30h-4.08v-9.66c0-1.74-.87-2.64-2.37-2.64-1.71 0-2.76 1.32-2.76 3.36V30h-4.08v-9.66c0-1.74-.87-2.64-2.37-2.64-1.65 0-2.76 1.32-2.76 3.36V30h-4.08zm34.71 0c-.24-.3-.39-1.02-.48-1.71h-.06c-.78 1.17-1.89 2.07-4.53 2.07-3.15 0-5.37-1.65-5.37-4.71 0-3.39 2.76-4.47 6.18-4.95 2.55-.36 3.72-.57 3.72-1.74 0-1.11-.87-1.83-2.58-1.83-1.92 0-2.85.69-2.97 2.16h-3.63c.12-2.7 2.13-5.07 6.629-5.07 4.621 0 6.481 2.07 6.481 5.67v7.83c0 1.17.18 1.86.54 2.13V30h-3.93zm-4.08-2.49c2.34 0 3.63-1.44 3.63-2.94v-2.31c-.72.42-1.83.66-2.851.9-2.129.48-3.179.96-3.179 2.4s.96 1.95 2.4 1.95z" fill="#000"/></svg>

Before

Width:  |  Height:  |  Size: 358 B

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View File

@@ -1,7 +0,0 @@
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<title>GaussDB</title>
<circle cx="12" cy="12" r="2.2" fill="#0B7FAB"/>
<ellipse cx="12" cy="12" rx="7.2" ry="4.8" fill="none" stroke="#0B7FAB" stroke-width="2"/>
<ellipse cx="12" cy="12" rx="7.2" ry="4.8" fill="none" stroke="#38BDF8" stroke-width="2" opacity="0.9" transform="rotate(60 12 12)"/>
<circle cx="18.6" cy="10.1" r="1.6" fill="#38BDF8"/>
</svg>

Before

Width:  |  Height:  |  Size: 439 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@@ -1,6 +0,0 @@
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<title>GoldenDB</title>
<path d="M5 15.8 12 5l7 10.8H5Z" fill="#F59E0B"/>
<path d="M7.3 14.2 12 7.2l4.7 7H7.3Z" fill="#FCD34D"/>
<rect x="6" y="16.6" width="12" height="2.4" rx="1.2" fill="#B45309"/>
</svg>

Before

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -1,7 +1,57 @@
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<title>Apache IoTDB</title>
<ellipse cx="12" cy="6.1" rx="5.8" ry="2.6" fill="#14B8A6"/>
<path d="M6.2 6.1v8.2c0 1.5 2.6 2.7 5.8 2.7s5.8-1.2 5.8-2.7V6.1" fill="#0F766E"/>
<ellipse cx="12" cy="14.3" rx="5.8" ry="2.6" fill="#14B8A6"/>
<path d="M7.4 11.6h2.1l1.3-2.1 2.1 3.9 1.3-1.8h2.4" fill="none" stroke="#FFFFFF" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1"
id="Õ_xBA__x2264__x201E__1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 107.7 107.7"
style="enable-background:new 0 0 107.7 107.7;" xml:space="preserve">
<style type="text/css">
.st0{fill-rule:evenodd;clip-rule:evenodd;fill:#9E2878;}
</style>
<g>
<g id="g1133" transform="translate(-244.51235,-228.78793)">
<path id="path1119" class="st0" d="M340.8,253.8c2.6-1,5.5,0.4,6.2,3c0.7,2.6-1.1,5.7-3.7,6.4c-3.2,0.6-6.2-1.4-9.3,0.2
c-3.1,1.7-4,5.2-4.7,8.3c-1.4,5-8.5,7.3-12.1,4.2c-3.3-2.4-3.4-7.8-0.2-11c2.2-2.5,5.9-3.3,8.8-2c2.7,1.2,6,1.7,8.6-0.4
C337.5,260.1,336.7,255.1,340.8,253.8L340.8,253.8z"/>
<path id="path1121" class="st0" d="M280.5,244.7c4.2-2.2,9.5,1.5,8.2,6.1c-1.4,5.4-0.7,11.5,2.9,15.5c3.4,4,9.8,4.8,14.6,1.9
c3.7-2.1,6-5.8,7.4-9.6c1-3.1,0.6-6.2,1.1-9.3c1-3.8,5.8-6,9.1-4.2c3.2,1.4,4,5.9,1.7,8.8c-1.4,2.2-4.2,2.7-6.3,3.8
c-3.6,1.9-6.5,4.9-8.4,8.6c-1.2,2.1-1.1,4.5-1.7,6.7c-0.9,1.9-3,2.7-4.8,2.9c-4.8,0.6-9.5,3-13,6.7c-1.7,1.7-3.1,4.2-5.6,4.2
c-2.7-0.2-4.7-2.6-7.4-2.7c-4.9-0.7-10.2,0.7-14.4,4c-3.7,3.1-9.4,0.8-9.6-3.7c-0.9-5.1,6.2-9.5,10.1-6.2c4.3,4,10.8,5.6,16.9,3.7
c5.6-1.9,9.7-8.3,8.6-14c-0.9-4.9-4.2-9.3-8.6-11.4c-1.7-0.8-3.6-1.6-4.2-3.5C275.6,250.2,277.3,246.2,280.5,244.7L280.5,244.7z"
/>
<path id="path1123" class="st0" d="M277.8,235.9c2.2-0.8,4.2,1.3,3.3,3.4c-0.6,2.1-3.7,2.7-4.8,1.1
C275,238.9,276,236.4,277.8,235.9z"/>
<path id="path1125" class="st0" d="M246.9,278.8c2.2-0.8,4.2,1.2,3.3,3.4c-0.6,2.1-3.7,2.7-4.8,1C244,281.9,245,279.3,246.9,278.8
L246.9,278.8z"/>
<path id="path1127" class="st0" d="M328.2,236.2c2.2-0.7,4.2,1.3,3.3,3.5c-0.6,2-3.7,2.7-4.8,1
C325.4,239.2,326.3,236.8,328.2,236.2z"/>
<path id="path1129" class="st0" d="M253.6,257.7c0.4-3.7,5.5-5.9,8.1-3.6c1.9,1.1,1.6,3.6,2.2,5.4c0.4,2.4,2.7,4.3,5.2,4.3
c3.2,0.3,6.4-2.3,9.5-1.2c4.8,1.2,6.5,7.5,3.2,11.5c-2.9,4.1-9.3,4.5-12,0.7c-2.4-2.8-0.5-7.1-2.7-10.1c-1.7-2.9-5.4-2.7-8.3-1.9
C255.8,263.8,253,260.7,253.6,257.7L253.6,257.7z"/>
<path id="path1131" class="st0" d="M300.8,230c3.3-1.9,7.5,0.9,6.7,4.6c0,2.3-2.2,3.6-3.5,5.2c-1.9,1.9-2.3,4.9-1.2,7
c1.3,2.9,4.9,4,5.5,7.2c1.2,4.8-3.3,10.1-8.2,9.8c-4.8,0.1-8.3-5-6.3-9.5c1.2-3.8,5.8-4.9,7.2-8.5c1.7-3.2-0.4-6.1-2.4-8.1
C296.7,235.6,297.9,231.4,300.8,230z"/>
</g>
<g id="g1149" transform="translate(-244.51235,-228.78793)">
<path id="path1135" class="st0" d="M256,311.5c-2.6,1-5.5-0.4-6.2-3c-0.7-2.6,1.1-5.7,3.7-6.4c3.2-0.6,6.2,1.4,9.3-0.2
c3.1-1.6,4-5.1,4.7-8.2c1.4-5,8.5-7.3,12.1-4.2c3.3,2.4,3.4,7.8,0.2,10.9c-2.2,2.5-5.9,3.3-8.8,2c-2.7-1.2-6-1.7-8.6,0.4
C259.1,305,259.9,310.2,256,311.5L256,311.5z"/>
<path id="path1137" class="st0" d="M316.1,320.5c-4.2,2.2-9.5-1.5-8.2-6c1.4-5.4,0.7-11.6-2.9-15.6c-3.4-4-9.8-4.7-14.6-1.9
c-3.7,2-6,5.7-7.4,9.5c-1,3.1-0.6,6.2-1.1,9.3c-1,3.8-5.8,6-9.1,4.3c-3.2-1.4-4-5.9-1.7-8.9c1.4-2.2,4.2-2.7,6.3-3.8
c3.6-1.9,6.5-4.9,8.4-8.6c1.2-2,1.1-4.5,1.7-6.6c0.9-1.9,3-2.7,4.8-2.9c4.8-0.6,9.5-3,13-6.7c1.7-1.6,3.1-4.2,5.6-4.1
c2.7,0.1,4.7,2.5,7.4,2.7c4.9,0.6,10.2-0.8,14.4-4c3.7-3.2,9.4-0.9,9.6,3.6c0.9,5.1-6.2,9.5-10.1,6.2c-4.3-4-10.8-5.6-16.9-3.7
c-5.6,1.9-9.7,8.3-8.6,14c0.9,4.8,4.2,9.3,8.6,11.3c1.7,0.8,3.6,1.6,4.2,3.5C321.2,314.9,319.4,319.1,316.1,320.5L316.1,320.5z"/>
<path id="path1139" class="st0" d="M318.9,329.4c-2.2,0.8-4.2-1.3-3.3-3.4c0.6-2.1,3.7-2.7,4.8-1.1
C321.7,326.3,320.7,328.8,318.9,329.4z"/>
<path id="path1141" class="st0" d="M349.9,286.5c-2.2,0.7-4.2-1.3-3.3-3.5c0.6-2.1,3.7-2.7,4.8-1
C352.8,283.5,351.8,285.9,349.9,286.5z"/>
<path id="path1143" class="st0" d="M268.5,329c-2.2,0.7-4.2-1.3-3.3-3.5c0.6-2,3.7-2.7,4.8-1C271.3,325.9,270.3,328.5,268.5,329z"
/>
<path id="path1145" class="st0" d="M343.1,307.4c-0.4,3.7-5.5,5.9-8.1,3.6c-1.9-1.1-1.6-3.6-2.2-5.4c-0.4-2.4-2.7-4.3-5.2-4.3
c-3.2-0.3-6.4,2.3-9.5,1.2c-4.8-1.2-6.5-7.5-3.2-11.5c2.9-4.1,9.3-4.5,12-0.7c2.4,2.8,0.5,7,2.7,10c1.7,2.9,5.4,2.7,8.3,1.9
C341,301.4,343.8,304.4,343.1,307.4L343.1,307.4z"/>
<path id="path1147" class="st0" d="M295.8,335.2c-3.3,2-7.5-0.9-6.7-4.6c0-2.3,2.2-3.6,3.5-5.2c1.9-1.9,2.3-4.9,1.2-7
c-1.3-2.9-4.9-4-5.5-7.2c-1.2-4.8,3.3-10.1,8.2-9.8c4.8-0.1,8.3,5,6.3,9.6c-1.2,3.7-5.8,4.8-7.2,8.4c-1.7,3.2,0.4,6.1,2.4,8.2
C300,329.6,298.8,333.8,295.8,335.2L295.8,335.2z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 471 B

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@@ -1,11 +0,0 @@
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<title>Kafka</title>
<circle cx="12" cy="12" r="2.2" fill="#111827"/>
<circle cx="12" cy="5.2" r="1.8" fill="#111827"/>
<circle cx="12" cy="18.8" r="1.8" fill="#111827"/>
<circle cx="6.1" cy="8.6" r="1.8" fill="#111827"/>
<circle cx="17.9" cy="8.6" r="1.8" fill="#111827"/>
<circle cx="6.1" cy="15.4" r="1.8" fill="#111827"/>
<circle cx="17.9" cy="15.4" r="1.8" fill="#111827"/>
<path d="M12 7.1v2.7M12 14.2v2.7M7.8 9.6l2.1 1.1M16.2 9.6 14.1 10.7M7.8 14.4l2.1-1.1M16.2 14.4l-2.1-1.1" fill="none" stroke="#111827" stroke-width="1.6" stroke-linecap="round"/>
</svg>

Before

Width:  |  Height:  |  Size: 654 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

@@ -1,9 +1,35 @@
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<title>MQTT</title>
<circle cx="12" cy="12" r="2.4" fill="#0EA5A4"/>
<circle cx="6.1" cy="8.2" r="2" fill="#14B8A6"/>
<circle cx="17.9" cy="8.2" r="2" fill="#14B8A6"/>
<circle cx="7.5" cy="17.1" r="1.8" fill="#0F766E"/>
<circle cx="16.5" cy="17.1" r="1.8" fill="#0F766E"/>
<path d="M7.7 9.1 10 11M16.3 9.1 14 11M8.8 15.7l1.5-2M15.2 15.7l-1.5-2" fill="none" stroke="#0EA5A4" stroke-width="1.6" stroke-linecap="round"/>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.2" baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
y="0px" viewBox="0 0 1100 300" overflow="visible" xml:space="preserve">
<g id="black_bg" display="none">
<rect x="-2384.9" y="-306.8" display="inline" width="4531.8" height="1152"/>
</g>
<g id="logos">
<g>
<path fill="#FFFFFF" d="M388,150.1c1.7,3.7,3.3,7.5,4.8,11.4c1.5-4,3.1-7.8,4.9-11.6c1.7-3.7,3.5-7.4,5.3-10.9l50.5-99.5
c0.9-1.7,1.8-3,2.8-4c0.9-0.9,2-1.6,3.2-2.1c1.2-0.5,2.5-0.7,4-0.7c1.5,0,3.2,0,5.2,0h34.8v196.6h-40.2V116.3
c0-5.5,0.3-11.4,0.8-17.8l-52.1,101.1c-1.6,3.2-3.8,5.5-6.5,7.2c-2.7,1.6-5.9,2.4-9.4,2.4h-6.2c-3.5,0-6.6-0.8-9.4-2.4
c-2.7-1.6-4.9-4-6.5-7.2L321.4,98.3c0.4,3.2,0.6,6.3,0.8,9.4c0.2,3.1,0.3,6,0.3,8.6v113.1h-40.2V32.8h34.8c2,0,3.7,0,5.2,0
c1.5,0,2.8,0.2,4,0.7c1.2,0.5,2.2,1.1,3.2,2.1c0.9,0.9,1.9,2.3,2.8,4l50.6,99.9C384.6,142.9,386.3,146.4,388,150.1z"/>
<path fill="#FFFFFF" d="M719.1,131c0,8.5-0.9,16.6-2.6,24.4c-1.8,7.8-4.3,15.1-7.6,21.9c-3.3,6.8-7.3,13.2-12.2,19
c-4.8,5.9-10.3,11-16.4,15.5l49.8,54.4h-37.5c-5.4,0-10.3-0.7-14.7-2c-4.4-1.3-8.3-3.9-11.7-7.9L641.7,229c-4,0.8-8,1.4-12.1,1.9
c-4.1,0.4-8.3,0.7-12.6,0.7c-15.3,0-29.2-2.6-41.8-7.7c-12.6-5.1-23.4-12.2-32.3-21.3c-9-9-15.9-19.7-20.8-31.9
c-4.9-12.2-7.4-25.5-7.4-39.7c0-14.2,2.5-27.4,7.4-39.7c4.9-12.2,11.8-22.9,20.8-31.9c9-9,19.7-16.1,32.3-21.2
c12.6-5.1,26.5-7.7,41.8-7.7c15.3,0,29.2,2.6,41.8,7.8c12.6,5.2,23.3,12.3,32.2,21.3c8.9,9,15.8,19.6,20.7,31.9
C716.6,103.7,719.1,116.8,719.1,131z M672.4,131c0-9.7-1.3-18.5-3.8-26.3c-2.5-7.8-6.1-14.4-10.9-19.8
c-4.7-5.4-10.5-9.5-17.3-12.4c-6.8-2.9-14.6-4.3-23.4-4.3c-8.8,0-16.7,1.4-23.6,4.3c-6.9,2.9-12.7,7-17.4,12.4
c-4.7,5.4-8.3,12-10.9,19.8c-2.5,7.8-3.8,16.5-3.8,26.3c0,9.8,1.3,18.6,3.8,26.4c2.5,7.8,6.1,14.4,10.9,19.8
c4.7,5.4,10.5,9.5,17.4,12.4c6.9,2.8,14.7,4.3,23.6,4.3c8.7,0,16.5-1.4,23.4-4.3c6.8-2.8,12.6-7,17.3-12.4
c4.7-5.4,8.3-12,10.9-19.8C671.1,149.6,672.4,140.8,672.4,131z"/>
<path fill="#FFFFFF" d="M865.6,32.7v36.2h-53.3v160.5h-45.6V68.9h-53.3V32.7H865.6z"/>
<path fill="#FFFFFF" d="M1040.1,32.7v36.2h-55.3v160.5h-45.6V68.9h-53.3V32.7H1040.1z"/>
</g>
<path fill="#FFFFFF" d="M34.9,144c-0.2,0-0.4,0-0.6,0v77.6c0,5.6,4.6,10.2,10.2,10.2h79.9C123.7,183.3,83.8,144,34.9,144z"/>
<path fill="#FFFFFF" d="M34.9,80c-0.2,0-0.4,0-0.6,0v33c65.9,0.3,119.5,53.3,120.2,118.8h34.2C188.1,148,119.3,80,34.9,80z"/>
<path fill="#FFFFFF" d="M237.2,221.7v-70.1C214,94.8,167.3,50,109.1,29H44.5c-5.6,0-10.2,4.6-10.2,10.2V49
c101.4,0.3,183.9,82,184.5,182.8h8.2C232.6,231.8,237.2,227.3,237.2,221.7z"/>
<path fill="#FFFFFF" d="M210.5,57.3c9.4,9.4,19,21.3,26.7,31.8v-50c0-5.6-4.5-10.1-10.1-10.1h-51.5
C187.5,37.3,199.9,46.8,210.5,57.3z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 511 B

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -1,7 +1,35 @@
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<title>Qdrant</title>
<path d="M12 4.5a7.5 7.5 0 1 0 5.3 12.8" fill="none" stroke="#DC244C" stroke-width="3" stroke-linecap="round"/>
<path d="M15.8 15.8 19 19" fill="none" stroke="#DC244C" stroke-width="3" stroke-linecap="round"/>
<circle cx="16.9" cy="7.4" r="1.7" fill="#F59E0B"/>
<circle cx="7.7" cy="16.8" r="1.7" fill="#7C3AED"/>
</svg>
<?xml version="1.0" encoding="UTF-8"?>
<svg id="Capa_2" data-name="Capa 2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 346.42 400">
<defs>
<style>
.cls-1 {
fill: #9e0d38;
}
.cls-2 {
fill: #dc244c;
}
.cls-3 {
fill: #ff516b;
}
</style>
</defs>
<g id="Vectors">
<g>
<g>
<polygon class="cls-2" points="173.21 0 0 100 0 300 173.21 400 238.16 362.5 238.16 287.5 173.21 325 64.96 262.5 64.96 137.5 173.21 75 281.46 137.5 281.46 387.5 346.42 350 346.42 100 173.21 0"/>
<polygon class="cls-2" points="108.26 162.5 108.26 237.5 173.21 275 238.16 237.5 238.16 162.5 173.21 125 108.26 162.5"/>
</g>
<g>
<polygon class="cls-1" points="238.16 287.5 238.16 362.5 173.21 400 173.21 325 238.16 287.5"/>
<polygon class="cls-1" points="346.42 100 346.42 350 281.46 387.5 281.46 137.5 346.42 100"/>
<polygon class="cls-3" points="346.42 100 281.46 137.5 173.21 75 64.96 137.5 0 100 173.21 0 346.42 100"/>
<polygon class="cls-2" points="173.21 325 173.21 400 0 300 0 100 64.96 137.5 64.96 262.5 173.21 325"/>
<polygon class="cls-3" points="238.16 162.5 173.21 200 108.26 162.5 173.21 125 238.16 162.5"/>
<polygon class="cls-2" points="173.21 200 173.21 275 108.26 237.5 108.26 162.5 173.21 200"/>
<polygon class="cls-1" points="238.16 162.5 238.16 237.5 173.21 275 173.21 200 238.16 162.5"/>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 425 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@@ -1,6 +0,0 @@
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<title>RocketMQ</title>
<path d="M15.4 4.4c-3.6 0-6.3 2.2-7.6 6.1l-3.1 1.8 2.2 1.2-.6 2.7 2.7-.6 1.2 2.2 1.8-3.1c3.9-1.3 6.1-4 6.1-7.6 0-.8-.1-1.5-.3-2.3-.8-.2-1.5-.4-2.4-.4Z" fill="#EA580C"/>
<circle cx="13.6" cy="8.8" r="1.8" fill="#FFFFFF"/>
<path d="M7.4 16.7 5 19.1" fill="none" stroke="#FDBA74" stroke-width="1.8" stroke-linecap="round"/>
</svg>

Before

Width:  |  Height:  |  Size: 432 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -0,0 +1,72 @@
<svg width="159" height="48" viewBox="0 0 159 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1_798)">
<path d="M93.932 39.4721C93.6905 39.3017 93.4059 39.1653 93.0955 39.0461C92.7764 38.9268 92.4573 38.8246 92.1382 38.7223C91.8277 38.6371 90.0598 38.2623 89.7062 38.1004C88.7404 37.6403 89.1888 37.1717 89.3527 37.061C89.4993 36.9673 89.6545 36.9332 89.8615 36.8906C90.0598 36.848 90.422 36.8054 91.0602 36.8054C91.4052 36.8054 91.8019 36.848 92.0865 36.8991C92.371 36.9502 92.6298 37.0184 92.8454 37.078C93.0092 37.1206 93.0868 37.1547 93.3456 37.1717C93.587 37.1973 93.7509 37.078 93.8716 36.9843C93.9751 36.9076 94.0441 36.7372 94.0441 36.6605C94.0441 36.5583 94.0441 36.2601 94.0441 36.2175C94.0441 35.996 93.8199 35.8171 93.5353 35.7319C93.5094 35.7234 93.4749 35.7149 93.4404 35.6978C93.2421 35.6382 93.0265 35.5871 92.7764 35.5445C92.5263 35.5019 92.2503 35.4593 91.9657 35.4337C91.6725 35.4082 91.3879 35.3911 91.0947 35.3911C90.5428 35.3911 90.0081 35.4337 89.5079 35.5274C89.0077 35.6126 88.5765 35.7489 88.2143 35.9364C87.8435 36.1153 87.5502 36.3453 87.3346 36.6265C87.1191 36.8991 87.0156 37.2228 87.0156 37.5807C87.0156 37.8959 87.0932 38.1685 87.2398 38.3986C87.3864 38.6286 87.5934 38.8246 87.8262 38.9864C88.0677 39.1568 88.3437 39.2931 88.6455 39.4124C89.3354 39.685 91.2758 40.0173 92.052 40.2729C92.8281 40.5285 92.7591 41.3634 92.2589 41.5935C91.7501 41.8235 91.1033 41.832 90.3703 41.832C89.9132 41.832 89.3958 41.7809 89.0508 41.7127C88.7059 41.6446 88.4989 41.5594 88.2574 41.4827C88.0073 41.406 87.7227 41.2186 87.4468 41.2186C87.1104 41.2186 86.8086 41.3634 86.8086 41.6616C86.8086 41.7894 86.8086 41.7979 86.8086 41.832C86.8086 41.8661 86.8086 41.9172 86.8086 41.9683V42.275C86.8086 42.488 86.9379 42.6073 87.0587 42.6755C87.1708 42.7436 87.2484 42.7777 87.4295 42.8459C87.6106 42.9055 87.8435 42.9736 88.1194 43.0333C88.3954 43.0929 88.7145 43.1526 89.0767 43.1952C89.4389 43.2378 89.7149 43.2633 90.1288 43.2633C90.7497 43.2633 91.4569 43.2122 92.0002 43.11C92.5435 43.0077 93.0178 42.8629 93.4318 42.6499C93.8371 42.4539 94.1648 42.1984 94.3977 41.9002C94.6391 41.602 94.7599 41.2527 94.7599 40.8522C94.7599 40.5455 94.6823 40.2814 94.527 40.0599C94.3718 39.8384 94.1735 39.6424 93.932 39.4721Z" fill="#A0A0A0"/>
<path d="M119.071 36.0554C118.235 35.3994 117.528 35.3057 115.777 35.3057H113.078C113.078 35.3057 113.034 35.3057 113 35.3227H112.965C112.534 35.3227 112.181 35.672 112.181 36.098V42.4707C112.181 42.8967 112.534 43.246 112.965 43.246H113.103C113.103 43.246 113.147 43.246 113.164 43.246H115.587C117.321 43.246 118.088 43.1779 118.968 42.5304C120.003 41.7636 120.218 41.0479 120.218 39.1651C120.218 37.4697 120.054 36.8392 119.063 36.0639L119.071 36.0554ZM118.028 41.2524L117.881 41.3717C117.579 41.6699 116.475 41.7977 115.579 41.7977H114.294C114.104 41.7892 113.905 41.6784 113.905 41.4824V37.2056C113.905 37.0096 114.121 36.7285 114.311 36.7285L115.544 36.7114C116.57 36.7114 117.433 36.737 118.054 37.3419C118.416 37.6997 118.485 38.2024 118.485 39.2247C118.485 40.3664 118.459 40.8264 118.019 41.2609L118.028 41.2524Z" fill="#A0A0A0"/>
<path d="M107.101 35.3911H99.9258C99.7016 35.3911 99.5205 35.57 99.5205 35.7915V36.6605C99.5205 36.8906 99.7102 37.0695 99.9345 37.0695H102.582V42.4284C102.582 42.8544 102.642 43.2037 103.074 43.2037H103.832C104.264 43.2037 104.281 42.8544 104.281 42.4284V37.0695H107.101C107.299 37.0695 107.455 36.9076 107.455 36.7117V35.7489C107.455 35.553 107.291 35.3911 107.092 35.3911H107.101Z" fill="#A0A0A0"/>
<path d="M145.236 35.3911H138.061C137.836 35.3911 137.655 35.57 137.655 35.7915V36.6605C137.655 36.8906 137.845 37.0695 138.069 37.0695H140.717V42.4284C140.717 42.8544 140.777 43.2037 141.208 43.2037H141.967C142.398 43.2037 142.416 42.8544 142.416 42.4284V37.0695H145.236C145.434 37.0695 145.598 36.9076 145.598 36.7117V35.7489C145.598 35.553 145.434 35.3911 145.236 35.3911Z" fill="#A0A0A0"/>
<path d="M69.535 35.3994H68.9572C68.5174 35.3738 68.4139 35.4164 68.2846 35.655L68.1811 35.8424L68.1121 35.9702L67.9482 36.2684C67.9482 36.2684 67.9482 36.2684 67.9482 36.2769L65.3697 40.9542L62.5755 35.9276C62.5755 35.9276 62.5755 35.9191 62.5669 35.9105L62.4203 35.6464C62.2909 35.4164 62.1012 35.3908 61.7821 35.3823H61.1439C60.661 35.3908 60.6179 35.7742 60.7472 36.0128L61.256 36.9499C61.256 36.9499 61.2733 36.984 61.2819 37.0011L64.4555 42.6922C64.6366 42.9989 64.9643 43.2119 65.3352 43.2119C65.706 43.2119 66.0337 42.9989 66.2148 42.6922L69.4143 37.0181L69.949 35.9872C70.0783 35.7572 70.0611 35.3823 69.535 35.3994Z" fill="#A0A0A0"/>
<path d="M82.0395 41.585L78.8831 35.9279C78.702 35.6127 78.3829 35.4082 78.0121 35.4082C77.6413 35.4082 77.3222 35.6127 77.1411 35.9279L73.9933 41.6191C73.9933 41.6191 73.9761 41.6531 73.9675 41.6702L73.4587 42.6073C73.3293 42.8374 73.4587 43.1015 73.6829 43.2378H74.4677C74.873 43.2378 74.9851 43.2037 75.1145 42.9737L75.2611 42.7096C75.2611 42.7096 75.2611 42.7011 75.2697 42.6925L75.8389 41.6531H78.6934C78.8486 41.6531 79.116 41.4316 78.9349 41.0738L78.5295 40.3496C78.4951 40.2815 78.4261 40.2389 78.3484 40.2389H76.6064L78.0207 37.6659L80.5734 42.3432C80.5734 42.3432 80.5734 42.3432 80.5734 42.3518L80.7373 42.65L80.8063 42.7777L80.9098 42.9652C81.0391 43.1952 81.272 43.2293 81.6169 43.2293L82.3758 43.2463C82.5483 43.2378 82.807 42.9141 82.6259 42.6159L82.0136 41.585H82.0395Z" fill="#A0A0A0"/>
<path d="M132.895 41.585L129.739 35.9279C129.558 35.6127 129.238 35.4082 128.868 35.4082C128.497 35.4082 128.178 35.6127 127.997 35.9279L124.849 41.6191C124.849 41.6191 124.832 41.6531 124.823 41.6702L124.314 42.6073C124.185 42.8374 124.314 43.1015 124.538 43.2378H125.323C125.728 43.2378 125.841 43.2037 125.97 42.9737L126.117 42.7096C126.117 42.7096 126.117 42.7011 126.125 42.6925L126.694 41.6531H129.549C129.704 41.6531 129.971 41.4316 129.79 41.0738L129.385 40.3496C129.351 40.2815 129.282 40.2389 129.204 40.2389H127.462L128.876 37.6659L131.429 42.3432C131.429 42.3432 131.429 42.3432 131.429 42.3518L131.593 42.6585L131.662 42.7863L131.765 42.9737C131.895 43.2037 132.127 43.2378 132.481 43.2378L133.24 43.2548C133.412 43.2463 133.671 42.9226 133.49 42.6244L132.878 41.585H132.895Z" fill="#A0A0A0"/>
<path d="M158.94 42.6156L158.328 41.5762L155.171 35.9191C154.99 35.6039 154.671 35.3994 154.3 35.3994C153.929 35.3994 153.61 35.6039 153.429 35.9191L150.281 41.6103C150.281 41.6103 150.264 41.6444 150.256 41.6614L149.747 42.5986C149.617 42.8286 149.747 43.0927 149.971 43.229H150.756C151.161 43.229 151.273 43.1949 151.403 42.9649L151.549 42.7008C151.549 42.7008 151.549 42.6923 151.558 42.6838L152.127 41.6444H154.981C155.137 41.6444 155.404 41.4228 155.223 41.065L154.818 40.3408C154.783 40.2727 154.714 40.2301 154.637 40.2301H152.894L154.309 37.6571L156.862 42.3345C156.862 42.3345 156.862 42.3345 156.862 42.343L157.025 42.6497L157.094 42.7775L157.198 42.9649C157.327 43.1949 157.56 43.229 157.905 43.229L158.664 43.2461C158.836 43.2375 159.095 42.9138 158.914 42.6156H158.94Z" fill="#A0A0A0"/>
<path d="M141.476 29.751V22.2366C141.89 22.0833 142.304 21.9214 142.718 21.751C143.192 21.5551 143.244 21.4869 143.235 21.112C143.235 20.8053 143.244 20.0556 143.244 19.5615C143.244 19.1951 143.02 19.0758 142.692 19.161C142.295 19.2633 141.881 19.3655 141.467 19.4677V14.9523H142.977C143.14 14.9523 143.27 14.8245 143.27 14.6626V12.7372C143.27 12.5753 143.14 12.4475 142.977 12.4475H141.467V10.1813C141.467 10.0194 141.338 9.8916 141.174 9.8916H138.828C138.665 9.8916 138.535 10.0194 138.535 9.90864V12.4475H137.095C136.931 12.4475 136.802 12.5753 136.802 12.7372V14.6626C136.802 14.8245 136.931 14.9523 137.095 14.9523H138.535V20.0812C138.061 20.1578 137.595 20.2175 137.129 20.2516C137.026 20.2601 136.922 20.2686 136.871 20.3538C136.793 20.4816 136.81 20.6861 136.81 20.6861V22.6712C136.81 22.6712 136.767 23.1653 136.897 23.2931C136.966 23.3612 137.164 23.4038 137.336 23.3698C137.742 23.2931 138.138 23.1994 138.535 23.1057V28.4901C138.509 28.6009 138.458 28.6861 138.328 28.7968C138.251 28.8565 138.138 28.8991 137.992 28.9161L137.224 28.9417C137.06 28.9417 136.931 29.0695 136.931 29.2313V31.1568C136.931 31.3186 137.06 31.4464 137.224 31.4464H139.863L139.898 31.4294C140.769 31.3357 141.441 30.4837 141.467 29.8107V29.7936C141.467 29.7936 141.467 29.7766 141.467 29.7681C141.467 29.7595 141.467 29.7425 141.467 29.734L141.476 29.751Z" fill="#19140F"/>
<path d="M158.361 19.1268H153.98V17.3121H157.792C158.033 17.3121 158.223 17.1162 158.223 16.8861V10.2663C158.223 10.0278 158.025 9.84033 157.792 9.84033L146.426 9.92553C146.426 9.92553 146.365 9.90849 146.331 9.90849H143.985C143.821 9.90849 143.692 10.0363 143.692 10.1982V23.0714C143.562 25.3632 143.131 26.8797 142.234 28.8904V31.4548H142.303C142.898 31.4037 146.279 27.6209 146.615 22.0576L146.633 21.6486H151.057V23.4719H147.141C146.969 23.4719 146.822 23.6167 146.822 23.7871V31.2077C146.822 31.3781 146.969 31.523 147.141 31.523H157.913C158.085 31.523 158.232 31.3781 158.232 31.2077V23.7871C158.232 23.6167 158.085 23.4719 157.913 23.4719H153.997V21.6486H158.378C158.542 21.6486 158.672 21.5208 158.672 21.359V19.4335C158.672 19.2716 158.542 19.1438 158.378 19.1438L158.361 19.1268ZM155.222 26.2408V28.7626C155.222 28.8819 155.127 28.9756 155.006 28.9756H149.979C149.858 28.9756 149.763 28.8819 149.763 28.7626V26.2408C149.763 26.1215 149.858 26.0278 149.979 26.0278H155.006C155.127 26.0278 155.222 26.1215 155.222 26.2408ZM147.124 12.4303H154.696C154.972 12.4303 155.205 12.6604 155.205 12.933V14.4154C155.205 14.688 154.972 14.9181 154.696 14.9181H147.124C146.883 14.9181 146.684 14.7477 146.633 14.5262V12.8307C146.676 12.6007 146.883 12.4303 147.124 12.4303ZM146.641 19.1268V17.3121H151.048V19.1268H146.641Z" fill="#19140F"/>
<path d="M114.397 10.4023H112.051C111.889 10.4023 111.758 10.532 111.758 10.692V13.0094C111.758 13.1694 111.889 13.299 112.051 13.299H114.397C114.559 13.299 114.69 13.1694 114.69 13.0094V10.692C114.69 10.532 114.559 10.4023 114.397 10.4023Z" fill="#19140F"/>
<path d="M122.58 10.4023H120.235C120.073 10.4023 119.941 10.532 119.941 10.692V13.0094C119.941 13.1694 120.073 13.299 120.235 13.299H122.58C122.742 13.299 122.874 13.1694 122.874 13.0094V10.692C122.874 10.532 122.742 10.4023 122.58 10.4023Z" fill="#19140F"/>
<path d="M122.132 29.1031C122.046 29.1031 121.951 29.1031 121.865 29.1031C121.123 29.1031 120.382 28.9839 119.692 28.7794C121.003 27.6633 121.908 26.232 122.072 24.5536H123.176C123.34 24.5536 123.469 24.4258 123.469 24.264V22.3385C123.469 22.1766 123.34 22.0488 123.176 22.0488H115.182V21.3502C115.182 21.1883 115.052 21.0605 114.888 21.0605H112.543C112.379 21.0605 112.249 21.1883 112.249 21.3502V22.0488H111.646C111.482 22.0488 111.353 22.1766 111.353 22.3385V24.264C111.353 24.4258 111.482 24.5536 111.646 24.5536H112.482C112.698 26.249 113.431 27.6378 114.509 28.7112C113.707 28.9583 112.87 29.1031 112.068 29.1031C111.991 29.1031 111.913 29.1031 111.835 29.1031C111.585 29.1031 111.378 29.2991 111.378 29.5462V30.969C111.378 31.2075 111.577 31.412 111.818 31.412C111.896 31.412 111.982 31.412 112.06 31.412C113.716 31.412 115.44 31.0542 116.984 30.4067C118.441 31.0712 120.132 31.412 121.857 31.412C121.934 31.412 122.02 31.412 122.098 31.412C122.348 31.412 122.546 31.2075 122.546 30.9604V29.4865C122.546 29.265 122.357 29.0861 122.132 29.0946V29.1031ZM115.354 24.5621H119.2C119.14 25.5845 118.321 26.6324 117.122 27.4588C116.113 26.6495 115.44 25.6186 115.354 24.5621Z" fill="#19140F"/>
<path d="M132.714 29.0521C131.636 28.9755 130.644 28.5239 129.782 27.8338C131.187 26.164 132.041 24.017 132.093 21.6144C132.11 21.4526 132.11 21.3333 132.11 21.2907V14.9435H132.86C133.024 14.9435 133.154 14.8072 133.154 14.6538V12.7284C133.154 12.5665 133.024 12.4387 132.86 12.4387H128.1C128.16 12.2257 128.221 11.9957 128.281 11.7657C128.402 11.263 128.462 10.8455 128.454 10.2918C128.454 10.0617 128.264 9.88281 128.031 9.88281H125.332C124.987 9.88281 124.719 10.1725 124.745 10.5048C124.754 10.6496 124.762 10.8029 124.762 10.9563C124.762 12.4302 124.193 13.7763 123.262 14.7902V14.1597C123.262 13.9978 123.133 13.87 122.969 13.87H118.777V10.198C118.777 10.0362 118.648 9.90837 118.484 9.90837H116.139C115.975 9.90837 115.845 10.0362 115.845 10.198V13.87H111.628C111.464 13.87 111.335 13.9978 111.335 14.1597V16.4771C111.335 16.6389 111.464 16.7667 111.628 16.7667H113.293C113.293 16.7667 113.293 16.7923 113.293 16.8093C113.293 17.6187 112.378 18.1725 111.723 18.5559C111.585 18.6325 111.464 18.6922 111.378 18.8029C111.361 18.8285 111.344 18.8881 111.335 18.9648V20.3791C111.344 20.4472 111.369 20.5069 111.395 20.541C111.464 20.6262 111.585 20.6602 111.697 20.6688C111.818 20.6858 111.87 20.6858 111.99 20.6858C113.715 20.6858 115.595 19.3312 115.845 17.6613V20.4728C115.845 20.6347 115.975 20.7625 116.139 20.7625H118.484C118.648 20.7625 118.777 20.6347 118.777 20.4728V17.6443C119.019 19.3141 120.908 20.6858 122.632 20.6858C122.753 20.6858 122.813 20.6858 122.926 20.6688C123.046 20.6517 123.158 20.6262 123.227 20.541C123.253 20.5069 123.279 20.4558 123.288 20.3961V18.9478C123.279 18.8796 123.271 18.8285 123.245 18.8029C123.158 18.6922 123.029 18.6325 122.9 18.5559C122.244 18.1725 121.33 17.6187 121.33 16.8093C121.33 16.7923 121.33 16.7838 121.33 16.7667H122.831V16.903C122.831 16.903 122.788 17.1331 122.969 17.3205C123.15 17.5079 123.374 17.4227 123.633 17.3546C123.745 17.3205 123.857 17.2864 123.96 17.2524V21.7678C123.96 21.8189 123.96 21.8615 123.96 21.8956C123.96 21.9808 123.96 22.066 123.96 22.1512V22.2449C123.96 22.2449 123.96 22.2449 123.96 22.2534C124.038 24.3407 124.788 26.2321 126.004 27.7401C125.185 28.3535 124.236 28.7965 123.227 28.984C123.003 29.0266 122.839 29.2311 122.839 29.4611V30.9265C122.839 31.1821 123.064 31.3695 123.314 31.3354C125.03 31.0969 126.599 30.4749 127.91 29.5463C129.281 30.526 130.92 31.1735 132.705 31.378C132.947 31.4036 133.154 31.2247 133.154 30.9861C133.154 30.6624 133.154 29.8786 133.154 29.5889C133.154 29.0351 132.757 29.0777 132.679 29.0777L132.714 29.0521ZM127.039 14.9435H128.824C128.824 14.9435 129.178 14.9776 129.178 15.3695V22.066C129.074 23.3525 128.626 24.5878 127.936 25.6613C127.289 24.5282 126.918 23.2417 126.918 21.9978C126.918 21.9297 126.918 21.87 126.901 21.8274V17.0308C126.901 16.869 126.772 16.7412 126.608 16.7412H125.142C125.944 16.2896 126.556 15.6847 127.031 14.952L127.039 14.9435Z" fill="#19140F"/>
<path d="M107.308 29.8531H98.5372V29.0097H105.937C106.161 29.0097 106.351 28.8223 106.351 28.6007V27.7828C106.351 27.5613 106.161 27.3739 105.937 27.3739H98.5372V26.5134H105.117C105.264 26.5134 105.376 26.3941 105.376 26.2493V20.1748C105.376 20.0299 105.255 19.9106 105.117 19.9106H88.4472C88.3006 19.9106 88.1885 20.0299 88.1885 20.1748V26.2493C88.1885 26.3941 88.3092 26.5134 88.4472 26.5134H95.0273V27.3739H87.6279C87.4037 27.3739 87.214 27.5613 87.214 27.7828V28.6007C87.214 28.8223 87.4037 29.0097 87.6279 29.0097H95.0273V29.8531H86.2567C86.0325 29.8531 85.8428 30.0406 85.8428 30.2621V31.08C85.8428 31.3015 86.0325 31.4889 86.2567 31.4889H107.299C107.523 31.4889 107.713 31.3015 107.713 31.08V30.2621C107.713 30.0406 107.523 29.8531 107.299 29.8531H107.308ZM102.125 24.5368C102.125 24.7158 101.978 24.8606 101.797 24.8606H98.5372V24.0001H101.797C101.978 24.0001 102.125 24.1449 102.125 24.3238V24.5368ZM101.797 21.5464C101.978 21.5464 102.125 21.6913 102.125 21.8702V22.0832C102.125 22.2621 101.978 22.4069 101.797 22.4069H98.5372V21.5464H101.797ZM91.5001 21.8702C91.5001 21.6913 91.6467 21.5464 91.8278 21.5464H95.0445V22.4069H91.8278C91.6467 22.4069 91.5001 22.2621 91.5001 22.0832V21.8702ZM91.8278 24.8606C91.6467 24.8606 91.5001 24.7158 91.5001 24.5368V24.3238C91.5001 24.1449 91.6467 24.0001 91.8278 24.0001H95.0445V24.8606H91.8278Z" fill="#19140F"/>
<path d="M107.317 17.3975H86.2655C86.0369 17.3975 85.8516 17.5806 85.8516 17.8064V18.6158C85.8516 18.8416 86.0369 19.0247 86.2655 19.0247H107.317C107.545 19.0247 107.731 18.8416 107.731 18.6158V17.8064C107.731 17.5806 107.545 17.3975 107.317 17.3975Z" fill="#19140F"/>
<path d="M88.2919 16.4944H105.298C105.445 16.4944 105.557 16.3751 105.557 16.2303V10.1557C105.557 10.0109 105.436 9.8916 105.298 9.8916H88.2919C88.1453 9.8916 88.0332 10.0109 88.0332 10.1557V16.2303C88.0332 16.3751 88.1539 16.4944 88.2919 16.4944ZM91.3189 11.8341C91.3189 11.6552 91.4655 11.5103 91.6466 11.5103H101.944C102.125 11.5103 102.271 11.6552 102.271 11.8341V12.0471C102.271 12.226 102.125 12.3708 101.944 12.3708H91.6466C91.4655 12.3708 91.3189 12.226 91.3189 12.0471V11.8341ZM91.3189 14.3304C91.3189 14.1515 91.4655 14.0066 91.6466 14.0066H101.944C102.125 14.0066 102.271 14.1515 102.271 14.3304V14.5434C102.271 14.7223 102.125 14.8671 101.944 14.8671H91.6466C91.4655 14.8671 91.3189 14.7223 91.3189 14.5434V14.3304Z" fill="#19140F"/>
<path d="M63.7749 16.043H61.1274C60.9721 16.043 60.8428 16.1708 60.8428 16.3241V20.2176C60.8428 20.371 60.9721 20.4988 61.1274 20.4988H63.7059C63.8612 20.4988 64.0509 20.3284 64.0509 20.175V16.3241C64.0509 16.1708 63.9388 16.043 63.7835 16.043H63.7749Z" fill="#19140F"/>
<path d="M63.749 21.606H61.1274C60.9721 21.606 60.8428 21.7338 60.8428 21.8871V31.1651C60.8428 31.3184 60.9721 31.4462 61.1274 31.4462H63.7404C63.8957 31.4462 64.0164 31.3184 64.0164 31.1651V21.8871C64.0164 21.7338 63.9043 21.606 63.749 21.606Z" fill="#19140F"/>
<path d="M81.5318 20.4731H80.0916V15.4635C80.0916 15.1568 79.8415 14.9097 79.5311 14.9097H68.3975C68.7425 14.6797 69.2082 14.2963 69.6911 13.7936H81.0489C81.2041 13.7936 81.3248 13.6743 81.3248 13.5125V11.5615C81.3248 11.4081 81.1955 11.2888 81.0489 11.2888H70.8726C70.8898 11.1696 70.933 10.1728 70.933 10.1728C70.933 10.0194 70.8036 9.8916 70.6484 9.8916H68.1474C67.9922 9.8916 67.8628 10.0194 67.8628 10.1728V10.8714C67.8628 12.03 66.5692 13.1546 65.4568 13.3591C65.4568 13.3591 65.0342 13.3762 65.0342 13.7169V15.1057C65.0342 15.259 65.1635 15.3868 65.3101 15.3868L66.5951 15.1823V20.4646H65.7413C65.5861 20.4646 65.4568 20.5838 65.4568 20.7457V22.6882C65.4568 22.8415 65.5861 22.9693 65.7413 22.9693H66.5951V27.9448C66.5951 28.2856 66.828 28.3879 67.1384 28.3879H77.1163V28.7627C77.1163 28.9757 77.1163 29.2228 76.78 29.2228H74.2101C74.0548 29.2228 73.822 29.325 73.8737 29.5636C73.9255 29.8021 74.6758 31.0119 74.6758 31.0119C74.762 31.1653 74.8482 31.4209 75.1328 31.4209H79.6087C80.0399 31.4209 80.0485 31.2079 80.0485 30.9779L80.0744 28.3879L80.954 28.4049C81.1092 28.4049 81.2903 28.2686 81.2903 28.1152V26.1983C81.2817 26.045 81.1179 25.8831 80.9626 25.8831H80.0744V22.9608H81.5059C81.6612 22.9608 81.7905 22.833 81.7905 22.6797V20.7372C81.7905 20.5838 81.6784 20.456 81.5232 20.456L81.5318 20.4731ZM77.1508 25.619C77.1508 25.7723 77.0215 25.9001 76.8663 25.9001H75.0294V24.1365C75.0294 23.8554 74.9172 23.7446 74.6326 23.7446H72.4163C72.2611 23.7446 72.08 23.8639 72.08 24.0684V25.9001H69.9067C69.8205 25.9001 69.5531 25.8234 69.5531 25.6275V23.3101C69.5531 23.1568 69.6739 23.0205 69.8377 23.0205H76.8663C77.0215 23.0205 77.1508 23.2249 77.1508 23.3783V25.619ZM77.1336 20.4731H75.038V18.6925C75.038 18.4965 74.9172 18.3261 74.762 18.3261H72.3645C72.2093 18.3261 72.08 18.4965 72.08 18.6499V20.4731H69.5359V17.7979C69.5359 17.5082 69.7774 17.3719 69.9326 17.3719L76.8318 17.3975C76.987 17.3975 77.1508 17.5338 77.1508 17.7382L77.1336 20.4731Z" fill="#19140F"/>
<path d="M61.1184 14.9353H63.7401C63.8953 14.9353 64.0161 14.816 64.0161 14.6541V10.7606C64.0161 10.6073 63.8695 10.4795 63.7142 10.4795H61.1098C60.9546 10.4795 60.8252 10.6073 60.8252 10.7606V14.6541C60.8252 14.8075 60.9546 14.9353 61.1098 14.9353H61.1184Z" fill="#19140F"/>
<path d="M34.323 44.7455L34.2626 44.6518C34.2109 44.5411 34.1591 44.4388 34.1074 44.3451L26.915 32.1364C26.5097 31.4718 25.768 31.0288 24.9315 31.0288C24.095 31.0288 23.3447 31.4804 22.9394 32.1534L15.7211 44.2599C15.7211 44.2599 15.7039 44.2855 15.6952 44.3025L15.6435 44.3877C15.6004 44.4644 15.5573 44.5496 15.5141 44.6263L15.4365 44.7455C14.9105 45.606 15.1864 46.7391 16.0574 47.2588L16.8508 47.7359C17.7219 48.2556 18.8689 47.983 19.3949 47.1225L19.8779 46.3387C19.9124 46.2876 19.9382 46.2365 19.9641 46.1768L24.897 37.9383L29.7782 46.1002C29.8127 46.1768 29.8472 46.262 29.8989 46.3387L30.2007 46.8329C30.2439 46.9095 30.2956 46.9862 30.3387 47.0544L30.3818 47.1225C30.9079 47.983 32.0549 48.2556 32.9259 47.7359L33.7193 47.2588C34.5903 46.7391 34.8663 45.606 34.3402 44.7455H34.323Z" fill="url(#paint0_radial_1_798)"/>
<path d="M47.7674 26.2578H47.6553C47.5346 26.2492 47.4138 26.2407 47.3017 26.2407L33.0032 26.2918C32.2184 26.3089 31.4595 26.7178 31.0369 27.442C30.6144 28.1662 30.6402 29.0267 31.0197 29.7082L38.031 41.9425C38.031 41.9596 38.0482 41.9681 38.0568 41.9851L38.1086 42.0788C38.1517 42.1555 38.2034 42.2322 38.2552 42.3089L38.3242 42.4367C38.8157 43.3227 39.9455 43.6465 40.8424 43.1609L41.653 42.7178C42.5499 42.2322 42.8776 41.1161 42.3861 40.2301L41.9376 39.4292C41.9117 39.3781 41.8773 39.327 41.8428 39.2759L37.091 30.9436L46.6808 30.8499C46.767 30.8584 46.8533 30.8669 46.9481 30.8669L47.526 30.8499C47.6122 30.8499 47.7071 30.8499 47.7933 30.8499H47.8709C48.8885 30.8243 49.7078 29.9809 49.6819 28.9755L49.6647 28.0639C49.6388 27.0586 48.785 26.2492 47.7674 26.2748V26.2578Z" fill="url(#paint1_radial_1_798)"/>
<path d="M38.2819 5.51233L38.2302 5.61457C38.1612 5.70829 38.0922 5.81052 38.0405 5.90424L30.9343 18.1641C30.5549 18.8457 30.5376 19.6976 30.9602 20.4218C31.3828 21.146 32.1503 21.5549 32.9437 21.572L47.1732 21.6912C47.1905 21.6912 47.2077 21.6912 47.2164 21.6912H47.3198C47.4061 21.6912 47.5009 21.6912 47.5958 21.6827H47.7424C48.76 21.7083 49.6138 20.9074 49.6397 19.8936L49.6569 18.982C49.6828 17.9767 48.8635 17.1332 47.8459 17.1076L46.9231 17.0906C46.8628 17.0906 46.8024 17.0906 46.742 17.0906L37.0573 16.9884L41.766 8.73278C41.8178 8.66462 41.8695 8.58795 41.9126 8.51127L42.1886 8.00861C42.2317 7.93193 42.2748 7.85525 42.3179 7.77858L42.3524 7.71042C42.844 6.82437 42.5077 5.70829 41.6194 5.22266L40.8088 4.77964C39.9119 4.29402 38.7821 4.62629 38.2906 5.50381L38.2819 5.51233Z" fill="url(#paint2_radial_1_798)"/>
<path d="M15.359 3.25477L15.4194 3.34848C15.4711 3.45924 15.5229 3.56147 15.5746 3.65519L22.767 15.8639C23.1723 16.5285 23.914 16.9715 24.7505 16.9715C25.5871 16.9715 26.3373 16.5199 26.7427 15.8469L33.9609 3.74039C33.9609 3.74039 33.9782 3.71483 33.9868 3.69779L34.0385 3.61259C34.0817 3.53591 34.1248 3.45072 34.1679 3.37404L34.2455 3.25477C34.7716 2.39428 34.4956 1.26115 33.6246 0.741453L32.8312 0.26435C31.9602 -0.255352 30.8132 0.0172783 30.2871 0.877768L29.8042 1.66158C29.7697 1.7127 29.7438 1.76382 29.7179 1.82346L24.785 10.062L19.9039 1.90013C19.8694 1.82346 19.8349 1.73826 19.7831 1.66158L19.4813 1.16744C19.4382 1.09076 19.3864 1.01408 19.3433 0.945926L19.3002 0.877768C18.7741 0.0172783 17.6271 -0.255352 16.7561 0.26435L15.9627 0.741453C15.0917 1.26115 14.8157 2.39428 15.3418 3.25477H15.359Z" fill="url(#paint3_radial_1_798)"/>
<path d="M1.91414 21.7426H2.02625C2.14699 21.7511 2.26772 21.7596 2.37983 21.7596L16.6784 21.7085C17.4631 21.6914 18.2221 21.2825 18.6446 20.5583C19.0672 19.8342 19.0413 18.9737 18.6619 18.2921L11.6506 6.05779C11.6506 6.04075 11.6333 6.03223 11.6247 6.0152L11.573 5.92148C11.5299 5.8448 11.4781 5.76812 11.4264 5.69145L11.3574 5.56365C10.8658 4.6776 9.73607 4.35385 8.83918 4.83948L8.02853 5.2825C7.13164 5.76812 6.80393 6.8842 7.29549 7.77025L7.74394 8.57111C7.76981 8.62222 7.80431 8.67334 7.8388 8.72446L12.5906 17.0567L3.00076 17.1504C2.91452 17.1419 2.82828 17.1334 2.73342 17.1334L2.15561 17.1504C2.06937 17.1504 1.97451 17.1504 1.88827 17.1504H1.81065C0.793024 17.1845 -0.0262521 18.028 -0.000380225 19.0418L0.0168677 19.9534C0.0427396 20.9588 0.896512 21.7681 1.91414 21.7426Z" fill="url(#paint4_radial_1_798)"/>
<path d="M11.4002 42.488L11.4519 42.3858C11.5209 42.292 11.5899 42.1898 11.6417 42.0961L18.7478 29.8362C19.1273 29.1547 19.1445 28.3027 18.7219 27.5785C18.2994 26.8543 17.5318 26.4454 16.7384 26.4284L2.5175 26.3091C2.50025 26.3091 2.483 26.3091 2.47438 26.3091H2.37089C2.28465 26.3091 2.18979 26.3091 2.09493 26.3176H1.94832C0.930692 26.292 0.0769193 27.0929 0.0510474 28.1067L0.0337995 29.0183C0.00792757 30.0237 0.827204 30.8671 1.84483 30.8927L2.7676 30.9097C2.82796 30.9097 2.88833 30.9097 2.9487 30.9097L12.6334 31.012L7.92473 39.2675C7.87298 39.3357 7.82124 39.4124 7.77812 39.4891L7.50215 39.9917C7.45903 40.0684 7.41591 40.1451 7.37279 40.2218L7.3383 40.2899C6.84673 41.176 7.18306 42.292 8.07133 42.7777L8.88199 43.2207C9.77888 43.7063 10.9086 43.374 11.4002 42.4965V42.488Z" fill="url(#paint5_radial_1_798)"/>
</g>
<defs>
<radialGradient id="paint0_radial_1_798" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(24.727 23.6565) scale(24.7299 24.4309)">
<stop stop-color="#FFC80F"/>
<stop offset="0.33" stop-color="#FFA512"/>
<stop offset="0.77" stop-color="#FF7D17"/>
<stop offset="1" stop-color="#FF6E19"/>
</radialGradient>
<radialGradient id="paint1_radial_1_798" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(24.7267 23.6564) scale(24.7299 24.4309)">
<stop stop-color="#FFC80F"/>
<stop offset="0.33" stop-color="#FFA512"/>
<stop offset="0.77" stop-color="#FF7D17"/>
<stop offset="1" stop-color="#FF6E19"/>
</radialGradient>
<radialGradient id="paint2_radial_1_798" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(24.7276 23.6565) scale(24.7299 24.4309)">
<stop stop-color="#FFC80F"/>
<stop offset="0.33" stop-color="#FFA512"/>
<stop offset="0.77" stop-color="#FF7D17"/>
<stop offset="1" stop-color="#FF6E19"/>
</radialGradient>
<radialGradient id="paint3_radial_1_798" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(24.7272 23.6566) scale(24.7299 24.4309)">
<stop stop-color="#FFC80F"/>
<stop offset="0.33" stop-color="#FFA512"/>
<stop offset="0.77" stop-color="#FF7D17"/>
<stop offset="1" stop-color="#FF6E19"/>
</radialGradient>
<radialGradient id="paint4_radial_1_798" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(24.727 23.6567) scale(24.7299 24.4309)">
<stop stop-color="#FFC80F"/>
<stop offset="0.33" stop-color="#FFA512"/>
<stop offset="0.77" stop-color="#FF7D17"/>
<stop offset="1" stop-color="#FF6E19"/>
</radialGradient>
<radialGradient id="paint5_radial_1_798" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(24.7267 23.6566) scale(24.7299 24.4309)">
<stop stop-color="#FFC80F"/>
<stop offset="0.33" stop-color="#FFA512"/>
<stop offset="0.77" stop-color="#FF7D17"/>
<stop offset="1" stop-color="#FF6E19"/>
</radialGradient>
<clipPath id="clip0_1_798">
<rect width="159" height="48" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 26 KiB

View File

@@ -4,91 +4,40 @@ import { renderToStaticMarkup } from 'react-dom/server';
import { DB_ICON_TYPES, getDbIcon, getDbIconLabel } from './DatabaseIcons';
const BRAND_ICON_CASES: Array<[string, string, string]> = [
['elasticsearch', 'Elasticsearch', 'elasticsearch.svg'],
['oceanbase', 'OceanBase', 'oceanbase.png'],
['oracle', 'Oracle', 'oracle.ico'],
['starrocks', 'StarRocks', 'starrocks.png'],
['kingbase', '金仓', 'kingbase.ico'],
['dameng', '达梦', 'dameng.png'],
['vastbase', 'VastBase', 'vastbase.svg'],
['opengauss', 'OpenGauss', 'opengauss.ico'],
['gaussdb', 'GaussDB', 'gaussdb.ico'],
['goldendb', 'GoldenDB', 'goldendb.ico'],
['highgo', '瀚高', 'highgo.ico'],
['iris', 'InterSystems IRIS', 'iris.png'],
['tdengine', 'TDengine', 'tdengine.ico'],
['iotdb', 'Apache IoTDB', 'iotdb.svg'],
['rocketmq', 'RocketMQ', 'rocketmq.png'],
['mqtt', 'MQTT', 'mqtt.svg'],
['kafka', 'Kafka', 'kafka.png'],
['rabbitmq', 'RabbitMQ', 'rabbitmq.svg'],
['chroma', 'Chroma', 'chroma.svg'],
['qdrant', 'Qdrant', 'qdrant.svg'],
['jvm', 'JVM', 'jvm.ico'],
];
describe('DatabaseIcons', () => {
it('includes InterSystems IRIS in the selectable database icons', () => {
expect(DB_ICON_TYPES).toContain('iris');
expect(getDbIconLabel('iris')).toBe('InterSystems IRIS');
});
it('includes Elasticsearch in the selectable database icons', () => {
expect(DB_ICON_TYPES).toContain('elasticsearch');
expect(getDbIconLabel('elasticsearch')).toBe('Elasticsearch');
const markup = renderToStaticMarkup(<>{getDbIcon('elasticsearch', undefined, 22)}</>);
expect(markup).toContain('elasticsearch.svg');
expect(markup).toContain('alt="elasticsearch"');
});
it('includes Chroma in the selectable database icons', () => {
expect(DB_ICON_TYPES).toContain('chroma');
expect(getDbIconLabel('chroma')).toBe('Chroma');
const markup = renderToStaticMarkup(<>{getDbIcon('chroma', undefined, 22)}</>);
expect(markup).toContain('chroma.svg');
expect(markup).toContain('alt="chroma"');
});
it('includes Qdrant in the selectable database icons', () => {
expect(DB_ICON_TYPES).toContain('qdrant');
expect(getDbIconLabel('qdrant')).toBe('Qdrant');
const markup = renderToStaticMarkup(<>{getDbIcon('qdrant', undefined, 22)}</>);
expect(markup).toContain('qdrant.svg');
expect(markup).toContain('alt="qdrant"');
});
it('includes Apache IoTDB in the selectable database icons', () => {
expect(DB_ICON_TYPES).toContain('iotdb');
expect(getDbIconLabel('iotdb')).toBe('Apache IoTDB');
const markup = renderToStaticMarkup(<>{getDbIcon('iotdb', undefined, 22)}</>);
expect(markup).toContain('iotdb.svg');
expect(markup).toContain('alt="iotdb"');
});
it('includes RocketMQ in the selectable database icons', () => {
expect(DB_ICON_TYPES).toContain('rocketmq');
expect(getDbIconLabel('rocketmq')).toBe('RocketMQ');
const markup = renderToStaticMarkup(<>{getDbIcon('rocketmq', undefined, 22)}</>);
expect(markup).toContain('rocketmq.svg');
expect(markup).toContain('alt="rocketmq"');
});
it('includes MQTT in the selectable database icons', () => {
expect(DB_ICON_TYPES).toContain('mqtt');
expect(getDbIconLabel('mqtt')).toBe('MQTT');
const markup = renderToStaticMarkup(<>{getDbIcon('mqtt', undefined, 22)}</>);
expect(markup).toContain('mqtt.svg');
expect(markup).toContain('alt="mqtt"');
});
it('includes Kafka in the selectable database icons', () => {
expect(DB_ICON_TYPES).toContain('kafka');
expect(getDbIconLabel('kafka')).toBe('Kafka');
const markup = renderToStaticMarkup(<>{getDbIcon('kafka', undefined, 22)}</>);
expect(markup).toContain('kafka.svg');
expect(markup).toContain('alt="kafka"');
});
it('includes RabbitMQ in the selectable database icons', () => {
expect(DB_ICON_TYPES).toContain('rabbitmq');
expect(getDbIconLabel('rabbitmq')).toBe('RabbitMQ');
const markup = renderToStaticMarkup(<>{getDbIcon('rabbitmq', undefined, 22)}</>);
expect(markup).toContain('rabbitmq.svg');
expect(markup).toContain('alt="rabbitmq"');
});
it('includes GaussDB in the selectable database icons', () => {
expect(DB_ICON_TYPES).toContain('gaussdb');
expect(getDbIconLabel('gaussdb')).toBe('GaussDB');
const markup = renderToStaticMarkup(<>{getDbIcon('gaussdb', undefined, 22)}</>);
expect(markup).toContain('gaussdb.svg');
expect(markup).toContain('alt="gaussdb"');
});
it('includes GoldenDB in the selectable database icons', () => {
expect(DB_ICON_TYPES).toContain('goldendb');
expect(getDbIconLabel('goldendb')).toBe('GoldenDB');
const markup = renderToStaticMarkup(<>{getDbIcon('goldendb', undefined, 22)}</>);
expect(markup).toContain('goldendb.svg');
expect(markup).toContain('alt="goldendb"');
});
for (const [type, label, asset] of BRAND_ICON_CASES) {
it(`includes ${label} in the selectable database icons`, () => {
expect(DB_ICON_TYPES).toContain(type);
expect(getDbIconLabel(type)).toBe(label);
const markup = renderToStaticMarkup(<>{getDbIcon(type, undefined, 22)}</>);
expect(markup).toContain(asset);
expect(markup).toContain(`alt="${type}"`);
});
}
it('wraps database icons in a consistent frame for sidebar sizing', () => {
const mysqlMarkup = renderToStaticMarkup(<>{getDbIcon('mysql', undefined, 22)}</>);

View File

@@ -67,31 +67,90 @@ const DB_DEFAULT_COLORS: Record<string, string> = {
export const getDbDefaultColor = (type: string): string =>
DB_DEFAULT_COLORS[type?.toLowerCase()] || DB_DEFAULT_COLORS.custom;
// ─── 有品牌 SVG 文件的数据库类型(文件在 /db-icons/ 下) ────
type BrandAssetConfig = {
background?: string;
borderColor?: string;
iconScale?: number;
src: string;
};
const BRAND_SVG_TYPES = new Set([
'mysql', 'mariadb', 'postgres', 'redis', 'mongodb', 'clickhouse', 'sqlite',
'diros', 'sphinx', 'duckdb', 'sqlserver', 'elasticsearch',
'gaussdb', 'goldendb', 'iotdb', 'rocketmq', 'mqtt', 'kafka', 'rabbitmq',
'chroma', 'qdrant',
]);
// ─── 官方品牌资源(文件在 /db-icons/ 下) ────────────────────
/** 品牌 SVG 图标:用 <img> 加载 /db-icons/*.svg */
const BrandSvgIcon: React.FC<{ type: string; size: number; color?: string }> = ({ type, size, color }) => {
const bgColor = color || getDbDefaultColor(type);
const BRAND_ASSET_CONFIGS: Record<string, BrandAssetConfig> = {
mysql: { src: '/db-icons/mysql.svg' },
mariadb: { src: '/db-icons/mariadb.svg' },
oceanbase: { src: '/db-icons/oceanbase.png', iconScale: 0.72 },
postgres: { src: '/db-icons/postgres.svg' },
redis: { src: '/db-icons/redis.svg' },
mongodb: { src: '/db-icons/mongodb.svg' },
elasticsearch: { src: '/db-icons/elasticsearch.svg' },
jvm: { src: '/db-icons/jvm.ico', iconScale: 0.72 },
kingbase: { src: '/db-icons/kingbase.ico', iconScale: 0.72 },
dameng: { src: '/db-icons/dameng.png', iconScale: 0.72 },
oracle: { src: '/db-icons/oracle.ico', iconScale: 0.72 },
sqlserver: { src: '/db-icons/sqlserver.svg' },
clickhouse: { src: '/db-icons/clickhouse.svg' },
sqlite: { src: '/db-icons/sqlite.svg' },
duckdb: { src: '/db-icons/duckdb.svg' },
vastbase: { src: '/db-icons/vastbase.svg', iconScale: 0.84 },
opengauss: { src: '/db-icons/opengauss.ico', iconScale: 0.72 },
gaussdb: { src: '/db-icons/gaussdb.ico', iconScale: 0.72 },
goldendb: { src: '/db-icons/goldendb.ico', iconScale: 0.72 },
highgo: { src: '/db-icons/highgo.ico', iconScale: 0.72 },
iris: { src: '/db-icons/iris.png', iconScale: 0.72 },
tdengine: { src: '/db-icons/tdengine.ico', iconScale: 0.72 },
iotdb: {
src: '/db-icons/iotdb.svg',
background: '#0F766E',
borderColor: '#0F766E',
iconScale: 0.82,
},
rocketmq: {
src: '/db-icons/rocketmq.png',
background: '#0F172A',
borderColor: '#EA580C',
iconScale: 0.84,
},
mqtt: {
src: '/db-icons/mqtt.svg',
background: '#0F172A',
borderColor: '#0EA5A4',
iconScale: 0.84,
},
kafka: { src: '/db-icons/kafka.png', iconScale: 0.8 },
rabbitmq: { src: '/db-icons/rabbitmq.svg', iconScale: 0.74 },
chroma: { src: '/db-icons/chroma.svg', iconScale: 0.9 },
qdrant: { src: '/db-icons/qdrant.svg', iconScale: 0.74 },
diros: { src: '/db-icons/diros.svg' },
starrocks: {
src: '/db-icons/starrocks.png',
background: '#0B1021',
borderColor: '#00A6A6',
iconScale: 0.84,
},
sphinx: { src: '/db-icons/sphinx.svg' },
};
const BRAND_ASSET_TYPES = new Set(Object.keys(BRAND_ASSET_CONFIGS));
/** 品牌图标:用 <img> 加载官方 svg/png/ico 资源 */
const BrandAssetIcon: React.FC<{ type: string; size: number; color?: string }> = ({ type, size, color }) => {
const config = BRAND_ASSET_CONFIGS[type.toLowerCase()];
const bgColor = color || config?.borderColor || getDbDefaultColor(type);
const iconScale = config?.iconScale ?? 0.64;
return (
<IconFrame size={size}>
<span style={{
display: 'inline-flex', alignItems: 'center', justifyContent: 'center',
width: size, height: size, borderRadius: size * 0.22,
background: '#fff', border: `1.5px solid ${bgColor}`,
background: config?.background || '#fff', border: `1.5px solid ${bgColor}`,
flexShrink: 0, overflow: 'hidden', boxSizing: 'border-box',
}}>
<img
src={`/db-icons/${type}.svg`}
src={config?.src || `/db-icons/${type}.svg`}
alt={type}
width={Math.round(size * 0.64)}
height={Math.round(size * 0.64)}
width={Math.round(size * iconScale)}
height={Math.round(size * iconScale)}
style={{ display: 'block', objectFit: 'contain' }}
/>
</span>
@@ -99,128 +158,105 @@ const BrandSvgIcon: React.FC<{ type: string; size: number; color?: string }> = (
);
};
// ─── 彩色标签图标fallback ──────────────────────────────
/** 通用彩色标签:填充背景 + 白色粗体缩写 */
const ColorBadge: React.FC<{ size: number; color: string; label: string }> = ({ size, color, label }) => {
const textSize = label.length <= 2 ? size * 0.48 : size * 0.38;
return (
<IconFrame size={size}>
<svg width={size} height={size} viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<rect x="0" y="0" width="24" height="24" rx="5" fill={color}/>
<text
x="12" y="12" dominantBaseline="central" textAnchor="middle"
fontSize={textSize} fontWeight="800"
style={{ fontFamily: 'var(--gn-font-sans, "Inter", "PingFang SC", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", sans-serif)' }}
fill="#fff" letterSpacing={label.length > 2 ? -0.5 : 0}
>
{label}
</text>
</svg>
</IconFrame>
);
};
// ─── 各数据库图标 ───────────────────────────────────────────
// 有品牌 SVG 的数据库
// 有品牌官方资源的数据库
const MySQLIcon: React.FC<DbIconProps> = ({ size = 16, color }) => (
<BrandSvgIcon type="mysql" size={size} color={color} />
<BrandAssetIcon type="mysql" size={size} color={color} />
);
const MariaDBIcon: React.FC<DbIconProps> = ({ size = 16, color }) => (
<BrandSvgIcon type="mariadb" size={size} color={color} />
<BrandAssetIcon type="mariadb" size={size} color={color} />
);
const OceanBaseIcon: React.FC<DbIconProps> = ({ size = 16, color }) => (
<ColorBadge size={size} color={color || DB_DEFAULT_COLORS.oceanbase} label="OB" />
<BrandAssetIcon type="oceanbase" size={size} color={color} />
);
const PostgresIcon: React.FC<DbIconProps> = ({ size = 16, color }) => (
<BrandSvgIcon type="postgres" size={size} color={color} />
<BrandAssetIcon type="postgres" size={size} color={color} />
);
const RedisIcon: React.FC<DbIconProps> = ({ size = 16, color }) => (
<BrandSvgIcon type="redis" size={size} color={color} />
<BrandAssetIcon type="redis" size={size} color={color} />
);
const MongoDBIcon: React.FC<DbIconProps> = ({ size = 16, color }) => (
<BrandSvgIcon type="mongodb" size={size} color={color} />
<BrandAssetIcon type="mongodb" size={size} color={color} />
);
const ClickHouseIcon: React.FC<DbIconProps> = ({ size = 16, color }) => (
<BrandSvgIcon type="clickhouse" size={size} color={color} />
<BrandAssetIcon type="clickhouse" size={size} color={color} />
);
const SQLiteIcon: React.FC<DbIconProps> = ({ size = 16, color }) => (
<BrandSvgIcon type="sqlite" size={size} color={color} />
<BrandAssetIcon type="sqlite" size={size} color={color} />
);
// 无品牌 SVG → 彩色文字标签
const OracleIcon: React.FC<DbIconProps> = ({ size = 16, color }) => (
<ColorBadge size={size} color={color || DB_DEFAULT_COLORS.oracle} label="Or" />
<BrandAssetIcon type="oracle" size={size} color={color} />
);
const SQLServerIcon: React.FC<DbIconProps> = ({ size = 16, color }) => (
<BrandSvgIcon type="sqlserver" size={size} color={color} />
<BrandAssetIcon type="sqlserver" size={size} color={color} />
);
const DorisIcon: React.FC<DbIconProps> = ({ size = 16, color }) => (
<BrandSvgIcon type="diros" size={size} color={color} />
<BrandAssetIcon type="diros" size={size} color={color} />
);
const StarRocksIcon: React.FC<DbIconProps> = ({ size = 16, color }) => (
<ColorBadge size={size} color={color || DB_DEFAULT_COLORS.starrocks} label="SR" />
<BrandAssetIcon type="starrocks" size={size} color={color} />
);
const SphinxIcon: React.FC<DbIconProps> = ({ size = 16, color }) => (
<BrandSvgIcon type="sphinx" size={size} color={color} />
<BrandAssetIcon type="sphinx" size={size} color={color} />
);
const DuckDBIcon: React.FC<DbIconProps> = ({ size = 16, color }) => (
<BrandSvgIcon type="duckdb" size={size} color={color} />
<BrandAssetIcon type="duckdb" size={size} color={color} />
);
const KingBaseIcon: React.FC<DbIconProps> = ({ size = 16, color }) => (
<ColorBadge size={size} color={color || DB_DEFAULT_COLORS.kingbase} label="KB" />
<BrandAssetIcon type="kingbase" size={size} color={color} />
);
const DamengIcon: React.FC<DbIconProps> = ({ size = 16, color }) => (
<ColorBadge size={size} color={color || DB_DEFAULT_COLORS.dameng} label="DM" />
<BrandAssetIcon type="dameng" size={size} color={color} />
);
const VastBaseIcon: React.FC<DbIconProps> = ({ size = 16, color }) => (
<ColorBadge size={size} color={color || DB_DEFAULT_COLORS.vastbase} label="VB" />
<BrandAssetIcon type="vastbase" size={size} color={color} />
);
const OpenGaussIcon: React.FC<DbIconProps> = ({ size = 16, color }) => (
<ColorBadge size={size} color={color || DB_DEFAULT_COLORS.opengauss} label="OG" />
<BrandAssetIcon type="opengauss" size={size} color={color} />
);
const GaussDBIcon: React.FC<DbIconProps> = ({ size = 16, color }) => (
<BrandSvgIcon type="gaussdb" size={size} color={color} />
<BrandAssetIcon type="gaussdb" size={size} color={color} />
);
const GoldenDBIcon: React.FC<DbIconProps> = ({ size = 16, color }) => (
<BrandSvgIcon type="goldendb" size={size} color={color} />
<BrandAssetIcon type="goldendb" size={size} color={color} />
);
const HighGoIcon: React.FC<DbIconProps> = ({ size = 16, color }) => (
<ColorBadge size={size} color={color || DB_DEFAULT_COLORS.highgo} label="HG" />
<BrandAssetIcon type="highgo" size={size} color={color} />
);
const IrisIcon: React.FC<DbIconProps> = ({ size = 16, color }) => (
<ColorBadge size={size} color={color || DB_DEFAULT_COLORS.iris} label="IR" />
<BrandAssetIcon type="iris" size={size} color={color} />
);
const TDengineIcon: React.FC<DbIconProps> = ({ size = 16, color }) => (
<ColorBadge size={size} color={color || DB_DEFAULT_COLORS.tdengine} label="TD" />
<BrandAssetIcon type="tdengine" size={size} color={color} />
);
const IoTDBIcon: React.FC<DbIconProps> = ({ size = 16, color }) => (
<BrandSvgIcon type="iotdb" size={size} color={color} />
<BrandAssetIcon type="iotdb" size={size} color={color} />
);
const RocketMQIcon: React.FC<DbIconProps> = ({ size = 16, color }) => (
<BrandSvgIcon type="rocketmq" size={size} color={color} />
<BrandAssetIcon type="rocketmq" size={size} color={color} />
);
const MQTTIcon: React.FC<DbIconProps> = ({ size = 16, color }) => (
<BrandSvgIcon type="mqtt" size={size} color={color} />
<BrandAssetIcon type="mqtt" size={size} color={color} />
);
const KafkaIcon: React.FC<DbIconProps> = ({ size = 16, color }) => (
<BrandSvgIcon type="kafka" size={size} color={color} />
<BrandAssetIcon type="kafka" size={size} color={color} />
);
const RabbitMQIcon: React.FC<DbIconProps> = ({ size = 16, color }) => (
<BrandSvgIcon type="rabbitmq" size={size} color={color} />
<BrandAssetIcon type="rabbitmq" size={size} color={color} />
);
const ChromaIcon: React.FC<DbIconProps> = ({ size = 16, color }) => (
<BrandSvgIcon type="chroma" size={size} color={color} />
<BrandAssetIcon type="chroma" size={size} color={color} />
);
const QdrantIcon: React.FC<DbIconProps> = ({ size = 16, color }) => (
<BrandSvgIcon type="qdrant" size={size} color={color} />
<BrandAssetIcon type="qdrant" size={size} color={color} />
);
const JVMIcon: React.FC<DbIconProps> = ({ size = 16, color }) => (
<ColorBadge size={size} color={color || DB_DEFAULT_COLORS.jvm} label="JVM" />
<BrandAssetIcon type="jvm" size={size} color={color} />
);
const ElasticsearchIcon: React.FC<DbIconProps> = ({ size = 16, color }) => (
<BrandSvgIcon type="elasticsearch" size={size} color={color} />
<BrandAssetIcon type="elasticsearch" size={size} color={color} />
);
/** Custom — 齿轮图标 */
@@ -239,13 +275,6 @@ const CustomIcon: React.FC<DbIconProps> = ({ size = 16, color }) => {
// ─── 图标注册表 ─────────────────────────────────────────────
const DorisIconFallback: React.FC<DbIconProps> = ({ size = 16, color }) => (
<ColorBadge size={size} color={color || DB_DEFAULT_COLORS.diros} label="Do" />
);
const SphinxIconFallback: React.FC<DbIconProps> = ({ size = 16, color }) => (
<ColorBadge size={size} color={color || DB_DEFAULT_COLORS.sphinx} label="Sp" />
);
const DB_ICON_MAP: Record<string, React.FC<DbIconProps>> = {
mysql: MySQLIcon,
mariadb: MariaDBIcon,
@@ -289,8 +318,8 @@ export const DB_ICON_TYPES: string[] = [
'kingbase', 'dameng', 'vastbase', 'opengauss', 'gaussdb', 'goldendb', 'highgo', 'iris', 'tdengine', 'iotdb', 'rocketmq', 'mqtt', 'kafka', 'rabbitmq', 'chroma', 'qdrant', 'elasticsearch', 'custom',
];
/** 该类型是否有品牌 SVG 文件 */
export const hasBrandSvg = (type: string): boolean => BRAND_SVG_TYPES.has(type?.toLowerCase());
/** 该类型是否有品牌图标资源 */
export const hasBrandSvg = (type: string): boolean => BRAND_ASSET_TYPES.has(type?.toLowerCase());
/** 获取数据库图标 React 节点 */
export const getDbIcon = (type: string, color?: string, size?: number): React.ReactNode => {