From a3ad52982175b786acde2291428cb5302eeb99ba Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Mon, 21 Apr 2025 22:13:04 +0200 Subject: [PATCH] Merge deprecations with main --- .gitignore | 1 + .../components/global-admin.hbs | 30 ++- .../components/modal/update-pages-remote.hbs | 20 +- .../components/modal/update-pages-remote.js | 2 +- .../{templates => }/components/page-admin.hbs | 72 +++--- .../topic-landing-page-info.hbs | 4 +- .../admin-plugins-landing-pages.js | 218 +++++++++--------- .../templates/admin-plugins-landing-pages.hbs | 30 +-- plugin.rb | 5 +- 9 files changed, 198 insertions(+), 184 deletions(-) rename assets/javascripts/discourse/{templates => }/components/global-admin.hbs (69%) rename assets/javascripts/discourse/{templates => }/components/page-admin.hbs (75%) diff --git a/.gitignore b/.gitignore index 6f1b7c9..df42a69 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ node_modules /gems /autogenerated +.DS_Store diff --git a/assets/javascripts/discourse/templates/components/global-admin.hbs b/assets/javascripts/discourse/components/global-admin.hbs similarity index 69% rename from assets/javascripts/discourse/templates/components/global-admin.hbs rename to assets/javascripts/discourse/components/global-admin.hbs index 568fa8a..ffad4dd 100644 --- a/assets/javascripts/discourse/templates/components/global-admin.hbs +++ b/assets/javascripts/discourse/components/global-admin.hbs @@ -4,16 +4,16 @@
- {{#if resultIcon}} - {{d-icon resultIcon}} + {{#if this.resultIcon}} + {{d-icon this.resultIcon}} {{/if}} - {{conditional-loading-spinner condition=updatingGlobal size="small"}} + {{conditional-loading-spinner condition=this.updatingGlobal size="small"}} {{d-button action=(action "destroyGlobal") label="admin.landing_pages.destroy" - disabled=updatingGlobal + disabled=this.updatingGlobal icon="xmark" }} @@ -21,7 +21,7 @@ action=(action "saveGlobal") label="admin.landing_pages.save" class="btn-primary" - disabled=updatingGlobal + disabled=this.updatingGlobal icon="floppy-disk" }}
@@ -33,7 +33,7 @@ {{i18n "admin.landing_pages.global.scripts.label"}} - {{value-list values=scripts inputType="array"}} + {{value-list values=this.scripts inputType="array"}}
{{{i18n "admin.landing_pages.global.scripts.description"}}} @@ -49,11 +49,14 @@ {{{i18n "admin.landing_pages.global.header.description"}}}
- - {{#if jsonHeaderError}} + + {{#if this.jsonHeaderError}} {{d-icon "xmark"}} - {{i18n "admin.landing_pages.global.header.error" error=jsonHeaderError}} + {{i18n + "admin.landing_pages.global.header.error" + error=this.jsonHeaderError + }} {{/if}} @@ -67,11 +70,14 @@ {{{i18n "admin.landing_pages.global.footer.description"}}} - - {{#if jsonFooterError}} + + {{#if this.jsonFooterError}} {{d-icon "xmark"}} - {{i18n "admin.landing_pages.global.footer.error" error=jsonFooterError}} + {{i18n + "admin.landing_pages.global.footer.error" + error=this.jsonFooterError + }} {{/if}} diff --git a/assets/javascripts/discourse/components/modal/update-pages-remote.hbs b/assets/javascripts/discourse/components/modal/update-pages-remote.hbs index 3890df8..64ac88f 100644 --- a/assets/javascripts/discourse/components/modal/update-pages-remote.hbs +++ b/assets/javascripts/discourse/components/modal/update-pages-remote.hbs @@ -6,17 +6,17 @@ <:body>
{{i18n "admin.landing_pages.remote.url"}}
- +
{{i18n "admin.customize.theme.remote_branch"}}
- +
@@ -24,7 +24,7 @@ {{#if showPublicKey}}
{{i18n "admin.customize.theme.public_key"}}
-