aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorHsiangNianian <i@jyunko.cn>2026-01-15 15:26:30 +0800
committerHsiangNianian <i@jyunko.cn>2026-01-15 15:26:30 +0800
commit28cc7c6e1e943734d94c6b3c487f5b6430c2b997 (patch)
tree07149b40a2f593cfa695859211d337d0cd3c632c
parent10e6048cfbbc5c2b69c9c7bdbd0ab062724fd34d (diff)
downloadDropOut-28cc7c6e1e943734d94c6b3c487f5b6430c2b997.tar.gz
DropOut-28cc7c6e1e943734d94c6b3c487f5b6430c2b997.zip
fix: Clean up main.rs by removing unused imports and updating variable names for clarity; enhance HomeView.svelte by correcting emoji processing logic
-rw-r--r--src-tauri/src/main.rs4
-rw-r--r--ui/src/components/HomeView.svelte2
2 files changed, 3 insertions, 3 deletions
diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs
index 1b9b196..7e6ae80 100644
--- a/src-tauri/src/main.rs
+++ b/src-tauri/src/main.rs
@@ -2,7 +2,6 @@
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
use std::process::Stdio;
-use std::ptr::null;
use std::sync::Mutex;
use tauri::{Emitter, Manager, State, Window}; // Added Emitter
use tokio::io::{AsyncBufReadExt, BufReader};
@@ -291,6 +290,7 @@ async fn start_game(
#[derive(serde::Deserialize, Debug)]
struct AssetObject {
hash: String,
+ #[allow(dead_code)]
size: u64,
}
@@ -826,7 +826,7 @@ async fn refresh_account(
.map_err(|e| e.to_string())?;
let storage = core::account_storage::AccountStorage::new(app_dir.clone());
- let (stored_account, ms_refresh) = storage
+ let (_stored_account, ms_refresh) = storage
.get_active_account()
.ok_or("No active account found")?;
diff --git a/ui/src/components/HomeView.svelte b/ui/src/components/HomeView.svelte
index 732545f..7bb7e44 100644
--- a/ui/src/components/HomeView.svelte
+++ b/ui/src/components/HomeView.svelte
@@ -49,7 +49,7 @@
};
// Replace emojis
- let processed = body.replace(/:[a-z0-9_]+:/g, (match) => emojiMap[match] || match);
+ processed = processed.replace(/:[a-z0-9_]+:/g, (match) => emojiMap[match] || match);
// GitHub commit hash linking (simple version for 7-40 hex chars inside backticks)
processed = processed.replace(/`([0-9a-f]{7,40})`/g, (match, hash) => {