diff --git a/assets/javascripts/wizard/components/suggested-validator.js.es6 b/assets/javascripts/wizard/components/suggested-validator.js.es6
index 599723e3..b5847c16 100644
--- a/assets/javascripts/wizard/components/suggested-validator.js.es6
+++ b/assets/javascripts/wizard/components/suggested-validator.js.es6
@@ -48,6 +48,8 @@ export default WizardFieldValidator.extend({
},
actions: {
- closeMessage(){}
+ closeMessage(){
+ this.set('showMessage', false);
+ }
}
});
\ No newline at end of file
diff --git a/assets/javascripts/wizard/helpers/date-node.js.es6 b/assets/javascripts/wizard/helpers/date-node.js.es6
new file mode 100644
index 00000000..99fa01f3
--- /dev/null
+++ b/assets/javascripts/wizard/helpers/date-node.js.es6
@@ -0,0 +1,22 @@
+import { registerUnbound } from "discourse-common/lib/helpers";
+import { longDate, number, relativeAge } from "discourse/lib/formatter";
+
+export default registerUnbound("date-node", function (dt) {
+ if (typeof dt === "string") {
+ dt = new Date(dt);
+ }
+ if (dt) {
+ const attributes = {
+ title: longDate(dt),
+ "data-time": dt.getTime(),
+ "data-format": "tiny",
+ };
+
+ const finalString = `${relativeAge(dt)}`;
+ return new Handlebars.SafeString(finalString);
+ }
+});
diff --git a/assets/javascripts/wizard/templates/components/suggested-validator.hbs b/assets/javascripts/wizard/templates/components/suggested-validator.hbs
index 87ddd03f..651ad25e 100644
--- a/assets/javascripts/wizard/templates/components/suggested-validator.hbs
+++ b/assets/javascripts/wizard/templates/components/suggested-validator.hbs
@@ -1,10 +1,9 @@
{{#if similarTopics}}
- {{d-icon "times"}}
-
{{i18n "composer.similar_topics"}}
-
-
-
- {{mount-widget widget="search-result-topic" args=(hash results=similarTopics)}}
-
+ {{i18n 'realtime_validations.similar_topics_heading'}}
+
+ {{#each similarTopics as |similarTopic|}}
+ {{wizard-similar-topic topic=similarTopic}}
+ {{/each}}
+
{{/if}}
diff --git a/assets/javascripts/wizard/templates/components/wizard-similar-topic.hbs b/assets/javascripts/wizard/templates/components/wizard-similar-topic.hbs
new file mode 100644
index 00000000..eeaaa751
--- /dev/null
+++ b/assets/javascripts/wizard/templates/components/wizard-similar-topic.hbs
@@ -0,0 +1,4 @@
+
+ {{html-safe topic.fancy_title}}
+ {{date-node topic.created_at}} - {{html-safe topic.blurb}}
+
diff --git a/assets/stylesheets/wizard/custom/field.scss b/assets/stylesheets/wizard/custom/field.scss
index c791d41a..8e36ff76 100644
--- a/assets/stylesheets/wizard/custom/field.scss
+++ b/assets/stylesheets/wizard/custom/field.scss
@@ -155,4 +155,18 @@
.select-kit.combo-box.group-dropdown {
min-width: 220px;
}
+}
+
+.wizard-similar-topics {
+ background-color: var(--tertiary-low);
+ padding: 5px;
+ .title {
+ color: var(--primary);
+ }
+
+ .blurb {
+ margin-left: 0.5em;
+ color: var(--primary-high);
+ font-size: $font-down-1;
+ }
}
\ No newline at end of file
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index 0ae2abc2..903c9fce 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -520,3 +520,5 @@ en:
yourself_confirm:
title: "Did you forget to add recipients?"
body: "Right now this message is only being sent to yourself!"
+ realtime_validations:
+ similar_topics_heading: "Your topic is similar to..."