+ {/* 左侧/上方任务列表区 */}
- {/* 任务列表 */}
- {/* 添加任务面板 - 使用 grid 动画实现平滑展开/折叠 */}
- {/* 底部工具栏 */}
setShowAddTaskPanel(!showAddTaskPanel)}
/>
- {/* 分隔条 Resizer */}
-
+ {/* 分隔条 Resizer (仅桌面端) */}
+ {isDesktop() && (
+
+ )}
- {/* 右侧信息面板 */}
- {!rightPanelCollapsed && (
+ {/* 右侧/下方信息面板 */}
+ {(isMobile() || !rightPanelCollapsed) && (
- {/* 连接设置和实时截图(可折叠)- 使用 grid 动画 */}
- {/* 连接设置(设备/资源选择) */}
-
- {/* 实时截图 */}
- {/* 运行日志 */}
)}
diff --git a/src/components/TitleBar.tsx b/src/components/TitleBar.tsx
index 17182ceb..1b77ecd1 100644
--- a/src/components/TitleBar.tsx
+++ b/src/components/TitleBar.tsx
@@ -7,8 +7,7 @@ import { loadIconAsDataUrl } from '@/services/contentResolver';
import { loggers } from '@/utils/logger';
import { isTauri } from '@/utils/paths';
-// 平台类型
-type Platform = 'windows' | 'macos' | 'linux' | 'unknown';
+type Platform = 'windows' | 'macos' | 'linux' | 'android' | 'unknown';
export function TitleBar() {
const { t } = useTranslation();
@@ -25,7 +24,8 @@ export function TitleBar() {
// 检测平台(通过 userAgent)
useEffect(() => {
const ua = navigator.userAgent.toLowerCase();
- if (ua.includes('win')) setPlatform('windows');
+ if (ua.includes('android')) setPlatform('android');
+ else if (ua.includes('win')) setPlatform('windows');
else if (ua.includes('mac')) setPlatform('macos');
else if (ua.includes('linux')) setPlatform('linux');
}, []);
@@ -112,9 +112,7 @@ export function TitleBar() {
return version ? `${projectInterface.name} ${version}` : projectInterface.name;
};
- // macOS/Linux 使用原生标题栏,不渲染自定义标题栏
- // 仅 Windows 使用自定义标题栏
- if (platform === 'macos' || platform === 'linux') {
+ if (platform === 'macos' || platform === 'linux' || platform === 'android') {
return null;
}
diff --git a/src/components/settings/DebugSection.tsx b/src/components/settings/DebugSection.tsx
index 684226df..19296b54 100644
--- a/src/components/settings/DebugSection.tsx
+++ b/src/components/settings/DebugSection.tsx
@@ -5,7 +5,7 @@ import { Bug, RefreshCw, FolderOpen, ScrollText, Network, Archive } from 'lucide
import { useAppStore } from '@/stores/appStore';
import { maaService } from '@/services/maaService';
import { loggers } from '@/utils/logger';
-import { isTauri, getDebugDir, getConfigDir, openDirectory } from '@/utils/paths';
+import { isTauri, isDesktop, getDebugDir, getConfigDir, openDirectory } from '@/utils/paths';
import { useExportLogs } from '@/utils/useExportLogs';
import { SwitchButton } from '@/components/FormControls';
import { ExportLogsModal } from './ExportLogsModal';
@@ -68,17 +68,21 @@ export function DebugSection() {
if (isTauri()) {
try {
const { invoke } = await import('@tauri-apps/api/core');
- const [exeDirResult, cwdResult, sysInfo, webview2DirResult] = await Promise.all([
+ const [exeDirResult, cwdResult, sysInfo] = await Promise.all([
invoke
('get_exe_dir'),
invoke('get_cwd'),
invoke<{ os: string; os_version: string; arch: string; tauri_version: string }>(
'get_system_info',
),
- invoke<{ path: string; system: boolean }>('get_webview2_dir'),
]);
setExeDir(exeDirResult);
setCwd(cwdResult);
- setWebview2Dir(webview2DirResult);
+ if (isDesktop()) {
+ const webview2DirResult = await invoke<{ path: string; system: boolean }>(
+ 'get_webview2_dir',
+ );
+ setWebview2Dir(webview2DirResult);
+ }
setSystemInfo({
os: sysInfo.os,
osVersion: sysInfo.os_version,
@@ -199,7 +203,7 @@ export function DebugSection() {
{exeDir}
)}
-
+ {isDesktop() &&
{t('debug.webview2Dir')}:{' '}
{webview2Dir
@@ -208,7 +212,7 @@ export function DebugSection() {
: webview2Dir.path
: '-'}
-
+ }
)}
diff --git a/src/components/settings/GeneralSection.tsx b/src/components/settings/GeneralSection.tsx
index 57d8037a..91f3025d 100644
--- a/src/components/settings/GeneralSection.tsx
+++ b/src/components/settings/GeneralSection.tsx
@@ -16,7 +16,7 @@ import {
import { invoke } from '@tauri-apps/api/core';
import { useAppStore } from '@/stores/appStore';
import { defaultAddTaskPanelHeight, defaultWindowSize } from '@/types/config';
-import { isTauri } from '@/utils/paths';
+import { isTauri, isDesktop } from '@/utils/paths';
import { SwitchButton } from '@/components/FormControls';
import { FrameRateSelector } from '../FrameRateSelector';
@@ -140,8 +140,8 @@ export function GeneralSection() {
{t('settings.general')}
- {/* ① 开机自启动 */}
- {isTauri() && (
+ {/* ① 开机自启动 (桌面端) */}
+ {isTauri() && isDesktop() && (