Skip to content

Commit

Permalink
update: gif
Browse files Browse the repository at this point in the history
  • Loading branch information
honhimW committed Sep 14, 2024
1 parent f0692a5 commit da73afc
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
> Please note that the current project is still in its very early stages of development.
> Since this is my first Rust project, it might be shit👻👻
![gif](./assets/ratisui.gif)

## Quick Start

> build from source
Expand Down
Binary file added assets/ratisui.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::utils::none_match;
use crate::redis_opt::redis_operations;
use crate::tabs::explorer::ExplorerTab;
use crate::tabs::logger::LoggerTab;
use crate::tabs::profiler::ProfilerTab;
use crate::tabs::cli::CliTab;
use anyhow::Result;
use ratatui::crossterm::event::{KeyCode, KeyEvent, KeyModifiers};
use ratatui::layout::Constraint::{Fill, Length, Max, Min};
Expand All @@ -27,7 +27,7 @@ pub struct Context {
current_tab: CurrentTab,
current_tab_index: usize,
explorer_tab: ExplorerTab,
profiler_tab: ProfilerTab,
profiler_tab: CliTab,
logger_tab: LoggerTab,
databases: Databases,
server_list: ServerList,
Expand All @@ -49,7 +49,7 @@ impl Context {
current_tab: CurrentTab::Explorer,
current_tab_index: 0,
explorer_tab: ExplorerTab::new(),
profiler_tab: ProfilerTab::default(),
profiler_tab: CliTab::default(),
logger_tab: LoggerTab::new(),
server_list: ServerList::new(&databases),
databases,
Expand Down
12 changes: 6 additions & 6 deletions src/tabs/profiler.rs → src/tabs/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,29 @@ use ratatui::widgets::{Block, Padding, Paragraph};
use ratatui::{symbols, Frame};

#[derive(Default, Clone, Copy)]
pub struct ProfilerTab {
pub struct CliTab {

}

impl TabImplementation for ProfilerTab {
impl TabImplementation for CliTab {
fn palette(&self) -> tailwind::Palette {
tailwind::GREEN
}

fn title(&self) -> Line<'static> {
" Profiler "
" CLI "
.fg(tailwind::SLATE.c200)
.bg(self.palette().c900)
.into()
}
}

impl Renderable for ProfilerTab {
impl Renderable for CliTab {
fn render_frame(&mut self, frame: &mut Frame, rect: Rect) -> anyhow::Result<()>
where
Self: Sized,
{
let paragraph = Paragraph::new("This is the profiler tab")
let paragraph = Paragraph::new("This is the CLI tab, TODO")
.block(Block::bordered()
.border_set(symbols::border::PROPORTIONAL_TALL)
.padding(Padding::horizontal(1))
Expand All @@ -39,6 +39,6 @@ impl Renderable for ProfilerTab {
}
}

impl Listenable for ProfilerTab {
impl Listenable for CliTab {

}
2 changes: 1 addition & 1 deletion src/tabs/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ impl TabImplementation for LoggerTab {
}

fn title(&self) -> Line<'static> {
" Logger "
" Logger "
.fg(tailwind::SLATE.c200)
.bg(self.palette().c900)
.into()
Expand Down
2 changes: 1 addition & 1 deletion src/tabs/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pub mod explorer;
pub mod profiler;
pub mod cli;
pub mod logger;

0 comments on commit da73afc

Please sign in to comment.