fix compilation errors

This commit is contained in:
nyx 2024-10-10 06:02:18 -04:00
parent e432865e3b
commit e8af79669b
No known key found for this signature in database
GPG Key ID: 6038FFD6589902CB

View File

@ -2,7 +2,7 @@ use crate::{
confirmation::{ConfirmPrompt, ConfirmStatus}, confirmation::{ConfirmPrompt, ConfirmStatus},
filter::{Filter, SearchAction}, filter::{Filter, SearchAction},
float::{Float, FloatContent}, float::{Float, FloatContent},
floating_text::FloatingText, floating_text::{FloatingText, FloatingTextMode},
hint::{create_shortcut_list, Shortcut}, hint::{create_shortcut_list, Shortcut},
running_command::RunningCommand, running_command::RunningCommand,
theme::Theme, theme::Theme,
@ -657,7 +657,7 @@ impl AppState {
if let Some(list_node) = self.get_selected_node() { if let Some(list_node) = self.get_selected_node() {
let mut preview_title = "[Preview] - ".to_string(); let mut preview_title = "[Preview] - ".to_string();
preview_title.push_str(list_node.name.as_str()); preview_title.push_str(list_node.name.as_str());
if let Some(preview) = FloatingText::from_command(&list_node.command, preview_title) { if let Some(preview) = FloatingText::from_command(&list_node.command, FloatingTextMode::Preview) {
self.spawn_float(preview, 80, 80); self.spawn_float(preview, 80, 80);
} }
} }
@ -665,7 +665,7 @@ impl AppState {
fn enable_description(&mut self) { fn enable_description(&mut self) {
if let Some(command_description) = self.get_selected_description() { if let Some(command_description) = self.get_selected_description() {
let description = FloatingText::new(command_description, "Command Description"); let description = FloatingText::new(command_description, FloatingTextMode::Description);
self.spawn_float(description, 80, 80); self.spawn_float(description, 80, 80);
} }
} }
@ -731,7 +731,7 @@ impl AppState {
fn toggle_task_list_guide(&mut self) { fn toggle_task_list_guide(&mut self) {
self.spawn_float( self.spawn_float(
FloatingText::new(ACTIONS_GUIDE.to_string(), "Important Actions Guide"), FloatingText::new(ACTIONS_GUIDE.to_string(), FloatingTextMode::ActionsGuide),
80, 80,
80, 80,
); );