🐛 Fix the issue of not being able to drag and drop files.
This commit is contained in:
4
bin/builders/common.ts
vendored
4
bin/builders/common.ts
vendored
@@ -92,9 +92,9 @@ export async function mergeTauriConfig(
|
|||||||
const cli_path = path.join(new_dir, "cli.js")
|
const cli_path = path.join(new_dir, "cli.js")
|
||||||
const cli_path_target = path.join(old_dir, "cli.js")
|
const cli_path_target = path.join(old_dir, "cli.js")
|
||||||
const about_pake_path = path.join(new_dir, "about_pake.html");
|
const about_pake_path = path.join(new_dir, "about_pake.html");
|
||||||
const about_patk_path_target = path.join(old_dir, "about_pake.html")
|
const about_pake_path_target = path.join(old_dir, "about_pake.html")
|
||||||
fs.copyFile(cli_path, cli_path_target);
|
fs.copyFile(cli_path, cli_path_target);
|
||||||
fs.copyFile(about_pake_path, about_patk_path_target);
|
fs.copyFile(about_pake_path, about_pake_path_target);
|
||||||
}
|
}
|
||||||
tauriConf.pake.windows[0].url = file_name;
|
tauriConf.pake.windows[0].url = file_name;
|
||||||
tauriConf.pake.windows[0].url_type = "local";
|
tauriConf.pake.windows[0].url_type = "local";
|
||||||
|
|||||||
4
dist/cli.js
vendored
4
dist/cli.js
vendored
@@ -1697,9 +1697,9 @@ function mergeTauriConfig(url, options, tauriConf) {
|
|||||||
const cli_path = path.join(new_dir, "cli.js");
|
const cli_path = path.join(new_dir, "cli.js");
|
||||||
const cli_path_target = path.join(old_dir, "cli.js");
|
const cli_path_target = path.join(old_dir, "cli.js");
|
||||||
const about_pake_path = path.join(new_dir, "about_pake.html");
|
const about_pake_path = path.join(new_dir, "about_pake.html");
|
||||||
const about_patk_path_target = path.join(old_dir, "about_pake.html");
|
const about_pake_path_target = path.join(old_dir, "about_pake.html");
|
||||||
fs$1.copyFile(cli_path, cli_path_target);
|
fs$1.copyFile(cli_path, cli_path_target);
|
||||||
fs$1.copyFile(about_pake_path, about_patk_path_target);
|
fs$1.copyFile(about_pake_path, about_pake_path_target);
|
||||||
}
|
}
|
||||||
tauriConf.pake.windows[0].url = file_name;
|
tauriConf.pake.windows[0].url = file_name;
|
||||||
tauriConf.pake.windows[0].url_type = "local";
|
tauriConf.pake.windows[0].url_type = "local";
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"windows": [
|
"windows": [
|
||||||
{
|
{
|
||||||
"url": "https://chat.openai.com",
|
"url": "https://weread.qq.com/",
|
||||||
"transparent": true,
|
"transparent": true,
|
||||||
"fullscreen": false,
|
"fullscreen": false,
|
||||||
"width": 1200,
|
"width": 1200,
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ pub fn get_window(app: &mut App, config: PakeConfig, _data_dir: PathBuf) -> Wind
|
|||||||
.resizable(window_config.resizable)
|
.resizable(window_config.resizable)
|
||||||
.fullscreen(window_config.fullscreen)
|
.fullscreen(window_config.fullscreen)
|
||||||
.inner_size(window_config.width, window_config.height)
|
.inner_size(window_config.width, window_config.height)
|
||||||
|
.disable_file_drop_handler() //Very annoying, otherwise dragging files to the window will not work.
|
||||||
.initialization_script(include_str!("../inject/style.js"))
|
.initialization_script(include_str!("../inject/style.js"))
|
||||||
.initialization_script(include_str!("../inject/event.js"))
|
.initialization_script(include_str!("../inject/event.js"))
|
||||||
.initialization_script(include_str!("../inject/component.js"));
|
.initialization_script(include_str!("../inject/component.js"));
|
||||||
|
|||||||
Reference in New Issue
Block a user