diff --git a/README.en.md b/README.en.md
index 25c98223..b938cb15 100644
--- a/README.en.md
+++ b/README.en.md
@@ -349,11 +349,12 @@ Execute **pnpm run commit** to invoke _git commit_ interaction, complete informa
|---------|----------|--------|---------|
| 2025-09-03 | **烛火** | `¥500` |  |
| 2025-09-05 | **Orion** | `¥200` |  |
-| 2025-08-26 | **唐勇** | `¥200` |  |
+| 2025-10-23 | **唐勇** | `¥400` |  |
| 2025-04-25 | **上官俊斌** | `¥200` |  |
| 2025-05-27 | **临安居士** | `¥188` |  |
| 2025-04-20 | **姜兴(Simon)** | `¥188` |  |
| 2025-02-17 | **禾硕** | `¥168` |  |
+| 2025-10-16 | **xx豪** | `¥101` |  |
| 2025-10-15 | **兵** | `¥100` |  |
| 2025-08-13 | **zhongjing** | `¥100` |  |
| 2025-07-15 | **粉兔** | `¥100` |  |
diff --git a/README.md b/README.md
index 43d31801..730f52ab 100644
--- a/README.md
+++ b/README.md
@@ -352,11 +352,12 @@ sudo xattr -r -d com.apple.quarantine /Applications/应用名称.app
|---------|----------|--------|---------|
| 2025-09-03 | **烛火** | `¥500` |  |
| 2025-09-05 | **Orion** | `¥200` |  |
-| 2025-08-26 | **唐勇** | `¥200` |  |
+| 2025-10-23 | **唐勇** | `¥400` |  |
| 2025-04-25 | **上官俊斌** | `¥200` |  |
| 2025-05-27 | **临安居士** | `¥188` |  |
| 2025-04-20 | **姜兴(Simon)** | `¥188` |  |
| 2025-02-17 | **禾硕** | `¥168` |  |
+| 2025-10-16 | **xx豪** | `¥101` |  |
| 2025-10-15 | **兵** | `¥100` |  |
| 2025-08-13 | **zhongjing** | `¥100` |  |
| 2025-07-15 | **粉兔** | `¥100` |  |
diff --git a/preview/wx.png b/preview/wx.png
index b689e00b..cf86e942 100644
Binary files a/preview/wx.png and b/preview/wx.png differ
diff --git a/src-tauri/docs/README.en.md b/src-tauri/docs/README.en.md
index 25c98223..cf519b5d 100644
--- a/src-tauri/docs/README.en.md
+++ b/src-tauri/docs/README.en.md
@@ -1,6 +1,6 @@
-
+
An instant messaging system built with Tauri, Vite 7, Vue 3, and TypeScript
@@ -117,21 +117,21 @@ HuLa is an instant messaging system built with Tauri, Vite 7, Vue 3, and TypeScr
-
+
💬 Main Chat Interface
|
-
+
🗨️ Chat Conversation Interface
|
-
+
😊 Emoji Selection
|
-
+
⚙️ System Settings
|
@@ -147,29 +147,29 @@ HuLa is an instant messaging system built with Tauri, Vite 7, Vue 3, and TypeScr
-
+
📱 Diverse Messaging
|
-
+
🎨 Status Toggle
|
-
+
📷 Image Viewer
|
-
+
👥 Group Management
|
-
+
🤖 ChatBot Plugin Features
|
-
+
🤖 ChatBot Settings Page
|
@@ -278,7 +278,7 @@ Downloading installation packages from the web may show a damaged package prompt
#### 1. Open "System Settings" - "Security & Privacy", check as shown: Allow apps downloaded from "Anywhere" to run:
-

+
#### 2. If errors persist, execute the following commands in Terminal:
@@ -312,8 +312,8 @@ Execute **pnpm run commit** to invoke _git commit_ interaction, complete informa
If you find HuLa helpful, welcome to sponsor and support us. Your support is our motivation to keep moving forward!
@@ -327,8 +327,8 @@ Execute **pnpm run commit** to invoke _git commit_ interaction, complete informa
Join developers and users for discussions, get the latest news and technical support
@@ -349,11 +349,12 @@ Execute **pnpm run commit** to invoke _git commit_ interaction, complete informa
|---------|----------|--------|---------|
| 2025-09-03 | **烛火** | `¥500` |  |
| 2025-09-05 | **Orion** | `¥200` |  |
-| 2025-08-26 | **唐勇** | `¥200` |  |
+| 2025-10-23 | **唐勇** | `¥400` |  |
| 2025-04-25 | **上官俊斌** | `¥200` |  |
| 2025-05-27 | **临安居士** | `¥188` |  |
| 2025-04-20 | **姜兴(Simon)** | `¥188` |  |
| 2025-02-17 | **禾硕** | `¥168` |  |
+| 2025-10-16 | **xx豪** | `¥101` |  |
| 2025-10-15 | **兵** | `¥100` |  |
| 2025-08-13 | **zhongjing** | `¥100` |  |
| 2025-07-15 | **粉兔** | `¥100` |  |
diff --git a/src-tauri/docs/README.md b/src-tauri/docs/README.md
index 43d31801..a0a4694e 100644
--- a/src-tauri/docs/README.md
+++ b/src-tauri/docs/README.md
@@ -1,6 +1,6 @@
-
+
一款基于Tauri、Vite 7、Vue 3 和 TypeScript 构建的即时通讯系统
@@ -117,21 +117,21 @@ HuLa 是一款基于 Tauri、Vite 7、Vue 3 和 TypeScript 构建的即时通讯
-
+
💬 主聊天界面
|
-
+
🗨️ 聊天对话界面
|
-
+
😊 表情包选择
|
-
+
⚙️ 系统设置
|
@@ -147,29 +147,29 @@ HuLa 是一款基于 Tauri、Vite 7、Vue 3 和 TypeScript 构建的即时通讯
-
+
📱 消息多样化
|
-
+
🎨 状态切换
|
-
+
📷 图片查看
|
-
+
👥 群聊管理
|
-
+
🤖 ChatBot 插件功能
|
-
+
🤖 ChatBot 设置页面
|
@@ -281,7 +281,7 @@ pnpm run tauri:build
#### 1. 打开 "系统设置" - "安全性与隐私",如图勾选:允许 "任何来源" 下载的 App 运行:
-

+
#### 2. 如果还报错,请在终端执行以下命令解决:
@@ -315,8 +315,8 @@ sudo xattr -r -d com.apple.quarantine /Applications/应用名称.app
如果您觉得 HuLa 对您有帮助,欢迎赞助支持,您的支持是我们不断前进的动力!
@@ -330,8 +330,8 @@ sudo xattr -r -d com.apple.quarantine /Applications/应用名称.app
与开发者和用户一起交流讨论,获取最新资讯和技术支持
@@ -352,11 +352,12 @@ sudo xattr -r -d com.apple.quarantine /Applications/应用名称.app
|---------|----------|--------|---------|
| 2025-09-03 | **烛火** | `¥500` |  |
| 2025-09-05 | **Orion** | `¥200` |  |
-| 2025-08-26 | **唐勇** | `¥200` |  |
+| 2025-10-23 | **唐勇** | `¥400` |  |
| 2025-04-25 | **上官俊斌** | `¥200` |  |
| 2025-05-27 | **临安居士** | `¥188` |  |
| 2025-04-20 | **姜兴(Simon)** | `¥188` |  |
| 2025-02-17 | **禾硕** | `¥168` |  |
+| 2025-10-16 | **xx豪** | `¥101` |  |
| 2025-10-15 | **兵** | `¥100` |  |
| 2025-08-13 | **zhongjing** | `¥100` |  |
| 2025-07-15 | **粉兔** | `¥100` |  |
diff --git a/src-tauri/src/command/markdown_command.rs b/src-tauri/src/command/markdown_command.rs
index 05f546f7..7024953c 100644
--- a/src-tauri/src/command/markdown_command.rs
+++ b/src-tauri/src/command/markdown_command.rs
@@ -4,12 +4,6 @@ use std::fs;
use std::path::{Path, PathBuf};
use tauri::{AppHandle, Manager};
-#[cfg(any(target_os = "android", target_os = "ios"))]
-const IS_DESKTOP: bool = false;
-
-#[cfg(not(any(target_os = "android", target_os = "ios")))]
-const IS_DESKTOP: bool = true;
-
/// 处理图片 URL,将相对路径转换为 base64 数据 URI
fn process_image_url(url: &str, base_dir: &Path) -> String {
// 如果是绝对 URL 或已经是 data URI,直接返回
@@ -44,22 +38,6 @@ fn process_image_url(url: &str, base_dir: &Path) -> String {
let base64_data = general_purpose::STANDARD.encode(&img_data);
format!("data:{};base64,{}", mime_type, base64_data)
} else {
- let normalized = url.trim_start_matches("./");
-
- if let Some(stripped) = normalized.strip_prefix("preview/") {
- return format!(
- "https://gitee.com/HuLaSpark/HuLa/raw/master/preview/{}",
- stripped
- );
- }
-
- if let Some(stripped) = normalized.strip_prefix("public/") {
- return format!(
- "https://gitee.com/HuLaSpark/HuLa/raw/master/preview/{}",
- stripped
- );
- }
-
// 如果无法读取,返回原始 URL
url.to_string()
}
@@ -85,10 +63,9 @@ pub async fn parse_markdown(app: AppHandle, file_path: String) -> Result Result Result {
- // 获取应用根目录
- let app_dir = app
- .path()
- .app_config_dir()
- .map_err(|e| format!("无法获取应用目录: {}", e))?;
-
// 构建 README 文件路径
- // 在开发模式下,从项目根目录读取
- // 在生产模式下,从资源目录读取
+ // 在开发模式下,从项目根目录读取 README.md
+ // 在生产模式下,从资源目录的 docs 文件夹读取 README.md
let readme_filename = if language == "zh" {
"README.md"
} else {
"README.en.md"
};
- // 尝试多个可能的路径
- let mut possible_paths = vec![
- // 开发模式 - 项目根目录
- PathBuf::from(env!("CARGO_MANIFEST_DIR"))
- .parent()
- .unwrap()
- .join(readme_filename),
- // 生产模式 - 兼容旧版的应用配置目录
- app_dir.join(readme_filename),
- ];
+ let readme_relative_path = Path::new("docs").join(readme_filename);
+ let project_root = PathBuf::from(env!("CARGO_MANIFEST_DIR"))
+ .parent()
+ .unwrap()
+ .to_path_buf();
- // 生产模式 - 应用资源目录
- if IS_DESKTOP {
+ let mut possible_paths = vec![];
+
+ #[cfg(dev)]
+ {
+ // 开发环境:优先使用项目根目录的 README.md(本地图片)
+ possible_paths.push(project_root.join(readme_filename));
+
+ // 回退:src-tauri/docs 目录
+ possible_paths.push(
+ PathBuf::from(env!("CARGO_MANIFEST_DIR"))
+ .join(&readme_relative_path),
+ );
+ }
+
+ #[cfg(not(dev))]
+ {
+ // 生产环境:优先使用打包资源目录的 docs/README.md(远程图片)
+ // 优先级 1: 应用资源目录
+ #[cfg(not(any(target_os = "android", target_os = "ios")))]
if let Ok(resource_dir) = app.path().resource_dir() {
- possible_paths.push(resource_dir.join(readme_filename));
+ possible_paths.push(resource_dir.join(&readme_relative_path));
}
+
+ // 优先级 2: 应用配置目录
+ if let Ok(app_config_dir) = app.path().app_config_dir() {
+ possible_paths.push(app_config_dir.join(&readme_relative_path));
+ }
+
+ // 优先级 3: 回退到根目录
+ possible_paths.push(project_root.join(readme_filename));
}
let mut markdown_content = None;