Skip to content

Commit

Permalink
Bumped all dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Xithrius committed Aug 17, 2024
1 parent cd0210e commit e9e3508
Show file tree
Hide file tree
Showing 12 changed files with 533 additions and 526 deletions.
997 changes: 502 additions & 495 deletions Cargo.lock

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,40 +13,40 @@ keywords = ["tui", "twitch"]
categories = ["command-line-utilities"]

[dependencies]
crossterm = "0.27.0"
tui = { package = "ratatui", version = "0.27.0", default-features = false, features = [
crossterm = "0.28.1"
tui = { package = "ratatui", version = "0.28.0", default-features = false, features = [
"crossterm",
"serde",
"underline-color",
] }
tokio = { version = "1.38.0", features = [
tokio = { version = "1.39.2", features = [
"rt",
"macros",
"rt-multi-thread",
"fs",
] }
clap = { version = "4.5.7", features = ["derive", "cargo"] }
serde = { version = "1.0.203", features = ["derive"] }
serde_json = "1.0.118"
clap = { version = "4.5.16", features = ["derive", "cargo"] }
serde = { version = "1.0.208", features = ["derive"] }
serde_json = "1.0.125"
unicode-width = "0.1.13"
unicode-segmentation = "1.11.0"
chrono = "0.4.38"
irc = "1.0.0"
futures = "0.3.30"
toml = "0.8.14"
toml = "0.8.19"
textwrap = "0.16.1"
rustyline = "14.0.0"
fuzzy-matcher = "0.3.7"
regex = "1.10.5"
regex = "1.10.6"
color-eyre = "0.6.3"
log = "0.4.21"
log = "0.4.22"
fern = "0.6.2"
dialoguer = { version = "0.11.0", default-features = false }
reqwest = { version = "0.12.5", features = ["json"] }
image = "0.24.8"
base64 = "0.22.1"
tempfile = "3.10.1"
serde_with = "3.8.1"
tempfile = "3.12.0"
serde_with = "3.9.0"
once_cell = "1.19.0"
webbrowser = "1.0.1"
memchr = "2.7.4"
Expand Down
6 changes: 3 additions & 3 deletions src/handlers/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ impl App {
}

pub fn draw(&mut self, f: &mut Frame) {
let mut size = f.size();
let mut size = f.area();

if self.config.borrow().frontend.state_tabs {
let layout = Layout::default()
.direction(Direction::Vertical)
.constraints([Constraint::Length(size.height - 1), Constraint::Length(1)])
.split(f.size());
.split(f.area());

size = layout[0];

Expand All @@ -122,7 +122,7 @@ impl App {
if (size.height < 10 || size.width < 60)
&& self.config.borrow().frontend.show_unsupported_screen_size
{
self.components.window_size_error.draw(f, Some(f.size()));
self.components.window_size_error.draw(f, Some(f.area()));
} else {
match self.state {
State::Dashboard => self.components.dashboard.draw(f, None),
Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/channel_switcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ impl Display for ChannelSwitcherWidget {

impl Component for ChannelSwitcherWidget {
fn draw(&mut self, f: &mut Frame, area: Option<Rect>) {
let mut r = area.map_or_else(|| centered_rect(60, 60, 23, f.size()), |a| a);
let mut r = area.map_or_else(|| centered_rect(60, 60, 23, f.area()), |a| a);
// Make sure we have space for the input widget, which has a height of 3.
r.height -= 3;

Expand Down
4 changes: 2 additions & 2 deletions src/ui/components/chat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ impl ChatWidget {
let h_chunk = Layout::default()
.direction(Direction::Horizontal)
.constraints([Constraint::Min(1)])
.split(frame.size());
.split(frame.area());

let message_chunk_width = h_chunk[0].width as usize;

Expand Down Expand Up @@ -166,7 +166,7 @@ impl ChatWidget {

impl Component for ChatWidget {
fn draw(&mut self, f: &mut Frame, area: Option<Rect>) {
let r = area.map_or_else(|| f.size(), |a| a);
let r = area.map_or_else(|| f.area(), |a| a);

let config = self.config.borrow();

Expand Down
4 changes: 2 additions & 2 deletions src/ui/components/dashboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ use std::slice::Iter;
use tui::{
layout::{Constraint, Direction, Layout, Rect},
style::{Color, Modifier, Style},
terminal::Frame,
text::{Line, Span},
widgets::{List, ListItem, Paragraph},
Frame,
};

use crate::{
Expand Down Expand Up @@ -151,7 +151,7 @@ impl DashboardWidget {

impl Component for DashboardWidget {
fn draw(&mut self, f: &mut Frame, area: Option<Rect>) {
let r = area.map_or_else(|| f.size(), |a| a);
let r = area.map_or_else(|| f.area(), |a| a);

let favorite_channels_len = {
let l = self.config.borrow().frontend.favorite_channels.len() as u16;
Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl DebugWidget {

impl Component for DebugWidget {
fn draw(&mut self, f: &mut Frame, area: Option<Rect>) {
let r = area.map_or_else(|| f.size(), |a| a);
let r = area.map_or_else(|| f.area(), |a| a);

let configs = self.get_config_values();

Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/emote_picker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ impl EmotePickerWidget {

impl Component for EmotePickerWidget {
fn draw(&mut self, f: &mut Frame, area: Option<Rect>) {
let mut r = area.map_or_else(|| centered_rect(60, 60, 23, f.size()), |a| a);
let mut r = area.map_or_else(|| centered_rect(60, 60, 23, f.area()), |a| a);
// Make sure we have space for the input widget, which has a height of 3.
r.height -= 3;

Expand Down
4 changes: 2 additions & 2 deletions src/ui/components/error.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use tui::{
layout::{Alignment, Rect},
style::{Color, Style},
terminal::Frame,
text::{Line, Span},
widgets::{block::Title, Block, Borders, Clear, Paragraph},
Frame,
};

use crate::{
Expand Down Expand Up @@ -36,7 +36,7 @@ impl ErrorWidget {

impl Component for ErrorWidget {
fn draw(&mut self, f: &mut Frame, area: Option<Rect>) {
let r = area.map_or_else(|| f.size(), |a| a);
let r = area.map_or_else(|| f.area(), |a| a);

let paragraph = Paragraph::new(
self.message
Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ impl HelpWidget {

impl Component for HelpWidget {
fn draw(&mut self, f: &mut Frame, area: Option<Rect>) {
let r = area.map_or_else(|| f.size(), |a| a);
let r = area.map_or_else(|| f.area(), |a| a);

let mut rows = vec![];

Expand Down
12 changes: 6 additions & 6 deletions src/ui/components/utils/input_widget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ use rustyline::{
};
use std::fmt::Display;
use tui::{
layout::Rect,
layout::{Position as LayoutPosition, Rect},
style::{Color, Modifier, Style},
text::{Line, Span},
widgets::{block::Position, Block, Borders, Clear, Paragraph},
widgets::{block::Position as BlockPosition, Block, Borders, Clear, Paragraph},
Frame,
};

Expand Down Expand Up @@ -131,14 +131,14 @@ impl<T: Clone> Display for InputWidget<T> {

impl<T: Clone> Component for InputWidget<T> {
fn draw(&mut self, f: &mut Frame, area: Option<Rect>) {
let r = area.map_or_else(|| centered_rect(60, 60, 20, f.size()), |a| a);
let r = area.map_or_else(|| centered_rect(60, 60, 20, f.area()), |a| a);

let cursor_pos = get_cursor_position(&self.input);

f.set_cursor(
f.set_cursor_position(LayoutPosition::new(
(r.x + cursor_pos as u16 + 1).min(r.x + r.width.saturating_sub(2)),
r.y + 1,
);
));

let current_input = self.input.as_str();

Expand Down Expand Up @@ -216,7 +216,7 @@ impl<T: Clone> Component for InputWidget<T> {
.add_modifier(Modifier::BOLD)
},
))
.title_position(Position::Bottom)
.title_position(BlockPosition::Bottom)
.borders(Borders::BOTTOM | Borders::LEFT | Borders::RIGHT)
.border_type(self.config.borrow().frontend.border_type.clone().into());

Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/utils/search_widget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ where
U: SearchItemGetter<T>,
{
fn draw(&mut self, f: &mut Frame, area: Option<Rect>) {
let r = area.map_or_else(|| centered_rect(60, 60, 20, f.size()), |a| a);
let r = area.map_or_else(|| centered_rect(60, 60, 20, f.area()), |a| a);

if self.error_widget.is_focused() {
self.error_widget.draw(f, Some(r));
Expand Down

0 comments on commit e9e3508

Please sign in to comment.