You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#![cfg_attr(
|
|
|
|
all(not(debug_assertions), target_os = "windows"),
|
|
|
|
windows_subsystem = "windows"
|
|
|
|
)]
|
|
|
|
|
|
|
|
use crate::commands::emit_info;
|
|
|
|
use crate::commands::files::*;
|
|
|
|
use crate::commands::repo::{
|
|
|
|
add_repository, get_active_repository, get_repositories, select_repository,
|
|
|
|
};
|
|
|
|
use crate::commands::tags::*;
|
|
|
|
use crate::context::Context;
|
|
|
|
use crate::settings::load_settings;
|
|
|
|
|
|
|
|
mod commands;
|
|
|
|
pub mod context;
|
|
|
|
pub mod error;
|
|
|
|
mod ipc;
|
|
|
|
mod settings;
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let settings = load_settings().expect("Failed to load settings");
|
|
|
|
let context = Context::new(settings);
|
|
|
|
|
|
|
|
tauri::Builder::default()
|
|
|
|
.manage(context)
|
|
|
|
.invoke_handler(tauri::generate_handler![
|
|
|
|
get_repositories,
|
|
|
|
add_repository,
|
|
|
|
select_repository,
|
|
|
|
get_active_repository,
|
|
|
|
emit_info,
|
|
|
|
get_all_files,
|
|
|
|
read_file_by_hash,
|
|
|
|
get_thumbnails,
|
|
|
|
read_thumbnail,
|
|
|
|
get_tags_for_file,
|
|
|
|
find_files,
|
|
|
|
])
|
|
|
|
.run(tauri::generate_context!())
|
|
|
|
.expect("error while running tauri application");
|
|
|
|
}
|