fix: add noqa comments to platform adapter imports and update theme files

- Add F401 suppression to lazy-loaded platform adapter imports
- Update BlueBusiness theme files
- Add ThemeType definitions and WelcomePage enhancements
This commit is contained in:
LIghtJUNction
2026-03-29 18:16:28 +08:00
parent 158a26cac8
commit 0dd91f1d10
5 changed files with 158 additions and 74 deletions

View File

@@ -151,65 +151,65 @@ class PlatformManager:
)
match platform_config["type"]:
case "aiocqhttp":
from .sources.aiocqhttp.aiocqhttp_platform_adapter import (
from .sources.aiocqhttp.aiocqhttp_platform_adapter import ( # noqa: F401
AiocqhttpAdapter,
)
case "qq_official":
from .sources.qqofficial.qqofficial_platform_adapter import (
from .sources.qqofficial.qqofficial_platform_adapter import ( # noqa: F401
QQOfficialPlatformAdapter,
)
case "qq_official_webhook":
from .sources.qqofficial_webhook.qo_webhook_adapter import (
from .sources.qqofficial_webhook.qo_webhook_adapter import ( # noqa: F401
QQOfficialWebhookPlatformAdapter,
)
case "lark":
from .sources.lark.lark_adapter import (
from .sources.lark.lark_adapter import ( # noqa: F401
LarkPlatformAdapter,
)
case "dingtalk":
from .sources.dingtalk.dingtalk_adapter import (
from .sources.dingtalk.dingtalk_adapter import ( # noqa: F401
DingtalkPlatformAdapter,
)
case "telegram":
from .sources.telegram.tg_adapter import (
from .sources.telegram.tg_adapter import ( # noqa: F401
TelegramPlatformAdapter,
)
case "wecom":
from .sources.wecom.wecom_adapter import (
from .sources.wecom.wecom_adapter import ( # noqa: F401
WecomPlatformAdapter,
)
case "wecom_ai_bot":
from .sources.wecom_ai_bot.wecomai_adapter import (
from .sources.wecom_ai_bot.wecomai_adapter import ( # noqa: F401
WecomAIBotAdapter,
)
case "weixin_official_account":
from .sources.weixin_official_account.weixin_offacc_adapter import (
from .sources.weixin_official_account.weixin_offacc_adapter import ( # noqa: F401
WeixinOfficialAccountPlatformAdapter,
)
case "discord":
from .sources.discord.discord_platform_adapter import (
from .sources.discord.discord_platform_adapter import ( # noqa: F401
DiscordPlatformAdapter,
)
case "misskey":
from .sources.misskey.misskey_adapter import (
from .sources.misskey.misskey_adapter import ( # noqa: F401
MisskeyPlatformAdapter,
)
case "weixin_oc":
from .sources.weixin_oc.weixin_oc_adapter import (
from .sources.weixin_oc.weixin_oc_adapter import ( # noqa: F401
WeixinOCAdapter,
)
case "slack":
from .sources.slack.slack_adapter import SlackAdapter
from .sources.slack.slack_adapter import SlackAdapter # noqa: F401
case "satori":
from .sources.satori.satori_adapter import (
from .sources.satori.satori_adapter import ( # noqa: F401
SatoriPlatformAdapter,
)
case "line":
from .sources.line.line_adapter import (
from .sources.line.line_adapter import ( # noqa: F401
LinePlatformAdapter,
)
case "kook":
from .sources.kook.kook_adapter import (
from .sources.kook.kook_adapter import ( # noqa: F401
KookPlatformAdapter,
)
except (ImportError, ModuleNotFoundError) as e:

View File

@@ -14,72 +14,72 @@ const BlueBusinessDarkTheme: ThemeTypes = {
name: DARK_THEME_NAME,
dark: true,
variables: {
"border-color": "#A1C9FF",
"border-color": "#1F2124",
"carousel-control-size": 10,
},
colors: {
// === MD3 Core Colors (Business Blue - Dark Mode) ===
primary: "#A1C9FF", // Lighter blue for better contrast on dark
"primary-darken-1": "#5BA4FF", // Hover state blue
secondary: "#CCC2DC", // Light purple-gray
"secondary-darken-1": "#B8B0C8", // Hover state
// === MD3 Core Colors (Cherenkov Energy - Deep Reactor) ===
primary: "#00F2FF", // Cherenkov blue — high-energy particle light
"primary-darken-1": "#00C4CC", // Cherenkov hover
secondary: "#636366", // Lead gray — does not compete for visual focus
"secondary-darken-1": "#4A4A4D", // Hover state
tertiary: "#7DD9CC", // Light teal
"tertiary-darken-1": "#5FCBBA", // Hover state
// === MD3 Semantic Colors (Dark Mode) ===
info: "#4DD0E1", // Cyan - informational
success: "#69F0AE", // Green - success states
warning: "#FFD54F", // Amber - warnings
error: "#FFB4AB", // Light red - errors
// === MD3 Semantic Colors (Cherenkov Energy) ===
info: "#00C8E8", // Cherenkov info cyan
success: "#00C7BE", // Mint — industrial precision green
warning: "#FF9500", // Amber —仪表盘警示感
error: "#FF3B30", // Lava red —故障告警
// === MD3 Container Colors (Dark Mode - darker containers) ===
"primary-container": "#004A8F", // Dark blue container
"on-primary-container": "#D8E2FF", // Light text on container
"secondary-container": "#3F4354", // Dark gray-blue container
"on-secondary-container": "#D8E2EC", // Light text on container
// === MD3 Container Colors (Dark Mode - deeper containers) ===
"primary-container": "#004A55", // Deep cyan container
"on-primary-container": "#A0F7FF", // Light text on container
"secondary-container": "#2A2A2E", // Dark gray container
"on-secondary-container": "#C8C8CC", // Light text on container
"tertiary-container": "#00574A", // Dark teal container
"on-tertiary-container": "#9CF1E8", // Light text on container
"error-container": "#93000A", // Dark red container
"error-container": "#3D0D0A", // Deep red container
"on-error-container": "#FFDAD6", // Light text on container
// === MD3 Surface Colors (Dark Mode) ===
surface: "#0F0F12", // Very dark background for reactor aesthetic
"on-surface": "#E4E1E6", // Light text on dark surface
"surface-variant": "#1A1A22", // Elevated dark surface (glassmorphism layer)
"on-surface-variant": "#C4C6D0", // Light text on variant
surfaceTint: "#A1C9FF", // Blue tint for elevation
// === MD3 Surface Colors (Cherenkov Energy —极黑背景) ===
surface: "#0D0D0F", // Dark glass —磨砂钛金,带 0.4 透明度
"on-surface": "#E2E2E7", // Light text on dark surface
"surface-variant": "#1A1A1E", // Elevated dark surface (glassmorphism layer)
"on-surface-variant": "#636366", // Muted — does not compete for focus
surfaceTint: "#00F2FF", // Cherenkov blue tint for elevation
// === MD3 Outline Colors (Dark Mode) ===
outline: "#8E9099", // Borders in dark mode
"outline-variant": "#44474F", // Subtle borders
// === MD3 Outline Colors (Industrial — cold gray 1px) ===
outline: "#1F2124", // Industrial lines — cold gray
"outline-variant": "#2A2A2E", // Subtle borders
// === MD3 Inverse Colors (Dark Mode becomes light) ===
"inverse-surface": "#E4E1E6", // Light surface
"inverse-surface": "#E2E2E7", // Light surface
"inverse-on-surface": "#303033", // Dark text on light
"inverse-primary": "#005FB0", // Dark primary on light
"inverse-primary": "#004A55", // Dark primary on light
// === Additional UI Colors ===
background: "#0A0A0C", // Deep reactor black
background: "#050507", // Absolute abyss —屏蔽所有杂光
accent: "#FFAB91", // Peach accent
// === Light Variant Colors (inverted for dark mode) ===
lightprimary: "#1A3A5C", // Dark blue for subtle backgrounds
lightsecondary: "#2A2D38", // Dark gray for subtle backgrounds
lightsuccess: "#1B3D1F", // Dark green
lighterror: "#4D1F1F", // Dark red
lightwarning: "#4D3D00", // Dark amber
lightprimary: "#003544", // Deep Cherenkov for subtle backgrounds
lightsecondary: "#2A2A2E", // Dark gray for subtle backgrounds
lightsuccess: "#003D35", // Deep mint
lighterror: "#3D0D0A", // Deep red
lightwarning: "#3D2800", // Deep amber
// === Text Colors ===
primaryText: "#D8E2FF", // Light text
secondaryText: "#C4C6D0", // Muted light text
primaryText: "#E2E2E7", // Light text
secondaryText: "#636366", // Muted gray
// === Border Colors ===
borderLight: "#43444E", // Light borders on dark
border: "#303033", // Default dark border
inputBorder: "#8E9099", // Input borders
borderLight: "#2A2A2E", // Subtle borders on dark
border: "#1F2124", // Default dark border — industrial gray
inputBorder: "#3A3A3E", // Input borders
// === Container/Card Colors ===
containerBg: "rgba(20, 20, 25, 0.4)", // Translucent glassmorphism cards
containerBg: "rgba(13, 13, 15, 0.6)", // Dark glass with backdrop blur
"on-surface-variant-bg": "rgba(26, 26, 34, 0.5)", // Slightly lighter glassmorphism
// === Social Colors ===

View File

@@ -16,25 +16,25 @@ const BlueBusinessLightTheme: ThemeTypes = {
name: LIGHT_THEME_NAME,
dark: false,
variables: {
"border-color": "#005FB0",
"border-color": "#003153",
"carousel-control-size": 10,
},
colors: {
// === MD3 Core Colors (Business Blue) ===
primary: "#005FB0", // Deep blue - main brand color
"primary-darken-1": "#004A8F", // Darker primary for hover states
secondary: "#565E71", // Cool gray-blue - secondary components
"secondary-darken-1": "#454859", // Darker secondary
tertiary: "#006B5B", // Teal - tertiary accent
// === MD3 Core Colors (Blueprint Prussian Blue) ===
primary: "#003153", // Prussian Blue — serious, not flashy
"primary-darken-1": "#001F33", // Darker for hover states
secondary: "#3A4A5C", // Cool gray-blue — restrained
"secondary-darken-1": "#2A3A4C", // Darker secondary
tertiary: "#006B5B", // Teal — restrained accent
"tertiary-darken-1": "#00574A", // Darker tertiary
// === MD3 Semantic Colors ===
info: "#03C9D7", // Cyan - informational
success: "#00C853", // Green - success states
warning: "#FFB300", // Amber - warnings
error: "#BA1A1A", // Red - errors
// === MD3 Semantic Colors (Industrial — muted, not flashy) ===
info: "#00B2D4", // Arc cyan — 高亮交互点
success: "#00C7BE", // Mint — industrial precision
warning: "#FF9500", // Amber —仪表盘警示感
error: "#8B0000", // Deep red —严肃感
// === MD3 Container Colors (lighter tones) ===
// === MD3 Container Colors (Blueprint — subtle tonal elevation) ===
"primary-container": "#D8E2FF", // Light blue container
"on-primary-container": "#001A41", // Text on primary container
"secondary-container": "#D8E2EC", // Light gray-blue container
@@ -44,12 +44,12 @@ const BlueBusinessLightTheme: ThemeTypes = {
"error-container": "#FFDAD6", // Light red container
"on-error-container": "#410002", // Text on error container
// === MD3 Surface Colors (Blueprint/Lab White) ===
// === MD3 Surface Colors (Blueprint Lab) ===
surface: "#F0F4F8", // Cool blue-gray lab white
"on-surface": "#1A2B3C", // Deep indigo text
"surface-variant": "#E4E9F2", // Slightly deeper surface
"on-surface-variant": "#3A4A5C", // Muted indigo text
surfaceTint: "#005FB0", // Tint overlay for elevation
surfaceTint: "#003153", // Prussian Blue tint overlay
// === MD3 Outline Colors ===
outline: "#74777F", // Borders and dividers
@@ -128,9 +128,9 @@ const BlueBusinessLightTheme: ThemeTypes = {
preBg: "#F8F9FF",
code: "#1B1B1F",
// === Chat Bubble Colors ===
chatMessageBubble: "#E8EDF5", // User message bubble
chatAssistantBubble: "#D8E2FF", // Assistant message bubble
// === Chat Bubble Colors (Blueprint — tinted, not white) ===
chatMessageBubble: "#DDE3ED", // User bubble — cool blue-gray
chatAssistantBubble: "#EEF2FA", // Assistant bubble — blueprint paper
// === Component Specific ===
mcpCardBg: "#F5F7FF",

View File

@@ -33,6 +33,24 @@ export type ThemeTypes = {
gray100?: string;
primary200?: string;
secondary200?: string;
"primary-darken-1"?: string;
"secondary-darken-1"?: string;
"tertiary-darken-1"?: string;
"primary-container"?: string;
"on-primary-container"?: string;
"secondary-container"?: string;
"on-secondary-container"?: string;
"tertiary-container"?: string;
"on-tertiary-container"?: string;
"error-container"?: string;
"on-error-container"?: string;
"on-surface"?: string;
"surface-variant"?: string;
surfaceTint?: string;
"outline-variant"?: string;
"inverse-surface"?: string;
"inverse-on-surface"?: string;
"inverse-primary"?: string;
codeBg?: string;
preBg?: string;
code?: string;

View File

@@ -656,4 +656,70 @@ watch(showProviderDialog, async (visible, wasVisible) => {
border-radius: 4px;
font-weight: bold;
}
/* === Welcome hero text: industrial precision — restrained monospace === */
.welcome-page .text-h1 {
font-family: "JetBrains Mono", "Fira Code", monospace !important;
font-size: clamp(1.8rem, 4vw, 3rem) !important;
font-weight: 700 !important;
/* Restrained precision — readable gray, not flashy neon */
color: rgba(228, 225, 230, 0.85) !important;
letter-spacing: 0.5px;
position: relative;
padding-left: 16px;
animation: welcomeFadeIn 0.8s ease-out both;
/* 2px thin precision tick mark (not a glowing bar) */
&::before {
content: "";
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
width: 2px;
height: 55%;
background: rgba(0, 242, 255, 0.45);
border-radius: 1px;
}
}
.welcome-page .text-subtitle-1 {
font-family: "JetBrains Mono", monospace !important;
font-size: 0.9rem !important;
color: rgba(228, 225, 230, 0.4) !important;
animation: welcomeFadeIn 0.8s ease-out 0.3s both;
letter-spacing: 0.3px;
}
.welcome-page .text-h3 {
font-family: "JetBrains Mono", monospace !important;
font-weight: 600 !important;
color: rgba(228, 225, 230, 0.75) !important;
font-size: 1rem !important;
letter-spacing: 0.5px;
text-transform: uppercase;
border-left: 2px solid rgba(0, 242, 255, 0.3) !important;
padding-left: 10px !important;
}
@keyframes welcomeFadeIn {
from {
opacity: 0;
transform: translateY(8px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes energyPulse {
0%, 100% {
opacity: 0.6;
box-shadow: 0 0 6px rgba(0, 242, 255, 0.4);
}
50% {
opacity: 1;
box-shadow: 0 0 14px rgba(0, 242, 255, 0.8);
}
}
</style>