mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-15 17:30:13 +08:00
fix(dashboard): AddNewPlatform - show platform-specific MDI icon when logo unavailable
This commit is contained in:
@@ -56,6 +56,9 @@
|
||||
margin-right: 16px;
|
||||
"
|
||||
/>
|
||||
<v-icon v-else :color="getPlatformColor(item.raw)">
|
||||
{{ getPlatformIconName(item.raw) }}
|
||||
</v-icon>
|
||||
</template>
|
||||
</v-list-item>
|
||||
</template>
|
||||
@@ -795,6 +798,52 @@ export default {
|
||||
return getPlatformIcon(platformType);
|
||||
},
|
||||
getPlatformDescription,
|
||||
getPlatformIconName(name) {
|
||||
const iconMap = {
|
||||
aiocqhttp: "mdi-robot",
|
||||
qq_official: "mdi-qqchat",
|
||||
qq_official_webhook: "mdi-qqchat",
|
||||
telegram: "mdi-telegram",
|
||||
discord: "mdi-discord",
|
||||
wecom: "mdi-microsoft-teams",
|
||||
wecom_ai_bot: "mdi-microsoft-teams",
|
||||
weixin_oc: "mdi-wechat",
|
||||
weixin_official_account: "mdi-wechat",
|
||||
lark: "mdi-feishu",
|
||||
dingtalk: "mdi-bubble-outline",
|
||||
slack: "mdi-slack",
|
||||
kook: "mdi-controller",
|
||||
vocechat: "mdi-message-text",
|
||||
satori: "mdi-api",
|
||||
misskey: "mdi-alpha",
|
||||
line: "mdi-message",
|
||||
webchat: "mdi-chat",
|
||||
};
|
||||
return iconMap[name] || "mdi-earth";
|
||||
},
|
||||
getPlatformColor(name) {
|
||||
const colorMap = {
|
||||
aiocqhttp: "#12c2e9",
|
||||
qq_official: "#12c2e9",
|
||||
qq_official_webhook: "#12c2e9",
|
||||
telegram: "#26a5e4",
|
||||
discord: "#5865f2",
|
||||
wecom: "#07c160",
|
||||
wecom_ai_bot: "#07c160",
|
||||
weixin_oc: "#07c160",
|
||||
weixin_official_account: "#07c160",
|
||||
lark: "#4a90e2",
|
||||
dingtalk: "#1677ff",
|
||||
slack: "#4a154b",
|
||||
kook: "#f47b20",
|
||||
vocechat: "#7b68ee",
|
||||
satori: "#9b59b6",
|
||||
misskey: "#86b300",
|
||||
line: "#00b900",
|
||||
webchat: "#00acee",
|
||||
};
|
||||
return colorMap[name] || "grey";
|
||||
},
|
||||
resetForm() {
|
||||
this.selectedPlatformType = null;
|
||||
this.selectedPlatformConfig = null;
|
||||
|
||||
Reference in New Issue
Block a user