Replace i18n button labels with admin settings and reorder in UI
- Add login_button_text and register_button_text to settings.yml - Position button settings directly after hero_content_anonymous_html - Remove i18n helper import from component - Use settings for button text instead of translations - Update locales files with setting descriptions - Button text now fully configurable in admin panel
This commit is contained in:
parent
59859747f6
commit
4176b14594
4 changed files with 14 additions and 13 deletions
|
|
@ -9,7 +9,6 @@ import willDestroy from "@ember/render-modifiers/modifiers/will-destroy";
|
|||
import SearchMenu from "discourse/components/search-menu";
|
||||
import DButton from "discourse/components/d-button";
|
||||
import icon from "discourse-common/helpers/d-icon";
|
||||
import i18n from "discourse-common/helpers/i18n";
|
||||
|
||||
export default class WelcomeBanner extends Component {
|
||||
@service router;
|
||||
|
|
@ -93,12 +92,12 @@ export default class WelcomeBanner extends Component {
|
|||
<div class="hero-buttons">
|
||||
<DButton
|
||||
@action={{this.goToLogin}}
|
||||
@translatedLabel={{i18n "welcome_banner.buttons.login"}}
|
||||
@label={{settings.login_button_text}}
|
||||
class="btn-primary hero-login-btn"
|
||||
/>
|
||||
<DButton
|
||||
@action={{this.goToSignup}}
|
||||
@translatedLabel={{i18n "welcome_banner.buttons.register"}}
|
||||
@label={{settings.register_button_text}}
|
||||
class="btn-default hero-register-btn"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -52,8 +52,5 @@ en:
|
|||
cta_card_4_cta_icon: "CTA card 4 arrow icon (Font Awesome). Examples: 'chevron-right', 'arrow-right', 'angles-right', 'circle-arrow-right'"
|
||||
cta_card_4_url: "CTA card 4 URL"
|
||||
custom_css: "Custom CSS to override or extend banner styles. Example: .welcome-card { background: blue; }"
|
||||
js:
|
||||
welcome_banner:
|
||||
buttons:
|
||||
login: "Log in"
|
||||
register: "Sign up"
|
||||
login_button_text: "Login button text for anonymous users"
|
||||
register_button_text: "Register button text for anonymous users"
|
||||
|
|
|
|||
|
|
@ -52,8 +52,5 @@ hu:
|
|||
cta_card_4_cta_icon: "4. CTA kártya nyíl ikon (Font Awesome). Példák: 'chevron-right', 'arrow-right', 'angles-right', 'circle-arrow-right'"
|
||||
cta_card_4_url: "4. CTA kártya URL-je"
|
||||
custom_css: "Egyedi CSS a banner stílusok felülírásához vagy kiterjesztéséhez. Példa: .welcome-card { background: blue; }"
|
||||
js:
|
||||
welcome_banner:
|
||||
buttons:
|
||||
login: "Belépés"
|
||||
register: "Regisztráció"
|
||||
login_button_text: "Belépés gomb szövege nem bejelentkezett felhasználóknak"
|
||||
register_button_text: "Regisztráció gomb szövege nem bejelentkezett felhasználóknak"
|
||||
|
|
|
|||
|
|
@ -72,6 +72,14 @@ hero_content_anonymous_html:
|
|||
type: string
|
||||
textarea: true
|
||||
|
||||
login_button_text:
|
||||
default: "Belépés"
|
||||
type: string
|
||||
|
||||
register_button_text:
|
||||
default: "Regisztráció"
|
||||
type: string
|
||||
|
||||
# =============================================================================
|
||||
# 🔍 SEARCH SETTINGS
|
||||
# =============================================================================
|
||||
|
|
|
|||
Loading…
Reference in a new issue