Skip to content

Commit 858f9b8

Browse files
authored
Merge pull request #3 from VenenoSix24/fix/win
feat: 移除启动动画并优化版本更新与 UI 细节
2 parents 49d1d49 + f9c6a85 commit 858f9b8

7 files changed

Lines changed: 7 additions & 280 deletions

File tree

docs/CNAME

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/latest.json

Lines changed: 0 additions & 63 deletions
This file was deleted.

public/splashscreen.html

Lines changed: 0 additions & 167 deletions
This file was deleted.

src-tauri/src/lib.rs

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,6 @@
1-
#[cfg(not(mobile))]
2-
use tauri::Manager;
31

4-
#[tauri::command]
5-
async fn close_splashscreen(app: tauri::AppHandle) {
6-
// 仅在桌面端执行:关闭启动画面窗口,显示主窗口
7-
#[cfg(not(mobile))]
8-
{
9-
let _ = app;
10-
if let Some(splash_window) = app.get_webview_window("splashscreen") {
11-
let _ = splash_window.close();
12-
}
132

14-
if let Some(main_window) = app.get_webview_window("main") {
15-
let _ = main_window.show();
16-
let _ = main_window.set_focus();
17-
}
18-
}
19-
20-
#[cfg(mobile)]
21-
{
22-
let _ = app;
23-
}
24-
}
3+
254

265
#[cfg_attr(mobile, tauri::mobile_entry_point)]
276
pub fn run() {
@@ -32,7 +11,6 @@ pub fn run() {
3211
let builder = builder.plugin(tauri_plugin_process::init());
3312

3413
builder
35-
.invoke_handler(tauri::generate_handler![close_splashscreen])
3614
.setup(|app| {
3715
// Debug 模式下启用日志
3816
if cfg!(debug_assertions) {

src-tauri/tauri.conf.json

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"resizable": true,
2121
"decorations": true,
2222
"transparent": true,
23-
"visible": false,
23+
"visible": true,
2424
"windowEffects": {
2525
"effects": [
2626
"mica",
@@ -29,19 +29,6 @@
2929
],
3030
"state": "active"
3131
}
32-
},
33-
{
34-
"label": "splashscreen",
35-
"title": "Loading",
36-
"url": "splashscreen.html",
37-
"width": 400,
38-
"height": 300,
39-
"decorations": false,
40-
"center": true,
41-
"resizable": false,
42-
"alwaysOnTop": true,
43-
"skipTaskbar": true,
44-
"transparent": true
4532
}
4633
],
4734
"security": {
@@ -81,8 +68,8 @@
8168
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDYzNUM1OTI0QTY2NTFBN0EKUldSNkdtV21KRmxjWXpCL2xYUzBPdHVtbkZkYzdtR09ZeDNEQTFHK3JXOGY1S0hHR2VZc1c0YmMK",
8269
"dialog": false,
8370
"endpoints": [
84-
"https://cdn.jsdelivr.net/gh/VenenoSix24/igolib-ldu@tauri-ts/docs/latest.json",
85-
"https://hk.gh-proxy.org/https://raw.githubusercontent.com/VenenoSix24/igolib-ldu/refs/heads/tauri-ts/docs/latest.json",
71+
"https://cdn.jsdelivr.net/gh/VenenoSix24/igolib-ldu-web@main/public/latest.json",
72+
"https://hk.gh-proxy.org/https://raw.githubusercontent.com/VenenoSix24/igolib-ldu-web/refs/heads/main/public/latest.json",
8673
"https://igolib.ivyris.top/latest.json"
8774
]
8875
}

src/App.tsx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import Dashboard from "./pages/Dashboard";
66
import { ThemeProvider } from "./components/theme-provider";
77
import { UpdateDialog } from "./components/UpdateDialog";
88

9-
import { invoke } from "@tauri-apps/api/core";
109
import { getVersion } from "@tauri-apps/api/app";
1110
import { fetch } from "@tauri-apps/plugin-http";
1211
import { check, Update } from '@tauri-apps/plugin-updater';
@@ -15,12 +14,6 @@ function App() {
1514
const [updateInfo, setUpdateInfo] = useState<Update | null>(null);
1615

1716
useEffect(() => {
18-
// 启动画面控制
19-
const initApp = async () => {
20-
invoke("close_splashscreen");
21-
};
22-
initApp();
23-
2417
const checkForUpdates = async () => {
2518
try {
2619
const update = await check();
@@ -37,7 +30,7 @@ function App() {
3730
const currentVer = await getVersion();
3831

3932
// 获取远程版本信息
40-
const response = await fetch("https://cdn.jsdelivr.net/gh/VenenoSix24/igolib-ldu@tauri-ts/docs/latest.json", {
33+
const response = await fetch("https://cdn.jsdelivr.net/gh/VenenoSix24/igolib-ldu-web@main/public/latest.json", {
4134
method: 'GET',
4235
headers: {
4336
'User-Agent': 'igolib-ldu-updater'
@@ -57,7 +50,7 @@ function App() {
5750
version: latestVer,
5851
body: data.notes,
5952
isExternal: true,
60-
downloadUrl: "https://gh-proxy.org/https://github.com/VenenoSix24/igolib-ldu/releases/latest"
53+
downloadUrl: "https://igolib.ivyris.top/download"
6154
} as any);
6255
}
6356
}

src/pages/Dashboard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ export default function Dashboard() {
720720
) : (
721721
// 下拉选择模式
722722
<select
723-
className="w-full h-10 rounded-md border border-slate-200 bg-white px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-neutral-950 dark:border-neutral-700 dark:text-white font-mono"
723+
className="w-full h-10 rounded-md border border-slate-200 bg-white px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-[rgb(16,16,16)] dark:border-neutral-700 dark:text-white font-mono"
724724
value={selectedSeatKey}
725725
onChange={(e) => {
726726
setSelectedSeatKey(e.target.value);

0 commit comments

Comments
 (0)