From f7fbd648cb6115ee92d0112df559fff5bce0b097 Mon Sep 17 00:00:00 2001 From: jasonwitty Date: Sun, 17 May 2026 05:13:09 -0700 Subject: [PATCH] style: cargo fmt --- scripts/sync-gitea.sh | 26 ++++++++++++++++++++++++++ socktop/src/ui/modal_connection.rs | 12 +++++++----- 2 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 scripts/sync-gitea.sh diff --git a/scripts/sync-gitea.sh b/scripts/sync-gitea.sh new file mode 100644 index 0000000..4270de0 --- /dev/null +++ b/scripts/sync-gitea.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash +set -euo pipefail + +# Sync this repo to the 'gitea' remote as a mirror. +# - Mirrors ALL refs (branches, tags) and prunes removed ones. +# - This makes the Gitea repo match GitHub exactly. + +if ! git rev-parse --is-inside-work-tree >/dev/null 2>&1; then + echo "Error: not inside a git repo" >&2 + exit 1 +fi + +if ! git remote get-url gitea >/dev/null 2>&1; then + echo "Missing 'gitea' remote. Add it with:" >&2 + echo " git remote add gitea https://gt.wittyoneoff.com/jason/socktop.git" >&2 + exit 1 +fi + +echo "Fetching from origin (pruning)..." +git fetch origin --prune --tags + +echo "Pushing mirror to gitea..." +git push gitea --mirror + +echo "Done: Gitea should now match origin (GitHub)." + diff --git a/socktop/src/ui/modal_connection.rs b/socktop/src/ui/modal_connection.rs index c51d4be..1bab63c 100644 --- a/socktop/src/ui/modal_connection.rs +++ b/socktop/src/ui/modal_connection.rs @@ -41,11 +41,13 @@ impl ModalManager { ]) .split(area); let block = Block::default() - .title(Line::from(ICON_WARNING_TITLE).style( - Style::default() - .fg(MODAL_TITLE_FG) - .add_modifier(Modifier::BOLD), - )) + .title( + Line::from(ICON_WARNING_TITLE).style( + Style::default() + .fg(MODAL_TITLE_FG) + .add_modifier(Modifier::BOLD), + ), + ) .borders(Borders::ALL) .border_style(Style::default().fg(MODAL_BORDER_FG)) .style(Style::default().bg(MODAL_BG).fg(MODAL_FG));