refactor: split tree shell filetree dnd

This commit is contained in:
lix-2026
2026-05-26 03:42:03 +08:00
parent 72ffa5377d
commit 0f0e37ed54
5 changed files with 582 additions and 490 deletions
@@ -1008,6 +1008,20 @@ pub async fn tree_shell_filetree_menu_runtime_asset() -> Response {
.unwrap_or_else(|_| Response::new(Body::empty()))
}
pub async fn tree_shell_filetree_dnd_runtime_asset() -> Response {
const JS: &str = include_str!("../../browser/tree-shell-filetree-dnd-runtime.js");
Response::builder()
.status(StatusCode::OK)
.header(
header::CONTENT_TYPE,
"application/javascript; charset=utf-8",
)
.header(header::CACHE_CONTROL, "no-store")
.header(HEADER_MNOTE_WEB_OWNER, "mnote-web")
.body(Body::from(JS))
.unwrap_or_else(|_| Response::new(Body::empty()))
}
pub async fn tree_shell_picker_runtime_asset() -> Response {
const JS: &str = include_str!("../../browser/tree-shell-picker-runtime.js");
Response::builder()