]> Untitled Git - lemmy-ui.git/commitdiff
Adding a few more 0.18.0 API changes. (#1324)
authorDessalines <dessalines@users.noreply.github.com>
Fri, 16 Jun 2023 21:06:14 +0000 (17:06 -0400)
committerGitHub <noreply@github.com>
Fri, 16 Jun 2023 21:06:14 +0000 (17:06 -0400)
- Removes number_online

package.json
src/shared/components/community/community.tsx
src/shared/components/community/sidebar.tsx
src/shared/components/home/home.tsx
src/shared/components/home/site-form.tsx
src/shared/components/home/site-sidebar.tsx
src/shared/components/post/post.tsx
yarn.lock

index 2298d9e140c6e40705f39fd9caf0e5173bc698ae..b7c48c79b070276ac94f7e6c5d536b9abaf393c1 100644 (file)
@@ -54,7 +54,7 @@
     "inferno-server": "^8.1.1",
     "isomorphic-cookie": "^1.2.4",
     "jwt-decode": "^3.1.2",
-    "lemmy-js-client": "0.17.2-rc.24",
+    "lemmy-js-client": "0.18.0-rc.1",
     "lodash": "^4.17.21",
     "markdown-it": "^13.0.1",
     "markdown-it-container": "^3.0.0",
index 05fa55e1039d0455473f16898e567cdde0ddde7b..f2d7ad729a8e492b2944205314ae6e47e88c8dca 100644 (file)
@@ -360,7 +360,6 @@ export class Community extends Component<
           community_view={res.community_view}
           moderators={res.moderators}
           admins={site_res.admins}
-          online={res.online}
           enableNsfw={enableNsfw(site_res)}
           editable
           allLanguages={site_res.all_languages}
index 57400f484819b5d0d62aa98ee6625c4be9b3ffd4..56b1ef27398eda6340b614c87cae345a8598fc52 100644 (file)
@@ -39,7 +39,6 @@ interface SidebarProps {
   allLanguages: Language[];
   siteLanguages: number[];
   communityLanguages?: number[];
-  online: number;
   enableNsfw?: boolean;
   showIcon?: boolean;
   editable?: boolean;
@@ -237,12 +236,6 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
     const counts = community_view.counts;
     return (
       <ul className="my-1 list-inline">
-        <li className="list-inline-item badge badge-secondary">
-          {i18n.t("number_online", {
-            count: this.props.online,
-            formattedCount: numToSI(this.props.online),
-          })}
-        </li>
         <li
           className="list-inline-item badge badge-secondary pointer"
           data-tippy-content={i18n.t("active_users_in_the_last_day", {
index 1abb1ee329f391ab52e93e1c33d389e173ddf834..215075d8fbf3d87da9937bb18b0fa473d56d96ba 100644 (file)
@@ -361,7 +361,6 @@ export class Home extends Component<any, HomeState> {
       siteRes: {
         site_view: { counts, site },
         admins,
-        online,
       },
       showSubscribedMobile,
       showTrendingMobile,
@@ -393,7 +392,6 @@ export class Home extends Component<any, HomeState> {
               site={site}
               admins={admins}
               counts={counts}
-              online={online}
               showLocal={showLocal(this.isoData)}
             />
           )}
@@ -417,7 +415,6 @@ export class Home extends Component<any, HomeState> {
       siteRes: {
         site_view: { counts, site },
         admins,
-        online,
       },
     } = this.state;
 
@@ -443,7 +440,6 @@ export class Home extends Component<any, HomeState> {
             site={site}
             admins={admins}
             counts={counts}
-            online={online}
             showLocal={showLocal(this.isoData)}
           />
           {this.hasFollows && (
index 8b56808e4c53d2bdf748af736d04b9f76f4f36c7..4035c74f1db97b0a23d02eb4efb20e4f7468193b 100644 (file)
@@ -81,7 +81,6 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
       slur_filter_regex: ls.slur_filter_regex,
       actor_name_max_length: ls.actor_name_max_length,
       federation_enabled: ls.federation_enabled,
-      federation_debug: ls.federation_debug,
       federation_worker_count: ls.federation_worker_count,
       captcha_enabled: ls.captcha_enabled,
       captcha_difficulty: ls.captcha_difficulty,
index 051c3afd480c3d0676ecf176dde3ca919c0b3abd..be7cdf76180ee3da727ec424ac087484681a7401 100644 (file)
@@ -12,7 +12,6 @@ interface SiteSidebarProps {
   showLocal: boolean;
   counts?: SiteAggregates;
   admins?: PersonView[];
-  online?: number;
 }
 
 interface SiteSidebarState {
@@ -99,15 +98,8 @@ export class SiteSidebar extends Component<SiteSidebarProps, SiteSidebarState> {
 
   badges(siteAggregates: SiteAggregates) {
     const counts = siteAggregates;
-    const online = this.props.online ?? 1;
     return (
       <ul className="my-2 list-inline">
-        <li className="list-inline-item badge badge-secondary">
-          {i18n.t("number_online", {
-            count: online,
-            formattedCount: numToSI(online),
-          })}
-        </li>
         <li
           className="list-inline-item badge badge-secondary pointer"
           data-tippy-content={i18n.t("active_users_in_the_last_day", {
index 51365803490cef2da1bb7956c004e8a2211227da..b602f309285cab92ffcdaa40ed7029c371fd916f 100644 (file)
@@ -552,7 +552,6 @@ export class Post extends Component<any, PostState> {
             community_view={res.data.community_view}
             moderators={res.data.moderators}
             admins={this.state.siteRes.admins}
-            online={res.data.online}
             enableNsfw={enableNsfw(this.state.siteRes)}
             showIcon
             allLanguages={this.state.siteRes.all_languages}
index f783f07f84ce5007655e700c23fcd2c67c295de5..7cd6447438f39b8c4f0dcfbe67541aab44abf06d 100644 (file)
--- a/yarn.lock
+++ b/yarn.lock
@@ -5615,10 +5615,10 @@ leac@^0.6.0:
   resolved "https://registry.yarnpkg.com/leac/-/leac-0.6.0.tgz#dcf136e382e666bd2475f44a1096061b70dc0912"
   integrity sha512-y+SqErxb8h7nE/fiEX07jsbuhrpO9lL8eca7/Y1nuWV2moNlXhyd59iDGcRf6moVyDMbmTNzL40SUyrFU/yDpg==
 
-lemmy-js-client@0.17.2-rc.24:
-  version "0.17.2-rc.24"
-  resolved "https://registry.yarnpkg.com/lemmy-js-client/-/lemmy-js-client-0.17.2-rc.24.tgz#3b09233a6d89286e559be2e840d81c0c549562ad"
-  integrity sha512-aSHz7UTcwnwnNd9poY8tEXP7RA9ieZm9MAfSljcbCNU5ds9CASXYNodmraUVJiqCmT4HWnj7IeVmBC9r7nTHnw==
+lemmy-js-client@0.18.0-rc.1:
+  version "0.18.0-rc.1"
+  resolved "https://registry.yarnpkg.com/lemmy-js-client/-/lemmy-js-client-0.18.0-rc.1.tgz#fd0c88810572d90413696011ebaed19e3b8162d8"
+  integrity sha512-lQe443Nr5UCSoY+IxmT7mBe0IRF6EAZ/4PJSRoPSL+U8A+egMMBPbuxnisHzLsC+eDOWRUIgOqZlwlaRnbmuig==
   dependencies:
     cross-fetch "^3.1.5"
     form-data "^4.0.0"