Skip to content

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

FIX: rewind's urls missing subfolder path (#36632)

Renato Atilio16abc759c266
diff --git a/plugins/discourse-rewind/assets/javascripts/discourse/components/reports/chat-usage.gjs b/plugins/discourse-rewind/assets/javascripts/discourse/components/reports/chat-usage.gjs
index 39d0d72587a..bb2a4cef988 100644
--- a/plugins/discourse-rewind/assets/javascripts/discourse/components/reports/chat-usage.gjs
+++ b/plugins/discourse-rewind/assets/javascripts/discourse/components/reports/chat-usage.gjs
@@ -138,7 +138,7 @@ export default class ChatUsage extends Component {
{{#each this.favoriteChannels as |channel|}}
<a
class="chat-channel-link"
- href={{concat "/chat/c/-/" channel.channel_id}}
+ href={{getURL (concat "/chat/c/-/" channel.channel_id)}}
>
<span
class="chat-channel-link__name"
diff --git a/plugins/discourse-rewind/assets/javascripts/discourse/components/reports/invites.gjs b/plugins/discourse-rewind/assets/javascripts/discourse/components/reports/invites.gjs
index a20afd3cb01..dea095b92d9 100644
--- a/plugins/discourse-rewind/assets/javascripts/discourse/components/reports/invites.gjs
+++ b/plugins/discourse-rewind/assets/javascripts/discourse/components/reports/invites.gjs
@@ -2,6 +2,7 @@ import Component from "@glimmer/component";
import { concat } from "@ember/helper";
import avatar from "discourse/helpers/bound-avatar-template";
import number from "discourse/helpers/number";
+import getURL from "discourse/lib/get-url";
import { i18n } from "discourse-i18n";
export default class Invites extends Component {
@@ -103,7 +104,7 @@ export default class Invites extends Component {
</div>
<a
- href={{concat "/u/" this.mostActiveInvitee.username}}
+ href={{getURL (concat "/u/" this.mostActiveInvitee.username)}}
class="guest-book__signature"
>
{{avatar
diff --git a/plugins/discourse-rewind/assets/javascripts/discourse/components/reports/most-viewed-tags.gjs b/plugins/discourse-rewind/assets/javascripts/discourse/components/reports/most-viewed-tags.gjs
index b32db50175a..1670d241a84 100644
--- a/plugins/discourse-rewind/assets/javascripts/discourse/components/reports/most-viewed-tags.gjs
+++ b/plugins/discourse-rewind/assets/javascripts/discourse/components/reports/most-viewed-tags.gjs
@@ -4,6 +4,7 @@ import { concat, fn } from "@ember/helper";
import { on } from "@ember/modifier";
import { action } from "@ember/object";
import concatClass from "discourse/helpers/concat-class";
+import getURL from "discourse/lib/get-url";
import { eq } from "discourse/truth-helpers";
import { i18n } from "discourse-i18n";
@@ -39,14 +40,14 @@ export default class MostViewedTags extends Component {
"folder-wrapper"
(if (eq this.openedTag data.name) "--opened" "")
}}
- href={{concat "/tag/" data.name}}
+ href={{getURL (concat "/tag/" data.name)}}
{{on "click" (fn this.handleFolderClick data.name)}}
>
<span class="folder-tab"></span>
<div class="rewind-card">
<p
class="most-viewed-tags__tag"
- href={{concat "/tag/" data.name}}
+ href={{getURL (concat "/tag/" data.name)}}
>
#{{data.name}}
</p>