use std::{
borrow::Cow,
path::{Path, PathBuf},
};
use wry::{
http::{status::StatusCode, Request, Response},
webview::RequestAsyncResponder,
Result,
};
use crate::desktop_context::EditQueue;
static MINIFIED: &str = include_str!("./minified.js");
fn module_loader(root_name: &str) -> String {
format!(
r#"
"#
)
}
pub(super) fn desktop_handler(
request: &Request>,
responder: RequestAsyncResponder,
custom_head: Option,
custom_index: Option,
root_name: &str,
edit_queue: &EditQueue,
) {
// If the request is for the root, we'll serve the index.html file.
if request.uri().path() == "/" {
// If a custom index is provided, just defer to that, expecting the user to know what they're doing.
// we'll look for the closing