diff --git a/README.md b/README.md index 07237bfa4..4e8c1a829 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@

-![da32a1f2-8da6-46a6-8516-5ed57d50e4b9](https://github.com/user-attachments/assets/39dc39ae-9003-434b-81a6-006b3de5e7c2) - +![AstrBot-Logo-Simplified](https://github.com/user-attachments/assets/ffd99b6b-3272-4682-beaa-6fe74250f7d9)

diff --git a/astrbot/core/platform/sources/dingtalk/dingtalk_event.py b/astrbot/core/platform/sources/dingtalk/dingtalk_event.py index 4834032f5..c2188dc36 100644 --- a/astrbot/core/platform/sources/dingtalk/dingtalk_event.py +++ b/astrbot/core/platform/sources/dingtalk/dingtalk_event.py @@ -32,31 +32,31 @@ class DingtalkMessageEvent(AstrMessageEvent): ) elif isinstance(segment, Comp.Image): markdown_str = "" - if segment.file and segment.file.startswith("file:///"): - logger.warning( - "dingtalk only support url image, not: " + segment.file - ) - continue - elif segment.file and segment.file.startswith("http"): - markdown_str += f"![image]({segment.file})\n\n" - elif segment.file and segment.file.startswith("base64://"): - logger.warning("dingtalk only support url image, not base64") - continue - else: - logger.warning( - "dingtalk only support url image, not: " + segment.file - ) - continue - ret = await asyncio.get_event_loop().run_in_executor( - None, - client.reply_markdown, - "😄", - markdown_str, - self.message_obj.raw_message, - ) - logger.debug(f"send image: {ret}") + try: + if not segment.file: + logger.warning("钉钉图片 segment 缺少 file 字段,跳过") + continue + if segment.file.startswith(("http://", "https://")): + image_url = segment.file + else: + image_url = await segment.register_to_file_service() + markdown_str = f"![image]({image_url})\n\n" + + ret = await asyncio.get_event_loop().run_in_executor( + None, + client.reply_markdown, + "😄", + markdown_str, + self.message_obj.raw_message, + ) + logger.debug(f"send image: {ret}") + + except Exception as e: + logger.error(f"钉钉图片处理失败: {e}") + logger.warning(f"跳过图片发送: {image_path}") + continue async def send(self, message: MessageChain): await self.send_with_client(self.client, message) await super().send(message) diff --git a/astrbot/core/star/star_manager.py b/astrbot/core/star/star_manager.py index 13c93f226..3dd4cd1cf 100644 --- a/astrbot/core/star/star_manager.py +++ b/astrbot/core/star/star_manager.py @@ -652,7 +652,11 @@ class PluginManager: plugin_info = None if plugin: - plugin_info = {"repo": plugin.repo, "readme": cleaned_content} + plugin_info = { + "repo": plugin.repo, + "readme": cleaned_content, + "name": plugin.name, + } return plugin_info @@ -847,6 +851,10 @@ class PluginManager: plugin_info = None if plugin: - plugin_info = {"repo": plugin.repo, "readme": readme_content} + plugin_info = { + "repo": plugin.repo, + "readme": readme_content, + "name": plugin.name, + } return plugin_info diff --git a/dashboard/src/components/shared/Logo.vue b/dashboard/src/components/shared/Logo.vue index 2b77ccefa..6a071d979 100644 --- a/dashboard/src/components/shared/Logo.vue +++ b/dashboard/src/components/shared/Logo.vue @@ -5,7 +5,7 @@ AstrBot Logo
-

{{ title }}

+

{{ title }}

{{ subtitle }}

diff --git a/dashboard/src/layouts/full/vertical-sidebar/VerticalSidebar.vue b/dashboard/src/layouts/full/vertical-sidebar/VerticalSidebar.vue index 82f160746..70c5d5d82 100644 --- a/dashboard/src/layouts/full/vertical-sidebar/VerticalSidebar.vue +++ b/dashboard/src/layouts/full/vertical-sidebar/VerticalSidebar.vue @@ -160,25 +160,23 @@ function endDrag() { width="220" :rail="customizer.mini_sidebar" > - - - -
- - 🔧 设置 - -
- - 官方文档 - -
- - GitHub - -
- + diff --git a/dashboard/src/layouts/full/vertical-sidebar/sidebarItem.ts b/dashboard/src/layouts/full/vertical-sidebar/sidebarItem.ts index e8f49c741..8495ece41 100644 --- a/dashboard/src/layouts/full/vertical-sidebar/sidebarItem.ts +++ b/dashboard/src/layouts/full/vertical-sidebar/sidebarItem.ts @@ -41,22 +41,17 @@ const sidebarItem: menu[] = [ to: '/config', }, { - title: '插件管理', + title: '插件', icon: 'mdi-puzzle', to: '/extension' }, - { - title: '插件市场', - icon: 'mdi-storefront', - to: '/extension-marketplace' - }, { title: '聊天', icon: 'mdi-chat', to: '/chat' }, { - title: '对话数据库', + title: '对话数据', icon: 'mdi-database', to: '/conversation' }, diff --git a/dashboard/src/router/MainRoutes.ts b/dashboard/src/router/MainRoutes.ts index 0c2d9cf03..f3dd22a32 100644 --- a/dashboard/src/router/MainRoutes.ts +++ b/dashboard/src/router/MainRoutes.ts @@ -19,7 +19,7 @@ const MainRoutes = { { name: 'ExtensionMarketplace', path: '/extension-marketplace', - component: () => import('@/views/ExtensionMarketplace.vue') + component: () => import('@/views/ExtensionPage.vue') }, { name: 'Platforms', diff --git a/dashboard/src/scss/components/_VTextField.scss b/dashboard/src/scss/components/_VTextField.scss index c74c9dadc..b9572aa74 100644 --- a/dashboard/src/scss/components/_VTextField.scss +++ b/dashboard/src/scss/components/_VTextField.scss @@ -10,6 +10,69 @@ .v-field__outline { color: rgb(var(--v-theme-inputBorder)); } + +// 亮色主题样式 +.v-theme--PurpleTheme .v-text-field .v-field__outline { + --v-field-border-width: 2px !important; + --v-field-border-opacity: 1 !important; + color: rgba(149, 117, 205, 0.6) !important; + border-color: rgba(149, 117, 205, 0.6) !important; +} + +.v-theme--PurpleTheme .v-text-field:hover .v-field__outline { + --v-field-border-width: 2px !important; + --v-field-border-opacity: 1 !important; + color: rgba(149, 117, 205, 0.6) !important; + border-color: rgba(149, 117, 205, 0.6) !important; +} + +.v-theme--PurpleTheme .v-text-field .v-field--focused .v-field__outline { + --v-field-border-width: 2.5px !important; + --v-field-border-opacity: 1 !important; + color: rgba(149, 117, 205, 0.8) !important; + border-color: rgba(149, 117, 205, 0.8) !important; +} + +// 深色主题样式 +.v-theme--PurpleThemeDark .v-text-field .v-field { + background-color: rgba(255, 255, 255, 0.08) !important; +} + +.v-theme--PurpleThemeDark .v-text-field .v-field__outline { + --v-field-border-width: 2px !important; + --v-field-border-opacity: 1 !important; + color: rgba(255, 255, 255, 0.5) !important; + border-color: rgba(255, 255, 255, 0.5) !important; +} + +.v-theme--PurpleThemeDark .v-text-field:hover .v-field__outline { + --v-field-border-width: 2px !important; + --v-field-border-opacity: 1 !important; + color: rgba(255, 255, 255, 0.7) !important; + border-color: rgba(255, 255, 255, 0.7) !important; +} + +.v-theme--PurpleThemeDark .v-text-field .v-field--focused .v-field__outline { + --v-field-border-width: 2.5px !important; + --v-field-border-opacity: 1 !important; + color: rgb(129, 102, 176) !important; + border-color: rgb(126, 99, 171) !important; +} + +.v-theme--PurpleThemeDark .v-text-field input { + color: #ffffff !important; + font-weight: 500; +} + +.v-theme--PurpleThemeDark .v-text-field .v-field__label { + color: rgba(255, 255, 255, 0.8) !important; +} + +.v-theme--PurpleThemeDark .v-text-field .v-field__prepend-inner .v-icon, +.v-theme--PurpleThemeDark .v-text-field .v-field__append-inner .v-icon { + color: rgba(255, 255, 255, 0.8) !important; +} + .inputWithbg { .v-field--variant-outlined { background-color: rgba(0, 0, 0, 0.025); diff --git a/dashboard/src/scss/layout/_sidebar.scss b/dashboard/src/scss/layout/_sidebar.scss index e530d7f30..032af62a1 100644 --- a/dashboard/src/scss/layout/_sidebar.scss +++ b/dashboard/src/scss/layout/_sidebar.scss @@ -4,7 +4,7 @@ box-shadow: none !important; } .listitem { - height: calc(100vh - 100px); + overflow-y: auto; .v-list { color: rgb(var(--v-theme-secondaryText)); } @@ -16,6 +16,39 @@ color: rgb(var(--v-theme-secondary)); } } +} + +// 深色主题下的侧边栏悬停和选中样式 +.v-theme--PurpleThemeDark .leftSidebar { + .listitem { + .v-list-group__items .v-list-item, + .v-list-item { + &:hover { + color: #b794f6 !important; + + .v-list-item-title { + color: #b794f6 !important; + } + + .v-icon { + color: #b794f6 !important; + } + } + + // 选中状态的样式 + &.v-list-item--active { + color: #b794f6 !important; + + .v-list-item-title { + color: #b794f6 !important; + } + + .v-icon { + color: #b794f6 !important; + } + } + } + } .v-list-item--density-default.v-list-item--one-line { min-height: 42px; } @@ -52,3 +85,34 @@ } } } + +// 新的flex布局样式 +.leftSidebar { + .sidebar-container { + display: flex; + flex-direction: column; + height: 100%; + + .flex-grow-1 { + flex: 1 1 auto; + overflow-y: auto; + } + + .sidebar-footer { + padding: 16px; + background: inherit; + display: flex; + flex-direction: column; + align-items: center; + font-size: 13px; + text-align: center; + flex-shrink: 0; + + .v-btn { + width: 100%; + max-width: 180px; + margin-bottom: 8px !important; + } + } + } +} diff --git a/dashboard/src/views/ChatBoxPage.vue b/dashboard/src/views/ChatBoxPage.vue index 45b23ec18..007d399e8 100644 --- a/dashboard/src/views/ChatBoxPage.vue +++ b/dashboard/src/views/ChatBoxPage.vue @@ -1,13 +1,18 @@ \ No newline at end of file diff --git a/dashboard/src/views/ExtensionPage.vue b/dashboard/src/views/ExtensionPage.vue index 5c9649246..681f66a59 100644 --- a/dashboard/src/views/ExtensionPage.vue +++ b/dashboard/src/views/ExtensionPage.vue @@ -1,16 +1,16 @@ - 已安装的插件 + AstrBot 插件 - 管理已经安装的所有插件 + 管理、安装 AstrBot 插件 - - - - - - mdi-view-grid - - - mdi-view-list - - + + - - {{ showReserved ? '隐藏系统插件' : '显示系统插件' }} - - - - 平台命令配置 - - - - -
- - -
+
+ + + mdi-puzzle + 已安装插件 + + + mdi-store + 插件市场 + + + + - - - - - - + + mdi-view-list + + - - -
- - - diff --git a/dashboard/src/views/authentication/auth/LoginPage.vue b/dashboard/src/views/authentication/auth/LoginPage.vue index 63caeda47..2eeb78cc9 100644 --- a/dashboard/src/views/authentication/auth/LoginPage.vue +++ b/dashboard/src/views/authentication/auth/LoginPage.vue @@ -9,6 +9,14 @@ import {useCustomizerStore} from "@/stores/customizer"; const cardVisible = ref(false); const router = useRouter(); const authStore = useAuthStore(); +const customizer = useCustomizerStore(); + +// 主题切换函数 +function toggleTheme() { + customizer.SET_UI_THEME( + customizer.uiTheme === 'PurpleThemeDark' ? 'PurpleTheme' : 'PurpleThemeDark' + ); +} onMounted(() => { // 检查用户是否已登录,如果已登录则重定向 @@ -27,6 +35,25 @@ onMounted(() => {