fix(webview): correct path to tables.html in WebviewWindowBuilder

The path to tables.html in WebviewWindowBuilder was incorrectly set to "../web/desktop/tables.html". This was fixed to use the correct relative path "tables.html" to ensure the webview loads the file from the proper location. The change maintains the same functionality while using the correct path structure.
This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2025-11-14 17:00:04 -03:00
parent 73805c4a98
commit 01d9698bfa

View file

@ -292,11 +292,11 @@ async fn main() -> std::io::Result<()> {
.setup(|app| { .setup(|app| {
use tauri::WebviewWindowBuilder; use tauri::WebviewWindowBuilder;
match WebviewWindowBuilder::new( match WebviewWindowBuilder::new(
app, app,
"main", "main",
tauri::WebviewUrl::App("../web/desktop/tables.html".into()), tauri::WebviewUrl::App("tables.html".into()),
) )
.build() { .build() {
Ok(_window) => Ok(()), Ok(_window) => Ok(()),
Err(e) if e.to_string().contains("WebviewLabelAlreadyExists") => { Err(e) if e.to_string().contains("WebviewLabelAlreadyExists") => {
@ -318,7 +318,7 @@ async fn main() -> std::io::Result<()> {
return Ok(()); return Ok(());
} }
// Normal server start continues here // Normal server start continues here``
let server_result = HttpServer::new(move || { let server_result = HttpServer::new(move || {
let cors = Cors::default() let cors = Cors::default()
.allow_any_origin() .allow_any_origin()