Switch to bun, clean up web implementation
This commit is contained in:
23 files changed
+240
-173
No files matched your search
@@ -1,3 +1,5 @@
|
||||
#![allow(unused)] // for whatever reason, the compiler is not recognizing the use of these functions
|
||||
|
||||
use dioxus::prelude::*;
|
||||
use dioxus_core::Element;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
let target_id = find_real_id(target);
|
||||
if (target_id !== null) {
|
||||
const send = (event_name) => {
|
||||
const message = window.interpreter.serializeIpcMessage("file_diolog", { accept: target.getAttribute("accept"), directory: target.getAttribute("webkitdirectory") === "true", multiple: target.hasAttribute("multiple"), target: parseInt(target_id), bubbles: event_bubbles(event_name), event: event_name });
|
||||
const message = window.interpreter.serializeIpcMessage("file_dialog", { accept: target.getAttribute("accept"), directory: target.getAttribute("webkitdirectory") === "true", multiple: target.hasAttribute("multiple"), target: parseInt(target_id), bubbles: event_bubbles(event_name), event: event_name });
|
||||
window.ipc.postMessage(message);
|
||||
};
|
||||
send("change&input");
|
||||
|
||||
@@ -49,7 +49,7 @@ impl IpcMessage {
|
||||
pub(crate) fn method(&self) -> IpcMethod {
|
||||
match self.method.as_str() {
|
||||
// todo: this is a misspelling, needs to be fixed
|
||||
"file_diolog" => IpcMethod::FileDialog,
|
||||
"file_dialog" => IpcMethod::FileDialog,
|
||||
"user_event" => IpcMethod::UserEvent,
|
||||
"query" => IpcMethod::Query,
|
||||
"browser_open" => IpcMethod::BrowserOpen,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use crate::{assets::*, edits::EditQueue};
|
||||
use dioxus_interpreter_js::unified_bindings::{native_js, SLEDGEHAMMER_JS};
|
||||
use dioxus_interpreter_js::unified_bindings::native_js;
|
||||
use std::path::{Path, PathBuf};
|
||||
use wry::{
|
||||
http::{status::StatusCode, Request, Response},
|
||||
|
||||
Reference in new issue
Block a user