From ee114dda501d70424e72eae107488d90fa77941e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BF=97=E7=8F=8F?= Date: Mon, 7 Jul 2025 11:09:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B8=B8=E5=AE=A2=E4=B8=BB?= =?UTF-8?q?=E9=A2=98=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 18 +++++--- data/apps-data.json | 88 ++++++++++++++++++++++++++++++++++++++++ data/guest_settings.json | 8 ++-- data/settings.json | 2 +- templates/index.html | 32 ++++++++------- 5 files changed, 124 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 1618d81..519eadd 100644 --- a/README.md +++ b/README.md @@ -13,12 +13,14 @@ ## 待开发功能 ⏳ ### 界面优化 1. 每行卡片数量支持自定义(4个、5个、6个、8个) -2. 应用的图标支持上传图片自定义 +2. 应用的图标支持上传图片自定义 - 已完成 3. 首页增加页脚 4. 一级分类和二级分类固定宽度,超出宽度可左右滑动查看 -5. 气泡的小箭头靠左对齐 +5. 气泡的小箭头靠左对齐 - 已完成 6. logo图标设置区分明亮和暗黑模式 7. 私有应用在首页添加标识 +8. 首页卡片右键菜单 +9. 应用支持配置多个URL,左键打开默认URL,右键可选择URL进行复制地址或者打开或者编辑应用 ### 功能增强 8. 应用管理页支持分页和按一级分类筛选 @@ -26,9 +28,15 @@ 10. 网站图标自动获取功能 11. 书签收藏工具 +### BUG修复 +12. 应用编辑页面没有回显带入图片 + ### 批量操作 -12. 应用批量选择功能: +13. 应用批量选择功能: - 批量删除 - 批量设置私有化/公有化 -13. 附件批量选择功能: - - 批量删除 \ No newline at end of file +14. 附件批量选择功能: + - 批量删除 + +15. 新增应用界面便捷增加分类 +16. 新增应用界面便捷增加图标图片 \ No newline at end of file diff --git a/data/apps-data.json b/data/apps-data.json index 9a50c34..aec307c 100644 --- a/data/apps-data.json +++ b/data/apps-data.json @@ -136,5 +136,93 @@ "main": "ai", "sub": "image" } + }, + { + "title": "77777", + "url": "https://baidu.com", + "icon": "/upload/icon/7fb7491311f7477e9e3bd17150a929b7.png", + "description": "", + "private": false, + "category": { + "main": "ai", + "sub": "writing" + } + }, + { + "title": "88888", + "url": "https://baidu.com", + "icon": "fa-solid fa-flushed", + "description": "", + "private": false, + "category": { + "main": "ai", + "sub": "image" + } + }, + { + "title": "99999", + "url": "https://baidu.com", + "icon": "fa-solid fa-calculator", + "description": "", + "private": false, + "category": { + "main": "edu", + "sub": "language" + } + }, + { + "title": "12121", + "url": "https://baidu.com", + "icon": "fa-solid fa-heart", + "description": "", + "private": false, + "category": { + "main": "law", + "sub": "criminal" + } + }, + { + "title": "12123", + "url": "https://baidu.com", + "icon": "fa-solid fa-graduation-cap", + "description": "", + "private": false, + "category": { + "main": "edu", + "sub": "language" + } + }, + { + "title": "57567", + "url": "https://baidu.com", + "icon": "fa-solid fa-carrot", + "description": "", + "private": false, + "category": { + "main": "law", + "sub": "criminal" + } + }, + { + "title": "ythtyh", + "url": "https://baidu.com", + "icon": "fa-solid fa-clock", + "description": "", + "private": false, + "category": { + "main": "law", + "sub": "criminal" + } + }, + { + "title": "dsfds", + "url": "https://baidu.com", + "icon": "fa-solid fa-robot", + "description": "", + "private": false, + "category": { + "main": "edu", + "sub": "language" + } } ] \ No newline at end of file diff --git a/data/guest_settings.json b/data/guest_settings.json index 804a7fd..f01a7f6 100644 --- a/data/guest_settings.json +++ b/data/guest_settings.json @@ -1,6 +1,6 @@ { - "theme": "light", - "card_style": "normal", - "bg_image": "/upload/background/5dd4f5d3cd7b48eca9967fa063ea5cd9.png", - "dark_bg_image": "/upload/background/d078c01de3be46deab9e85a94285d785.png" + "theme": "dark", + "card_style": "compact", + "bg_image": "/static/background_light.jpg", + "dark_bg_image": "none" } \ No newline at end of file diff --git a/data/settings.json b/data/settings.json index 9c43046..a68e9d8 100644 --- a/data/settings.json +++ b/data/settings.json @@ -1,7 +1,7 @@ { "card_style": "compact", "search_history": [], - "theme": "dark", + "theme": "light", "bg_image": "/upload/background/5dd4f5d3cd7b48eca9967fa063ea5cd9.png", "dark_bg_image": "/upload/background/d078c01de3be46deab9e85a94285d785.png", "site_title": "应用导航", diff --git a/templates/index.html b/templates/index.html index af8e011..35d61e2 100644 --- a/templates/index.html +++ b/templates/index.html @@ -561,12 +561,12 @@ body.dark-theme .app-url { .app-description { position: absolute; bottom: calc(100% + 10px); - left: 50%; - transform: translateX(-50%); + left: 20px; /* 调整左侧位置 */ + transform: none; /* 移除水平居中转换 */ background-color: var(--tooltip-bg); color: var(--tooltip-text); padding: 10px 15px; - border-radius: 12px; + border-radius: 4px; font-size: 14px; max-width: 300px; width: max-content; @@ -574,17 +574,17 @@ body.dark-theme .app-url { transition: opacity 0.3s; pointer-events: none; z-index: 100; - text-align: center; - box-shadow: 0 2px 10px rgba(0,0,0,0.2); text-align: left; + box-shadow: 0 2px 10px rgba(0,0,0,0.2); } -/* 聊天气泡的小三角 */ + +/* 修改后的聊天气泡小三角 - 移到左侧 */ .app-description::after { content: ''; position: absolute; top: 100%; - left: 50%; - transform: translateX(-50%); + left: 20px; /* 调整与气泡对齐 */ + transform: none; /* 移除水平居中转换 */ border-width: 8px; border-style: solid; border-color: var(--tooltip-bg) transparent transparent transparent; @@ -1145,6 +1145,10 @@ async function loadSettings() { // 检查是否登录 isLoggedIn = await checkLoginStatus(); + // 获取游客默认背景设置 + const guestResponse = await fetch('/api/guest_settings'); + const guestSettings = await guestResponse.json(); + if (isLoggedIn) { // 如果已登录,从服务器获取系统设置 const response = await fetch('/api/settings'); @@ -1163,15 +1167,15 @@ async function loadSettings() { if (localSettings) { const localSettingsObj = JSON.parse(localSettings); // 从本地存储加载主题和卡片样式 - settings.theme = localSettingsObj.theme || 'auto'; - settings.card_style = localSettingsObj.card_style || 'normal'; + settings.theme = localSettingsObj.theme || guestSettings.theme; + settings.card_style = localSettingsObj.card_style || guestSettings.card_style; settings.search_history = localSettingsObj.search_history || []; + } else { + // 首次访问,使用接口返回的默认配置 + settings.theme = guestSettings.theme; + settings.card_style = guestSettings.card_style; } - // 获取游客默认背景设置 - const guestResponse = await fetch('/api/guest_settings'); - const guestSettings = await guestResponse.json(); - // 设置背景图片(始终使用服务器配置) const lightBg = guestSettings.bg_image === 'none' ? 'none' : (guestSettings.bg_image || '/static/background_light.jpg');