feat: optimize file icons, UI, share direct links, and upload performance
- Replace CSS-only file icons with SVG icons for each file type (folder, image, video, audio, archive, document, app) - Add navigation icons to left sidebar (Baidu Netdisk style) - Enlarge file cards (108px -> 120px) with smoother transitions - Add direct links section to share page with copy/delete actions - Add Rust bridge commands for fetching and deleting direct links - Optimize local storage put() to use rename-first strategy instead of copyFileSync for instant large file completion - Show "server processing" status during upload finalization instead of appearing stuck Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1032,6 +1032,39 @@ async fn api_get_my_shares(
|
||||
.await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
async fn api_get_my_direct_links(
|
||||
state: tauri::State<'_, ApiState>,
|
||||
base_url: String,
|
||||
) -> Result<BridgeResponse, String> {
|
||||
request_with_optional_csrf(
|
||||
&state.client,
|
||||
Method::GET,
|
||||
&base_url,
|
||||
"/api/direct-link/my",
|
||||
None,
|
||||
false,
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
async fn api_delete_direct_link(
|
||||
state: tauri::State<'_, ApiState>,
|
||||
base_url: String,
|
||||
link_id: i64,
|
||||
) -> Result<BridgeResponse, String> {
|
||||
request_with_optional_csrf(
|
||||
&state.client,
|
||||
Method::DELETE,
|
||||
&base_url,
|
||||
&format!("/api/direct-link/{}", link_id),
|
||||
None,
|
||||
false,
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
async fn api_create_share(
|
||||
state: tauri::State<'_, ApiState>,
|
||||
@@ -2074,6 +2107,8 @@ pub fn run() {
|
||||
api_delete_file,
|
||||
api_get_download_url,
|
||||
api_get_my_shares,
|
||||
api_get_my_direct_links,
|
||||
api_delete_direct_link,
|
||||
api_create_share,
|
||||
api_delete_share,
|
||||
api_create_direct_link,
|
||||
|
||||
Reference in New Issue
Block a user