Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions harbor-ui/src/components/colors.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use iced::Color;

pub const MUTINY_GREEN: Color = Color::from_rgb(40. / 255., 164. / 255., 127. / 255.);
pub const MUTINY_RED: Color = Color::from_rgb(250. / 255., 0., 80. / 255.);
pub const MUTINY_GREEN: Color = Color::from_rgb8(40, 164, 127);
pub const MUTINY_RED: Color = Color::from_rgb8(250, 0, 80);
pub const BACKGROUND_GREY: Color = Color::from_rgb8(23, 23, 25);
pub const WARNING_YELLOW: Color = Color::from_rgb8(255, 165, 0);
8 changes: 4 additions & 4 deletions harbor-ui/src/components/screen_header.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use super::{
SvgIcon, borderless_pick_list_style, format_amount, gray, green, hr, map_icon, menu_style, red,
vr,
SvgIcon, borderless_pick_list_style, format_amount, gray, hr, map_icon, menu_style, vr,
};
use crate::components::{MUTINY_GREEN, MUTINY_RED};
use crate::{HarborWallet, Message, ReceiveStatus};
use harbor_client::MintIdentifier;
use harbor_client::db_models::MintItem;
Expand Down Expand Up @@ -73,7 +73,7 @@ pub fn h_screen_header(
let tor_enabled = harbor.tor_enabled;
let rich_tor = rich_text([
span("Tor ").size(16).color(gray()),
span("enabled").size(16).color(green()),
span("enabled").size(16).color(MUTINY_GREEN),
])
.on_link_click(never);
let secured = if tor_enabled {
Expand All @@ -82,7 +82,7 @@ pub fn h_screen_header(
row![
rich_text([
span("Tor ").size(16).color(gray()),
span("disabled").size(16).color(red()),
span("disabled").size(16).color(MUTINY_RED),
])
.on_link_click(never),
shield_alert_icon
Expand Down
16 changes: 5 additions & 11 deletions harbor-ui/src/components/styles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ use iced::{
widget::{checkbox, container::Style as ContainerStyle, pick_list, text::Style},
};

use crate::components::BACKGROUND_GREY;

use super::{darken, lighten};

use iced::{
Expand All @@ -22,8 +24,8 @@ pub fn very_subtle(theme: &Theme) -> Style {
}

pub fn link() -> Color {
// This is the same theme.pallette().background just without needing `Theme`
lighten(Color::from_rgb8(23, 23, 25), 0.7)
// This is the same theme.palette().background just without needing `Theme`
Copy link

Copilot AI Sep 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed typo: 'pallette' should be 'palette' in the comment.

Copilot uses AI. Check for mistakes.
lighten(BACKGROUND_GREY, 0.7)
}

const REGULAR_FONT: Font = Font {
Expand All @@ -49,15 +51,7 @@ pub fn regular_text(content: String, size: u16) -> Text<'static> {
}

pub fn gray() -> Color {
lighten(Color::from_rgb8(23, 23, 25), 0.5)
}

pub fn green() -> Color {
Color::from_rgb8(40, 164, 127)
}

pub fn red() -> Color {
Color::from_rgb8(250, 0, 80)
lighten(BACKGROUND_GREY, 0.5)
}

pub fn menu_style(theme: &Theme) -> menu::Style {
Expand Down
7 changes: 3 additions & 4 deletions harbor-ui/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

use crate::bridge::run_core;
use crate::components::confirm_modal::{BasicModalState, ConfirmModalState};
use crate::components::focus_input_id;
use crate::components::{BACKGROUND_GREY, WARNING_YELLOW, focus_input_id};
use crate::components::{Toast, ToastManager, ToastStatus};
use crate::config::{Config, write_config};
use components::{MUTINY_GREEN, MUTINY_RED};
Expand Down Expand Up @@ -1396,13 +1396,12 @@ impl HarborWallet {
iced::Theme::custom(
String::from("Custom"),
iced::theme::Palette {
background: Color::from_rgb8(23, 23, 25),
background: BACKGROUND_GREY,
primary: MUTINY_RED,
text: Color::WHITE,
success: MUTINY_GREEN,
danger: MUTINY_RED,
// TODO: do we need a warning yellow?
warning: Color::from_rgb8(255, 165, 0),
warning: WARNING_YELLOW,
},
)
}
Expand Down
4 changes: 2 additions & 2 deletions harbor-ui/src/routes/restore.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{
UnlockStatus, WelcomeStatus,
components::{InputArgs, SvgIcon, h_button, h_input, harbor_logo, the_spinner},
components::{InputArgs, MUTINY_RED, SvgIcon, h_button, h_input, harbor_logo, the_spinner},
};
use iced::{Alignment, Element, Length};
use iced::{
Expand Down Expand Up @@ -33,7 +33,7 @@ pub fn restore(harbor: &HarborWallet) -> Element<Message> {
"Failed to initialize wallet. Config error: {error}"
))
.size(24)
.color(iced::Color::from_rgb8(250, 0, 80))
.color(MUTINY_RED)
]
.spacing(32)
.align_x(Alignment::Center)
Expand Down
20 changes: 9 additions & 11 deletions harbor-ui/src/routes/unlock.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
use crate::{
UnlockStatus,
components::{InputArgs, SvgIcon, h_button, h_input, harbor_logo},
components::{InputArgs, MUTINY_RED, SvgIcon, h_button, h_input, harbor_logo},
};
use iced::widget::{center, column, container, text};
use iced::{Alignment, Element, Length};
use iced::{
Color,
widget::{center, column, container, text},
};

use crate::{HarborWallet, Message};

Expand Down Expand Up @@ -41,16 +38,17 @@ pub fn unlock(harbor: &HarborWallet) -> Element<Message> {
.align_x(Alignment::Center)
.width(Length::Fixed(256.));

let page_column = page_column.push_maybe(harbor.unlock_failure_reason.as_ref().map(|r| {
text(format!("Error: {r:?}"))
.size(24)
.color(Color::from_rgb8(250, 0, 80))
}));
let page_column = page_column.push_maybe(
harbor
.unlock_failure_reason
.as_ref()
.map(|r| text(format!("Error: {r:?}")).size(24).color(MUTINY_RED)),
);

let page_column = page_column.push_maybe(harbor.init_failure_reason.as_ref().map(|r| {
text(format!("Init Error: {r:?}"))
.size(24)
.color(Color::from_rgb8(250, 0, 80))
.color(MUTINY_RED)
}));

container(center(page_column)).into()
Expand Down
3 changes: 2 additions & 1 deletion harbor-ui/src/routes/welcome.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use crate::components::MUTINY_RED;
use crate::routes::Route;
use crate::{HarborWallet, Message};
use crate::{
Expand Down Expand Up @@ -33,7 +34,7 @@ pub fn welcome(harbor: &HarborWallet) -> Element<Message> {
"Failed to initialize wallet. Config error: {error}"
))
.size(24)
.color(iced::Color::from_rgb8(250, 0, 80))
.color(MUTINY_RED)
]
.spacing(32)
.align_x(Alignment::Center)
Expand Down
Loading