Skip to content

A platform for community discussion. Free, open, simple.

FIX: Avoid double redirect after installing a theme (#32876)

Ted Johanssonc880aa78cebb
diff --git a/app/assets/javascripts/admin/addon/components/admin-config-areas/themes.gjs b/app/assets/javascripts/admin/addon/components/admin-config-areas/themes.gjs
index 1556c6d2d8b..b9944eb8c3a 100644
--- a/app/assets/javascripts/admin/addon/components/admin-config-areas/themes.gjs
+++ b/app/assets/javascripts/admin/addon/components/admin-config-areas/themes.gjs
@@ -65,13 +65,18 @@ export default class AdminConfigAreasThemes extends Component {
},
duration: "short",
});
- this.clearParams(theme.component ? "components" : "themes");
+ this.router.transitionTo(
+ `adminConfig.customize.${theme.component ? "components" : "themes"}`,
+ {
+ queryParams: { repoUrl: null, repoName: null },
+ }
+ );
this.router.refresh();
}
@action
- clearParams(type) {
- this.router.transitionTo(`adminConfig.customize.${type ?? "themes"}`, {
+ clearParams() {
+ this.router.transitionTo(this.router.currentRouteName, {
queryParams: { repoUrl: null, repoName: null },
});
}
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index 60c95832b5c..5e8f7f077cb 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -533,7 +533,7 @@ en:
other: "See %{count} new topics"
preview: "preview"
- cancel: "cancel"
+ cancel: "Cancel"
deleting: "Deleting…"