A platform for community discussion. Free, open, simple.
DEV: Add join date to reviewable insight (#36283)
Ted Johansson5d127ab8c279
diff --git a/config/locales/client.en.yml b/config/locales/client.en.ymlindex 5ec99a3353f..1694848bcf7 100644--- a/config/locales/client.en.yml+++ b/config/locales/client.en.yml@@ -977,7 +977,7 @@ en:other: "%{count} confirmed flags"user_activity: "User info"activities:- new_account: "new account"+ joined_on: "joined: %{joinDate}"trust_level: "trust level: %{trustLevelName}"posts:one: "%{count} post"diff --git a/frontend/discourse/app/components/reviewable-refresh/insights.gjs b/frontend/discourse/app/components/reviewable-refresh/insights.gjsindex 7631d034bef..07e08f0697f 100644--- a/frontend/discourse/app/components/reviewable-refresh/insights.gjs+++ b/frontend/discourse/app/components/reviewable-refresh/insights.gjs@@ -1,5 +1,6 @@import Component from "@glimmer/component";import { htmlSafe } from "@ember/template";+import { shortDate } from "discourse/lib/formatter";import { i18n } from "discourse-i18n";/**@@ -45,9 +46,6 @@ export default class ReviewableInsights extends Component {const activities = [];if (user) {- if (Date.now() - Date.parse(user.created_at) < 7 * 24 * 60 * 60 * 1000) {- activities.push(i18n("review.insights.activities.new_account"));- }if (user.trustLevel) {activities.push(i18n("review.insights.activities.trust_level", {@@ -55,6 +53,11 @@ export default class ReviewableInsights extends Component {}));}+ activities.push(+ i18n("review.insights.activities.joined_on", {+ joinDate: shortDate(user.created_at),+ })+ );}const postCount = user?.post_count || 0;