Merge branch 'v2.0' into feature/ui-security
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||||
|
||||
use std::{env, path::Path, time::Duration};
|
||||
use std::{env, time::Duration};
|
||||
|
||||
use tauri::{AppHandle, Emitter, Listener, Manager, RunEvent, WindowEvent};
|
||||
|
||||
@@ -25,6 +25,7 @@ use portmaster::PortmasterExt;
|
||||
use tauri_plugin_log::RotationStrategy;
|
||||
use traymenu::setup_tray_menu;
|
||||
use window::{close_splash_window, create_main_window, hide_splash_window};
|
||||
use tauri_plugin_window_state::StateFlags;
|
||||
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
@@ -140,7 +141,7 @@ fn main() {
|
||||
|
||||
// TODO(vladimir): Permission for logs/app2 folder are not guaranteed. Use the default location for now.
|
||||
#[cfg(target_os = "windows")]
|
||||
let log_target = if let Some(data_dir) = cli_args.data {
|
||||
let log_target = if let Some(_) = cli_args.data {
|
||||
tauri_plugin_log::Target::new(tauri_plugin_log::TargetKind::LogDir { file_name: None })
|
||||
} else {
|
||||
tauri_plugin_log::Target::new(tauri_plugin_log::TargetKind::Stdout)
|
||||
@@ -174,7 +175,12 @@ fn main() {
|
||||
// OS Version and Architecture support
|
||||
.plugin(tauri_plugin_os::init())
|
||||
// Initialize save windows state plugin.
|
||||
.plugin(tauri_plugin_window_state::Builder::default().build())
|
||||
.plugin(tauri_plugin_window_state::Builder::default()
|
||||
// Don't save visibility state, so it will not interfere with "--background" command line argument
|
||||
.with_state_flags(StateFlags::all() & !StateFlags::VISIBLE)
|
||||
// Don't save splash window state
|
||||
.with_denylist(&["splash",])
|
||||
.build())
|
||||
// Single instance guard
|
||||
.plugin(tauri_plugin_single_instance::init(|app, argv, cwd| {
|
||||
// Send info to already dunning instance.
|
||||
|
||||
Reference in New Issue
Block a user