From 311c042700f986d7af9091c84d0cb44661740bd2 Mon Sep 17 00:00:00 2001 From: "Ella E." Date: Mon, 28 Oct 2024 09:39:51 -0600 Subject: [PATCH] UX: Add description config area card (#29418) * DEV: add a description to the config area card component * UX: update strings and placeholders for your org config area card --- .../addon/components/admin-config-area-card.gjs | 16 ++++++++++++++++ .../components/admin-config-areas/about.gjs | 1 + config/locales/client.en.yml | 15 ++++++++------- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/app/assets/javascripts/admin/addon/components/admin-config-area-card.gjs b/app/assets/javascripts/admin/addon/components/admin-config-area-card.gjs index ecb4396f648..22af1e94b92 100644 --- a/app/assets/javascripts/admin/addon/components/admin-config-area-card.gjs +++ b/app/assets/javascripts/admin/addon/components/admin-config-area-card.gjs @@ -16,6 +16,17 @@ export default class AdminConfigAreaCard extends Component { return this.args.heading || this.args.translatedHeading; } + get computedDescription() { + if (this.args.description) { + return I18n.t(this.args.description); + } + return this.args.translatedDescription; + } + + get hasDescription() { + return this.args.description || this.args.translatedDescription; + } +