* Adding some active users aggregate fields.
* Adding active users / month to communities page.
-Subproject commit c4cd53cdc6ef588c1b19bc9c5ddfeb09ecae4516
+Subproject commit b914a9696bc4fadc46fdca655c94c3b4cedf3e8c
"eslint": "^7.18.0",
"eslint-plugin-jane": "^9.0.6",
"husky": "^4.3.8",
- "lemmy-js-client": "0.9.1-rc.1",
+ "lemmy-js-client": "0.9.1-rc.3",
"lint-staged": "^10.5.3",
"mini-css-extract-plugin": "^1.3.4",
"node-fetch": "^2.6.1",
<th>{i18n.t('name')}</th>
<th>{i18n.t('category')}</th>
<th class="text-right">{i18n.t('subscribers')}</th>
+ <th class="text-right">
+ {i18n.t('users')} / {i18n.t('month')}
+ </th>
<th class="text-right d-none d-lg-table-cell">
{i18n.t('posts')}
</th>
</td>
<td>{cv.category.name}</td>
<td class="text-right">{cv.counts.subscribers}</td>
+ <td class="text-right">{cv.counts.users_active_month}</td>
<td class="text-right d-none d-lg-table-cell">
{cv.counts.posts}
</td>
}
badges() {
- let site_view = this.state.siteRes.site_view;
+ let counts = this.state.siteRes.site_view.counts;
return (
<ul class="my-2 list-inline">
<li className="list-inline-item badge badge-secondary">
</li>
<li className="list-inline-item badge badge-secondary">
{i18n.t('number_of_users', {
- count: site_view.counts.users,
+ count: counts.users_active_day,
+ })}{' '}
+ / {i18n.t('day')}
+ </li>
+ <li className="list-inline-item badge badge-secondary">
+ {i18n.t('number_of_users', {
+ count: counts.users_active_week,
+ })}{' '}
+ / {i18n.t('week')}
+ </li>
+ <li className="list-inline-item badge badge-secondary">
+ {i18n.t('number_of_users', {
+ count: counts.users_active_month,
+ })}{' '}
+ / {i18n.t('month')}
+ </li>
+ <li className="list-inline-item badge badge-secondary">
+ {i18n.t('number_of_users', {
+ count: counts.users_active_half_year,
+ })}{' '}
+ / {i18n.t('number_of_months', { count: 6 })}
+ </li>
+ <li className="list-inline-item badge badge-secondary">
+ {i18n.t('number_of_subscribers', {
+ count: counts.users,
})}
</li>
<li className="list-inline-item badge badge-secondary">
{i18n.t('number_of_communities', {
- count: site_view.counts.communities,
+ count: counts.communities,
})}
</li>
<li className="list-inline-item badge badge-secondary">
{i18n.t('number_of_posts', {
- count: site_view.counts.posts,
+ count: counts.posts,
})}
</li>
<li className="list-inline-item badge badge-secondary">
{i18n.t('number_of_comments', {
- count: site_view.counts.comments,
+ count: counts.comments,
})}
</li>
<li className="list-inline-item">
badges() {
let community_view = this.props.community_view;
+ let counts = community_view.counts;
return (
<ul class="my-1 list-inline">
<li className="list-inline-item badge badge-secondary">
{i18n.t('number_online', { count: this.props.online })}
</li>
+ <li className="list-inline-item badge badge-secondary">
+ {i18n.t('number_of_users', {
+ count: counts.users_active_day,
+ })}{' '}
+ / {i18n.t('day')}
+ </li>
+ <li className="list-inline-item badge badge-secondary">
+ {i18n.t('number_of_users', {
+ count: counts.users_active_week,
+ })}{' '}
+ / {i18n.t('week')}
+ </li>
+ <li className="list-inline-item badge badge-secondary">
+ {i18n.t('number_of_users', {
+ count: counts.users_active_month,
+ })}{' '}
+ / {i18n.t('month')}
+ </li>
+ <li className="list-inline-item badge badge-secondary">
+ {i18n.t('number_of_users', {
+ count: counts.users_active_half_year,
+ })}{' '}
+ / {i18n.t('number_of_months', { count: 6 })}
+ </li>
<li className="list-inline-item badge badge-secondary">
{i18n.t('number_of_subscribers', {
- count: community_view.counts.subscribers,
+ count: counts.subscribers,
})}
</li>
<li className="list-inline-item badge badge-secondary">
{i18n.t('number_of_posts', {
- count: community_view.counts.posts,
+ count: counts.posts,
})}
</li>
<li className="list-inline-item badge badge-secondary">
{i18n.t('number_of_comments', {
- count: community_view.counts.comments,
+ count: counts.comments,
})}
</li>
<li className="list-inline-item">
dependencies:
invert-kv "^1.0.0"
-lemmy-js-client@0.9.1-rc.1:
- version "0.9.1-rc.1"
- resolved "https://registry.yarnpkg.com/lemmy-js-client/-/lemmy-js-client-0.9.1-rc.1.tgz#afe3cb0d4852f849dd087a4756a3771bc920a907"
- integrity sha512-aVvo4IeJvIPUvypipk4GnyLB6nVQVLfB0arYrMkVV4L7zrZ/0pGtpkMDLaOAj/KpA6O0u9eLmaou5RberZQolA==
+lemmy-js-client@0.9.1-rc.3:
+ version "0.9.1-rc.3"
+ resolved "https://registry.yarnpkg.com/lemmy-js-client/-/lemmy-js-client-0.9.1-rc.3.tgz#d675f2b01e57ff8f6e528e0715a0dc85ba36b002"
+ integrity sha512-Zie3yXLCLdPQWE88+odDQ7FrMzzNKIdzn7M7rrMTatJEAMlxVDZTPrUOZZ/cVAlO7W7DlwXSENT/PCdA35ggZw==
levn@^0.4.1:
version "0.4.1"