From a820be117cd508e6df0e14b75c31eeca607347fc Mon Sep 17 00:00:00 2001 From: Isaac Janzen <50783505+janzenisaac@users.noreply.github.com> Date: Thu, 3 Aug 2023 10:52:04 -0500 Subject: [PATCH] DEV: Convert `install-theme` modal to component-based API (#22939) --- .../addon/components/modal/install-theme.hbs | 198 ++++++++++++++ .../addon/components/modal/install-theme.js | 229 ++++++++++++++++ .../controllers/modals/admin-install-theme.js | 249 ------------------ .../addon/routes/admin-customize-themes.js | 64 +++-- .../templates/modal/admin-install-theme.hbs | 186 ------------- .../discourse/app/services/modal.js | 1 - .../admin-install-theme-modal-test.js | 1 + 7 files changed, 475 insertions(+), 453 deletions(-) create mode 100644 app/assets/javascripts/admin/addon/components/modal/install-theme.hbs create mode 100644 app/assets/javascripts/admin/addon/components/modal/install-theme.js delete mode 100644 app/assets/javascripts/admin/addon/controllers/modals/admin-install-theme.js delete mode 100644 app/assets/javascripts/admin/addon/templates/modal/admin-install-theme.hbs diff --git a/app/assets/javascripts/admin/addon/components/modal/install-theme.hbs b/app/assets/javascripts/admin/addon/components/modal/install-theme.hbs new file mode 100644 index 00000000000..b9d55e46bfb --- /dev/null +++ b/app/assets/javascripts/admin/addon/components/modal/install-theme.hbs @@ -0,0 +1,198 @@ + + <:body> + {{#unless this.directRepoInstall}} +
+ + + + +
+ {{/unless}} +
+ {{#if this.popular}} + + {{/if}} + {{#if this.local}} +
+ +
+ + {{i18n "admin.customize.theme.import_file_tip"}} + +
+ {{/if}} + {{#if this.remote}} +
+
+
+ {{i18n "admin.customize.theme.import_web_tip"}} +
+ +
+ + {{#if this.advancedVisible}} +
+
+ {{i18n "admin.customize.theme.remote_branch"}} +
+ +
+ {{/if}} + {{#if this.showPublicKey}} +
+
+ {{i18n "admin.customize.theme.public_key"}} +
+
+