1 Commits

Author SHA1 Message Date
29baada708 fix(deps): update tokio-prost monorepo to 0.14.0 2025-06-19 00:27:43 +00:00
6 changed files with 709 additions and 768 deletions

1455
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,5 @@
# Git Now
> https://gitnow.kjuulh.io/
Git Now is a utility for easily navigating git projects from common upstream providers. Search, Download, and Enter projects as quickly as you can type.
![example gif](./assets/gifs/example.gif)

View File

@@ -1,7 +1,7 @@
[package]
name = "gitnow"
description = "Git Now is a utility for easily navigating git projects from common upstream providers. Search, Download, and Enter projects as quickly as you can type."
edition = "2024"
edition = "2021"
readme = "../../README.md"
repository = "https://github.com/kjuulh/gitnow"
homepage = "https://gitnow-client.prod.kjuulh.app"

View File

@@ -3,16 +3,18 @@ use std::time::Duration;
use crossterm::event::{EventStream, KeyCode};
use futures::{FutureExt, StreamExt};
use ratatui::{
TerminalOptions, Viewport, crossterm,
crossterm,
prelude::*,
widgets::{Block, Padding},
TerminalOptions, Viewport,
};
use crate::components::BatchCommand;
use super::{
Dispatch, IntoCommand, Msg, Receiver, create_dispatch,
create_dispatch,
spinner::{Spinner, SpinnerState},
Dispatch, IntoCommand, Msg, Receiver,
};
pub struct InlineCommand {
@@ -118,7 +120,7 @@ impl InlineCommand {
return Ok(true);
}
let mut cmd = self.update_state(msg);
let mut cmd = self.update_state(&msg);
loop {
let msg = cmd.into_command().execute(dispatch);
@@ -126,7 +128,7 @@ impl InlineCommand {
match msg {
Some(Msg::Quit) => return Ok(true),
Some(msg) => {
cmd = self.update_state(msg);
cmd = self.update_state(&msg);
}
None => break,
}
@@ -161,7 +163,7 @@ impl InlineCommand {
None
}
fn update_state(&mut self, msg: Msg) -> impl IntoCommand {
fn update_state(&mut self, msg: &Msg) -> impl IntoCommand {
tracing::debug!("handling message: {:?}", msg);
let mut batch = BatchCommand::default();
@@ -176,7 +178,7 @@ impl InlineCommand {
}
}
batch.with(self.spinner.update(&msg));
batch.with(self.spinner.update(msg));
batch.into_command()
}

View File

@@ -148,7 +148,7 @@ impl CacheDuration {
hours,
minutes,
} => Some(
std::time::Duration::from_hours(*days * 24)
std::time::Duration::from_days(*days)
+ std::time::Duration::from_hours(*hours)
+ std::time::Duration::from_mins(*minutes),
),

View File

@@ -1,3 +1,5 @@
#![feature(duration_constructors)]
use std::path::PathBuf;
use anyhow::Context;