Skip to content

Commit

Permalink
Changed indexing to preparing
Browse files Browse the repository at this point in the history
  • Loading branch information
GamingGuy003 committed Nov 22, 2024
1 parent e6961b3 commit 187cad1
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/assets/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"report_no_malware": "Keine Malware",
"report_no_skipped": "Nichts übersprungen",
"scanner_scanning": "Scanne...",
"scanner_indexing": "Indiziere...",
"scanner_prepare": "Vorbereiten...",
"settings": "Einstellungen",
"start": "Start",
"set_download_logs": "Protokolle herunterladen",
Expand Down
2 changes: 1 addition & 1 deletion src/assets/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"report_no_malware": "No malware",
"report_no_skipped": "Nothing skipped",
"scanner_scanning": "Scanning...",
"scanner_indexing": "Indexing...",
"scanner_prepare": "Preparing...",
"settings": "Settings",
"start": "Start",
"set_download_logs": "Download Logs",
Expand Down
2 changes: 1 addition & 1 deletion src/assets/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"report_no_malware": "Aucun malware",
"report_no_skipped": "Rien ignoré",
"scanner_scanning": "Analyse en cours...",
"scanner_indexing": "Indexation en cours...",
"scanner_prepare": "En préparation...",
"settings": "Paramètres",
"start": "Démarrer",
"set_download_logs": "Télécharger les journaux",
Expand Down
2 changes: 1 addition & 1 deletion src/assets/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"report_no_malware": "Nessun malware",
"report_no_skipped": "Niente saltato",
"scanner_scanning": "Scansione in corso...",
"scanner_indexing": "Indicizzazione in corso...",
"scanner_prepare": "Preparazione in corso...",
"settings": "Impostazioni",
"start": "Avvia",
"set_download_logs": "Scarica i Log",
Expand Down
2 changes: 0 additions & 2 deletions src/backend/utils/generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ pub fn profile_path(path: PathBuf) -> (u64, Vec<PathBuf>) {
// path is file
match path.metadata() {
Ok(metadata) => {
debug!("Adding {}", path.display());
paths.push(path.clone());
metadata.len()
}
Expand Down Expand Up @@ -83,7 +82,6 @@ pub fn profile_folder(paths: &mut Vec<PathBuf>, path: PathBuf) -> u64 {
} else {
match entry.path().metadata() {
Ok(metadata) => {
debug!("Adding {}", path.display());
paths.push(entry.path().clone());
metadata.len()
}
Expand Down
2 changes: 2 additions & 0 deletions src/backend/yara_scanner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@ impl YaraScanner {
.data
.join(crate::DEFAULT_FILE);

info!("Preparing rules. This might take a second...");
// check if rules load and cache them for threads
let rules = Arc::new(get_rules(yarac)?);
info!("Rules loaded!");

// setup file log with timestamp of scan start
let mut file_log = FileLog::new()?;
Expand Down
6 changes: 3 additions & 3 deletions src/frontend/iced.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ pub enum UpdateState {
#[derive(Debug, Clone)]
pub enum ScanState {
Percentage(f32),
Indexing,
Preparing,
}

#[derive(Debug, Clone, PartialEq, Eq, Hash)]
Expand Down Expand Up @@ -271,7 +271,7 @@ impl Raspirus {
}),
ErrorCase::Warning { message } => {
if let State::Scanning {
scan_state: ScanState::Indexing,
scan_state: ScanState::Preparing,
} = self.state
{
self.state = State::MainMenu {
Expand Down Expand Up @@ -681,7 +681,7 @@ impl Raspirus {
}
Message::StartScan => {
self.state = State::Scanning {
scan_state: ScanState::Indexing,
scan_state: ScanState::Preparing,
};
let path = self.scan_path.clone();
let mut sender = self.sender.clone();
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/panels/scanning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ impl Raspirus {
.spacing(5),
)
.spacing(5),
ScanState::Indexing => iced::widget::Column::new()
ScanState::Preparing => iced::widget::Column::new()
.push(
iced::widget::Row::new()
.push(iced::widget::horizontal_space())
.push(iced::widget::container::Container::new(
iced::widget::text(t!("scanner_indexing"))
iced::widget::text(t!("scanner_prepare"))
.size(80)
.align_x(iced::alignment::Horizontal::Center)
.font(font::Font {
Expand Down

0 comments on commit 187cad1

Please sign in to comment.