Compare commits

...

5 Commits

Author SHA1 Message Date
JEEVITHA KANNAN K S
6d05a59b78
Merge 5944d8443b into 696110eae5 2024-10-26 14:49:07 +02:00
Adam Perkowski
696110eae5
refact(release): better categories (#876) 2024-10-25 15:44:41 -05:00
JEEVITHA KANNAN K S
5944d8443b
Update tui/src/state.rs
Co-authored-by: Liam <33645555+lj3954@users.noreply.github.com>
2024-10-01 13:10:35 +05:30
JEEVITHA KANNAN K S
cc16c3e56d
Use string instead of box::leak 2024-10-01 12:11:45 +05:30
JEEVITHA KANNAN K S
6c2aaf339f
Add spacing 2024-09-30 22:48:03 +05:30
4 changed files with 21 additions and 18 deletions

19
.github/release.yml vendored
View File

@ -1,20 +1,23 @@
changelog: changelog:
categories: categories:
- title: '🚀 Features' - title: '🚀 Features'
labels: label: 'enhancement'
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes' - title: '🐛 Bug Fixes'
labels: label: 'bug'
- 'fix' - title: '⚙️ Refactoring'
- 'bugfix' label: 'refactor'
- 'bug' - title: '🧩 UI/UX'
label: 'UI/UX'
- title: '📚 Documentation' - title: '📚 Documentation'
label: 'documentation' label: 'documentation'
- title: '🔒 Security' - title: '🔒 Security'
label: 'security' label: 'security'
- title: '🧰 GitHub Actions' - title: '🧰 GitHub Actions'
label: 'github actions' label: 'github_actions'
- title: '🦀 Rust'
label: 'rust'
- title: '📃 Scripting'
label: 'script'
exclude: exclude:
labels: labels:
- 'skip-changelog' - 'skip-changelog'

View File

@ -95,7 +95,7 @@ impl Filter {
//Create the search bar widget //Create the search bar widget
let search_bar = Paragraph::new(display_text) let search_bar = Paragraph::new(display_text)
.block(Block::default().borders(Borders::ALL).title("Search")) .block(Block::default().borders(Borders::ALL).title(" Search "))
.style(Style::default().fg(search_color)); .style(Style::default().fg(search_color));
//Render the search bar (First chunk of the screen) //Render the search bar (First chunk of the screen)

View File

@ -74,7 +74,7 @@ impl FloatContent for RunningCommand {
title_line.push_span( title_line.push_span(
Span::default() Span::default()
.content(" press <ENTER> to close this window ") .content(" Press <ENTER> to close this window ")
.style(Style::default()), .style(Style::default()),
); );

View File

@ -24,7 +24,7 @@ use temp_dir::TempDir;
const MIN_WIDTH: u16 = 77; const MIN_WIDTH: u16 = 77;
const MIN_HEIGHT: u16 = 19; const MIN_HEIGHT: u16 = 19;
const TITLE: &str = concat!("Linux Toolbox - ", env!("BUILD_DATE")); const TITLE: &str = concat!(" Linux Toolbox - ", env!("BUILD_DATE"), " ");
const ACTIONS_GUIDE: &str = "List of important tasks performed by commands' names: const ACTIONS_GUIDE: &str = "List of important tasks performed by commands' names:
D - disk modifications (ex. partitioning) (privileged) D - disk modifications (ex. partitioning) (privileged)
@ -61,7 +61,7 @@ pub struct AppState {
selected_commands: Vec<Rc<ListNode>>, selected_commands: Vec<Rc<ListNode>>,
drawable: bool, drawable: bool,
#[cfg(feature = "tips")] #[cfg(feature = "tips")]
tip: &'static str, tip: String,
} }
pub enum Focus { pub enum Focus {
@ -368,17 +368,17 @@ impl AppState {
}; };
let title = if self.multi_select { let title = if self.multi_select {
&format!("{} [Multi-Select]", TITLE) &format!("{}[Multi-Select] ", TITLE)
} else { } else {
TITLE TITLE
}; };
#[cfg(feature = "tips")] #[cfg(feature = "tips")]
let bottom_title = Line::from(self.tip.bold().blue()).right_aligned(); let bottom_title = Line::from(self.tip.as_str().bold().blue()).right_aligned();
#[cfg(not(feature = "tips"))] #[cfg(not(feature = "tips"))]
let bottom_title = ""; let bottom_title = "";
let task_list_title = Line::from("Important Actions ").right_aligned(); let task_list_title = Line::from(" Important Actions ").right_aligned();
// Create the list widget with items // Create the list widget with items
let list = List::new(items) let list = List::new(items)
@ -745,13 +745,13 @@ impl AppState {
const TIPS: &str = include_str!("../cool_tips.txt"); const TIPS: &str = include_str!("../cool_tips.txt");
#[cfg(feature = "tips")] #[cfg(feature = "tips")]
fn get_random_tip() -> &'static str { fn get_random_tip() -> String {
let tips: Vec<&str> = TIPS.lines().collect(); let tips: Vec<&str> = TIPS.lines().collect();
if tips.is_empty() { if tips.is_empty() {
return ""; return "".to_string();
} }
let mut rng = rand::thread_rng(); let mut rng = rand::thread_rng();
let random_index = rng.gen_range(0..tips.len()); let random_index = rng.gen_range(0..tips.len());
tips[random_index] format!(" {} ", tips[random_index])
} }