Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
threeseed committed Apr 28, 2024
1 parent ae95c05 commit 682aaaf
Show file tree
Hide file tree
Showing 9 changed files with 242 additions and 190 deletions.
385 changes: 223 additions & 162 deletions src-tauri/Cargo.lock

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,16 @@ config = "0.14"
ctrlc = "3"
dark-light = "1"
fork = "0.1"
keyring = "2"
log-panics = { version = "2", features = ["with-backtrace"] }
mid = "1"
mouce = "0.2.44"
open = "5"
plist = "1"
rand = "0.8"
raw-window-handle = "0.6"
rgb = "0.8"
sentry-tauri = "0.2"
sentry-tauri = "0.3"
serde = "1.0.197"
signal-hook = "0.3"
stackblur-iter = { git = "https://github.com/harana-oss/stackblur-iter.git" }
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/handler_folders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use harana_database::private_folders_list::private_folders_list;
use harana_database::search_folders_list::search_folders_list;
use harana_database::search_folders_update_enabled::search_folders_update_enabled;

use crate::globals::{DATABASE_MANAGER, FILE_MANAGER};
use crate::globals::{FILE_MANAGER};
use crate::handlers::database_core;

#[tauri::command]
Expand Down
1 change: 0 additions & 1 deletion src-tauri/src/handler_integrations.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use harana_common::anyhow::Result;
use harana_common::log::debug;
use tauri;

Expand Down
1 change: 0 additions & 1 deletion src-tauri/src/handler_rules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use harana_database::rules_list::rules_list;

#[cfg(target_os = "linux")]
use fork::{daemon, Fork};
use crate::globals::DATABASE_MANAGER;
use crate::handlers::database_core;

#[tauri::command]
Expand Down
21 changes: 15 additions & 6 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]

use std::path::Path;
use std::time::Duration;
use color_eyre::owo_colors::OwoColorize;

use harana_application::manager::ApplicationManager;
use harana_common::{serde_json, tauri};
use harana_common::{rand, serde_json, tauri};
use harana_common::hashbrown::HashMap;
use harana_common::log::info;
use harana_common::num_cpus;
use harana_common::thread_pools::build_default_pools;
use harana_common::uuid::Uuid;
use harana_database::files_count_all::files_count_all;
use harana_database::manager::DatabaseManager;
use harana_database::state_get::state_get;
use harana_job::handler::JobHandler;
Expand All @@ -22,13 +21,15 @@ use harana_search_index::thumbnailer::IndexThumbnailer;
use harana_search_jobs::job_hash::JobHandlerHash;
use harana_search_jobs::job_index::JobHandlerIndex;
use harana_search_jobs::job_thumbnail::JobHandlerThumbnail;
use keyring::Entry;
use rand::distributions::Alphanumeric;
use rand::Rng;
use tauri::{async_runtime, Manager};
use crate::directories::setup_directories;

use crate::globals::*;
use crate::handler_settings::get_setting;
use crate::handler_state::{get_state, update_state};
use crate::handlers::{database_files, invoke_handler};
use crate::handlers::{invoke_handler};
use crate::logging::logging;
use crate::state::State;
use crate::system_tray::{create_system_tray, on_system_tray_event};
Expand Down Expand Up @@ -114,7 +115,15 @@ fn main() {
let _ = INDEX_SEARCHER.set(IndexSearcher::new(INDEX_MANAGER.get().unwrap()).await);
let _ = INDEX_THUMBNAILER.set(IndexThumbnailer::new(thumbnails_path, 400, 400).await);

INDEX_MANAGER.get().unwrap().create_indexes().await;

let entry = Entry::new("Harana", "index").unwrap();
let entry_password = entry.get_password();
if entry_password.is_err() {
let mut rng = rand::thread_rng();
let password: String = rng.sample_iter(&Alphanumeric).take(30).map(char::from).collect();
entry.set_password(password.as_str()).unwrap();
}
INDEX_MANAGER.get().unwrap().create_indexes(entry_password.unwrap()).await;
});

// Generate user id if needed
Expand Down
2 changes: 0 additions & 2 deletions src/main/scala/com/harana/search/client/Main.scala
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
package com.harana.search.client

import com.harana.search.client.analytics.Analytics
import com.harana.web.base.BaseApp

import scala.scalajs.js.annotation.{JSExport, JSExportTopLevel}

@JSExportTopLevel("Main")
object Main {

lazy val analytics = Analytics
lazy val circuit = Circuit

@JSExport
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit 682aaaf

Please sign in to comment.