FIX: Rename connector template to resolve conflict

FIX: Rename connector template to resolve conflict

diff --git a/assets/javascripts/discourse/connectors/bread-crumbs-right/solved-status-filter.hbs b/assets/javascripts/discourse/connectors/bread-crumbs-right/solved-status-filter.hbs
new file mode 100644
index 0000000..e85eadc
--- /dev/null
+++ b/assets/javascripts/discourse/connectors/bread-crumbs-right/solved-status-filter.hbs
@@ -0,0 +1 @@
+{{combo-box content=statuses value=status valueAttribute="value" onSelect=(action "changeStatus")}}
diff --git a/assets/javascripts/discourse/connectors/bread-crumbs-right/solved-status-filter.js.es6 b/assets/javascripts/discourse/connectors/bread-crumbs-right/solved-status-filter.js.es6
new file mode 100644
index 0000000..3319e23
--- /dev/null
+++ b/assets/javascripts/discourse/connectors/bread-crumbs-right/solved-status-filter.js.es6
@@ -0,0 +1,60 @@
+import DiscourseUrl from "discourse/lib/url";
+
+export default {
+  shouldRender(args, component) {
+    if (!component.siteSettings.show_filter_by_solved_status) {
+      return false;
+    } else if (component.siteSettings.allow_solved_on_all_topics) {
+      return true;
+    } else {
+      const controller = Discourse.__container__.lookup(
+        "controller:navigation/category"
+      );
+
+      return controller && controller.get("category.enable_accepted_answers");
+    }
+  },
+
+  setupComponent(args, component) {
+    const statuses = ["all", "solved", "unsolved"].map(status => {
+      return {
+        name: I18n.t(`solved.topic_status_filter.${status}`),
+        value: status
+      };
+    });
+    component.set("statuses", statuses);
+
+    const queryStrings = window.location.search;
+    if (queryStrings.match(/solved=yes/)) {
+      component.set("status", "solved");
+    } else if (queryStrings.match(/solved=no/)) {
+      component.set("status", "unsolved");
+    } else {
+      component.set("status", "all");
+    }
+  },
+
+  actions: {
+    changeStatus(newStatus) {
+      let location = window.location;
+      let queryStrings = location.search;
+      let params = queryStrings.startsWith("?")
+        ? queryStrings.substr(1).split("&")
+        : [];
+
+      params = params.filter(param => {
+        return !param.startsWith("solved=");
+      });
+
+      if (newStatus && newStatus !== "all") {
+        newStatus = newStatus === "solved" ? "yes" : "no";
+        params.push(`solved=${newStatus}`);
+      }
+
+      queryStrings = params.length > 0 ? `?${params.join("&")}` : "";
+      DiscourseUrl.routeTo(
+        `${location.pathname}${queryStrings}${location.hash}`
+      );
+    }
+  }
+};
diff --git a/assets/javascripts/discourse/connectors/bread-crumbs-right/topic-status-filter.hbs b/assets/javascripts/discourse/connectors/bread-crumbs-right/topic-status-filter.hbs
deleted file mode 100644
index e85eadc..0000000
--- a/assets/javascripts/discourse/connectors/bread-crumbs-right/topic-status-filter.hbs
+++ /dev/null
@@ -1 +0,0 @@
-{{combo-box content=statuses value=status valueAttribute="value" onSelect=(action "changeStatus")}}
diff --git a/assets/javascripts/discourse/connectors/bread-crumbs-right/topic-status-filter.js.es6 b/assets/javascripts/discourse/connectors/bread-crumbs-right/topic-status-filter.js.es6
deleted file mode 100644
index 3319e23..0000000
--- a/assets/javascripts/discourse/connectors/bread-crumbs-right/topic-status-filter.js.es6
+++ /dev/null
@@ -1,60 +0,0 @@
-import DiscourseUrl from "discourse/lib/url";
-
-export default {
-  shouldRender(args, component) {
-    if (!component.siteSettings.show_filter_by_solved_status) {
-      return false;
-    } else if (component.siteSettings.allow_solved_on_all_topics) {
-      return true;
-    } else {
-      const controller = Discourse.__container__.lookup(
-        "controller:navigation/category"
-      );
-
-      return controller && controller.get("category.enable_accepted_answers");
-    }
-  },
-
-  setupComponent(args, component) {
-    const statuses = ["all", "solved", "unsolved"].map(status => {
-      return {
-        name: I18n.t(`solved.topic_status_filter.${status}`),
-        value: status
-      };
-    });
-    component.set("statuses", statuses);
-
-    const queryStrings = window.location.search;
-    if (queryStrings.match(/solved=yes/)) {
-      component.set("status", "solved");
-    } else if (queryStrings.match(/solved=no/)) {
-      component.set("status", "unsolved");
-    } else {
-      component.set("status", "all");
-    }
-  },
-
-  actions: {
-    changeStatus(newStatus) {
-      let location = window.location;
-      let queryStrings = location.search;
-      let params = queryStrings.startsWith("?")
-        ? queryStrings.substr(1).split("&")
-        : [];
-
-      params = params.filter(param => {
-        return !param.startsWith("solved=");
-      });
-
-      if (newStatus && newStatus !== "all") {
-        newStatus = newStatus === "solved" ? "yes" : "no";
-        params.push(`solved=${newStatus}`);
-      }
-
-      queryStrings = params.length > 0 ? `?${params.join("&")}` : "";
-      DiscourseUrl.routeTo(
-        `${location.pathname}${queryStrings}${location.hash}`
-      );
-    }
-  }
-};

GitHub sha: 30146dbb

1 Like