app

Local-first trade for farms and co-ops
git clone https://radroots.dev/git/app.git
Log | Files | Refs | README | LICENSE

commit ec8162461c197159ed60f648c21ef0a93c75f81d
parent 4d4eaaf0fcf8be3f7c08a25fe4cddc70639294df
Author: triesap <tyson@radroots.org>
Date:   Sun,  7 Jun 2026 14:35:55 -0700

ui: add farm details heading

Diffstat:
Mcrates/desktop/src/source_guards.rs | 1+
Mcrates/desktop/src/window.rs | 23+++++++++++++----------
Mcrates/i18n/src/keys.rs | 1+
Mcrates/i18n/src/lib.rs | 4++++
Mi18n/locales/en/messages.json | 1+
5 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/crates/desktop/src/source_guards.rs b/crates/desktop/src/source_guards.rs @@ -387,6 +387,7 @@ const REQUIRED_WINDOW_COPY_KEYS: &[&str] = &[ "AppTextKey::AccountProfileLanguageValue", "AppTextKey::AccountProfileLanguageFrenchValue", "AppTextKey::AccountProfileLanguageSpanishValue", + "AppTextKey::AccountFarmDetailsTitle", "AppTextKey::AccountFarmDetailsFarmProfileTitle", "AppTextKey::AccountFarmDetailsFarmProfileIntro", "AppTextKey::AccountFarmDetailsFarmNameLabel", diff --git a/crates/desktop/src/window.rs b/crates/desktop/src/window.rs @@ -9123,19 +9123,21 @@ fn account_profile_panel( ) -> impl IntoElement { app_stack_v(APP_UI_THEME.shells.home_stack_gap_px) .w_full() - .child( - div() - .w_full() - .text_size(px(APP_UI_THEME.foundation.typography.body_text_px * 1.5)) - .font_weight(gpui::FontWeight::BOLD) - .text_color(rgb(APP_UI_THEME.foundation.text.primary)) - .child(app_shared_text( - AppTextKey::AccountProfilePersonalDetailsTitle, - )), - ) + .child(account_section_heading( + AppTextKey::AccountProfilePersonalDetailsTitle, + )) .child(account_profile_details_card(form, cx)) } +fn account_section_heading(label_key: AppTextKey) -> impl IntoElement { + div() + .w_full() + .text_size(px(APP_UI_THEME.foundation.typography.body_text_px * 1.5)) + .font_weight(gpui::FontWeight::BOLD) + .text_color(rgb(APP_UI_THEME.foundation.text.primary)) + .child(app_shared_text(label_key)) +} + fn account_profile_details_card( form: &AccountProfileFormState, cx: &mut Context<HomeView>, @@ -9357,6 +9359,7 @@ fn account_farm_profile_panel( ) -> impl IntoElement { app_stack_v(APP_UI_THEME.shells.home_stack_gap_px) .w_full() + .child(account_section_heading(AppTextKey::AccountFarmDetailsTitle)) .child( div() .w_full() diff --git a/crates/i18n/src/keys.rs b/crates/i18n/src/keys.rs @@ -55,6 +55,7 @@ define_app_text_keys! { AccountProfileLanguageValue => "account.profile.language.value", AccountProfileLanguageFrenchValue => "account.profile.language.french.value", AccountProfileLanguageSpanishValue => "account.profile.language.spanish.value", + AccountFarmDetailsTitle => "account.farm_details.title", AccountFarmDetailsFarmProfileTitle => "account.farm_details.farm_profile.title", AccountFarmDetailsFarmProfileIntro => "account.farm_details.farm_profile.intro", AccountFarmDetailsFarmNameLabel => "account.farm_details.farm_name.label", diff --git a/crates/i18n/src/lib.rs b/crates/i18n/src/lib.rs @@ -190,6 +190,10 @@ mod tests { "+1 250 202 3030" ); assert_eq!( + app_text(AppTextKey::AccountFarmDetailsTitle), + "Farm details" + ); + assert_eq!( app_text(AppTextKey::AccountFarmDetailsFarmProfileTitle), "Farm profile" ); diff --git a/i18n/locales/en/messages.json b/i18n/locales/en/messages.json @@ -34,6 +34,7 @@ "account.profile.language.value": "English", "account.profile.language.french.value": "French", "account.profile.language.spanish.value": "Spanish", + "account.farm_details.title": "Farm details", "account.farm_details.farm_profile.title": "Farm profile", "account.farm_details.farm_profile.intro": "Tell us about your farm. This information helps build your public profile and connect you with customers.", "account.farm_details.farm_name.label": "Farm name *",