From 27cc68f80fe05226f68c56f8eaacbdac5ae8addf Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Sat, 26 Aug 2023 16:07:59 +0200 Subject: [PATCH 1/7] update anon mode description --- src/components/modals/SettingsModal.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/modals/SettingsModal.jsx b/src/components/modals/SettingsModal.jsx index 892aa118..344fa278 100755 --- a/src/components/modals/SettingsModal.jsx +++ b/src/components/modals/SettingsModal.jsx @@ -461,7 +461,7 @@ const SettingsModal = ({ isOpen, closeModal }) => {
  • - Automatically use a different u/address per thread to post. + Use a newly generated u/address per thread to post.
  • Account Data From d7949eb81ebccf22687099850f6851d9d1e04c7a Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Sat, 26 Aug 2023 17:50:15 +0200 Subject: [PATCH 2/7] Update BoardStats.jsx --- src/components/BoardStats.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/BoardStats.jsx b/src/components/BoardStats.jsx index abd572ed..3d962cb9 100644 --- a/src/components/BoardStats.jsx +++ b/src/components/BoardStats.jsx @@ -33,13 +33,13 @@ const BoardStats = ({ subplebbitAddress }) => { {showStats && ( - In the past hour, {stats.hourActiveUserCount} {pluralize(stats.hourActiveUserCount, 'user', 'users')} made {stats.hourPostCount} {pluralize(stats.hourPostCount, 'post', 'posts')} — In the past day, {stats.dayActiveUserCount} {pluralize(stats.dayActiveUserCount, 'user', 'users')} made {stats.dayPostCount} {pluralize(stats.dayPostCount, 'post', 'posts')} + In the past hour, {stats.hourActiveUserCount} {pluralize(stats.hourActiveUserCount, 'user', 'users')} made {stats.hourPostCount} {pluralize(stats.hourPostCount, 'post', 'posts')} — in the past day, {stats.dayActiveUserCount} {pluralize(stats.dayActiveUserCount, 'user', 'users')} made {stats.dayPostCount} {pluralize(stats.dayPostCount, 'post', 'posts')} - In the past week, {stats.weekActiveUserCount} {pluralize(stats.weekActiveUserCount, 'user', 'users')} made {stats.weekPostCount} {pluralize(stats.weekPostCount, 'post', 'posts')} — In the past month, {stats.monthActiveUserCount} {pluralize(stats.monthActiveUserCount, 'user', 'users')} made {stats.monthPostCount} {pluralize(stats.monthPostCount, 'post', 'posts')} + In the past week, {stats.weekActiveUserCount} {pluralize(stats.weekActiveUserCount, 'user', 'users')} made {stats.weekPostCount} {pluralize(stats.weekPostCount, 'post', 'posts')} — in the past month, {stats.monthActiveUserCount} {pluralize(stats.monthActiveUserCount, 'user', 'users')} made {stats.monthPostCount} {pluralize(stats.monthPostCount, 'post', 'posts')} - {unixToMMDDYYYY(subplebbit.createdAt)} board created, since then {stats.allActiveUserCount} {pluralize(stats.allActiveUserCount, 'user', 'users')} have made {stats.allPostCount} {pluralize(stats.allPostCount, 'post', 'posts')} + {unixToMMDDYYYY(subplebbit.createdAt)} board created — since then, {stats.allActiveUserCount} {pluralize(stats.allActiveUserCount, 'user', 'users')} have made {stats.allPostCount} {pluralize(stats.allPostCount, 'post', 'posts')} )} From d50d27da7da9d922de34404a5b0d2bf659083a52 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Sun, 27 Aug 2023 20:41:31 +0200 Subject: [PATCH 3/7] Update BoardStats.styled.jsx --- src/components/styled/BoardStats.styled.jsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/styled/BoardStats.styled.jsx b/src/components/styled/BoardStats.styled.jsx index e4d8b46a..790857ff 100644 --- a/src/components/styled/BoardStats.styled.jsx +++ b/src/components/styled/BoardStats.styled.jsx @@ -10,11 +10,13 @@ export const BoardStatsContainer = styled.div` width: 468px; margin: auto; line-height: 1; + margin-top: -1px; table { border-spacing: 0px; width: 100%; margin-top: -1px; + padding-left: 3px; } tr { From e5740ad8857af75228d7a1fdfe480beed14d3794 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Mon, 28 Aug 2023 10:51:39 +0200 Subject: [PATCH 4/7] Update BoardStats.jsx --- src/components/BoardStats.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/BoardStats.jsx b/src/components/BoardStats.jsx index 3d962cb9..1994b148 100644 --- a/src/components/BoardStats.jsx +++ b/src/components/BoardStats.jsx @@ -20,7 +20,7 @@ const BoardStats = ({ subplebbitAddress }) => { const date = new Date(timestamp * 1000); const month = ('0' + (date.getMonth() + 1)).slice(-2); const day = ('0' + date.getDate()).slice(-2); - const year = date.getFullYear(); + const year = date.getFullYear().toString().slice(-2); return month + '/' + day + '/' + year; }; From df2e764808850e3b79baef1dc89cd37136416e5c Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Wed, 30 Aug 2023 21:09:12 +0200 Subject: [PATCH 5/7] fix conditional useMemo --- src/hooks/useStateString.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/hooks/useStateString.js b/src/hooks/useStateString.js index a357d727..1fa79d62 100644 --- a/src/hooks/useStateString.js +++ b/src/hooks/useStateString.js @@ -1,12 +1,14 @@ import { useMemo } from 'react' const useStateString = (commentOrSubplebbit) => { - // dont show state string if the data is already fetched - if (commentOrSubplebbit?.updatedAt || commentOrSubplebbit?.state === 'succeeded') { - return - } - + return useMemo(() => { + + // dont show state string if the data is already fetched + if (commentOrSubplebbit?.updatedAt || commentOrSubplebbit?.state === 'succeeded') { + return + } + if (!commentOrSubplebbit?.clients) { return } From ca216c8c9cf68968509043c1bb1006072d2f41f8 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Thu, 31 Aug 2023 11:55:11 +0200 Subject: [PATCH 6/7] fix selectedAddress in All.jsx, Subscriptions.jsx --- src/components/views/All.jsx | 24 ++++++++++++------------ src/components/views/Subscriptions.jsx | 24 ++++++++++++------------ 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/components/views/All.jsx b/src/components/views/All.jsx index b7e7e79c..7e4feaa9 100755 --- a/src/components/views/All.jsx +++ b/src/components/views/All.jsx @@ -929,7 +929,7 @@ const All = () => {
    • { handleOptionClick(thread.cid); - handleShareClick(selectedAddress, thread.cid); + handleShareClick(thread.subplebbitAddress, thread.cid); }}>Share thread
    • {({ authorAddress }) => ( <> @@ -1009,19 +1009,19 @@ const All = () => { style={{display: isClientRedirectMenuOpen ? 'block': 'none'}}>
    • handleOptionClick(thread.cid)}> Plebbit
    • {/*
    • handleOptionClick(thread.cid)}> Seedit
    • */}
    • handleOptionClick(thread.cid)}> Plebones
    • @@ -1101,7 +1101,7 @@ const All = () => { className="ttl ellipsis"/>
      Post too long.  - setSelectedThread(thread.cid)} className="ttl-link">Click here + setSelectedThread(thread.cid)} className="ttl-link">Click here  to view. @@ -1264,7 +1264,7 @@ const All = () => {
      • { handleOptionClick(reply.cid); - handleShareClick(selectedAddress, thread.cid); + handleShareClick(thread.subplebbitAddress, thread.cid); }}>Share thread
      • {({ authorAddress }) => ( <> @@ -1344,19 +1344,19 @@ const All = () => { style={{display: isClientRedirectMenuOpen ? 'block': 'none'}}>
      • handleOptionClick(reply.cid)}> Plebbit
      • {/*
      • handleOptionClick(reply.cid)}> Seedit
      • */}
      • handleOptionClick(reply.cid)}> Plebones
      • @@ -1610,7 +1610,7 @@ const All = () => { className="ttl ellipsis"/>
        Comment too long.  - setSelectedThread(thread.cid)} className="ttl-link">Click here + setSelectedThread(thread.cid)} className="ttl-link">Click here  to view. @@ -1938,7 +1938,7 @@ const All = () => { className="ttl ellipsis"/>
        Post too long.  - setSelectedThread(thread.cid)} className="ttl-link">Click here + setSelectedThread(thread.cid)} className="ttl-link">Click here  to view. @@ -2217,7 +2217,7 @@ const All = () => { className="ttl ellipsis"/>
        Comment too long.  - setSelectedThread(thread.cid)} className="ttl-link">Click here + setSelectedThread(thread.cid)} className="ttl-link">Click here  to view. diff --git a/src/components/views/Subscriptions.jsx b/src/components/views/Subscriptions.jsx index 5690c869..9f418818 100755 --- a/src/components/views/Subscriptions.jsx +++ b/src/components/views/Subscriptions.jsx @@ -940,7 +940,7 @@ const Subscriptions = () => {
        • { handleOptionClick(thread.cid); - handleShareClick(selectedAddress, thread.cid); + handleShareClick(thread.subplebbitAddress, thread.cid); }}>Share thread
        • {({ authorAddress }) => ( <> @@ -1020,19 +1020,19 @@ const Subscriptions = () => { style={{display: isClientRedirectMenuOpen ? 'block': 'none'}}>
        • handleOptionClick(thread.cid)}> Plebbit
        • {/*
        • handleOptionClick(thread.cid)}> Seedit
        • */}
        • handleOptionClick(thread.cid)}> Plebones
        • @@ -1112,7 +1112,7 @@ const Subscriptions = () => { className="ttl ellipsis"/>
          Post too long.  - setSelectedThread(thread.cid)} className="ttl-link">Click here + setSelectedThread(thread.cid)} className="ttl-link">Click here  to view. @@ -1275,7 +1275,7 @@ const Subscriptions = () => {
          • { handleOptionClick(reply.cid); - handleShareClick(selectedAddress, thread.cid); + handleShareClick(thread.subplebbitAddress, thread.cid); }}>Share thread
          • {({ authorAddress }) => ( <> @@ -1355,19 +1355,19 @@ const Subscriptions = () => { style={{display: isClientRedirectMenuOpen ? 'block': 'none'}}>
          • handleOptionClick(reply.cid)}> Plebbit
          • {/*
          • handleOptionClick(reply.cid)}> Seedit
          • */}
          • handleOptionClick(reply.cid)}> Plebones
          • @@ -1621,7 +1621,7 @@ const Subscriptions = () => { className="ttl ellipsis"/>
            Comment too long.  - setSelectedThread(thread.cid)} className="ttl-link">Click here + setSelectedThread(thread.cid)} className="ttl-link">Click here  to view. @@ -1949,7 +1949,7 @@ const Subscriptions = () => { className="ttl ellipsis"/>
            Post too long.  - setSelectedThread(thread.cid)} className="ttl-link">Click here + setSelectedThread(thread.cid)} className="ttl-link">Click here  to view. @@ -2228,7 +2228,7 @@ const Subscriptions = () => { className="ttl ellipsis"/>
            Comment too long.  - setSelectedThread(thread.cid)} className="ttl-link">Click here + setSelectedThread(thread.cid)} className="ttl-link">Click here  to view. From 572ce0869adbc51fa5d5855152350fe041bad96f Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Thu, 31 Aug 2023 12:41:30 +0200 Subject: [PATCH 7/7] Revert "fix conditional useMemo" This reverts commit df2e764808850e3b79baef1dc89cd37136416e5c. --- src/hooks/useStateString.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/hooks/useStateString.js b/src/hooks/useStateString.js index 1fa79d62..a357d727 100644 --- a/src/hooks/useStateString.js +++ b/src/hooks/useStateString.js @@ -1,14 +1,12 @@ import { useMemo } from 'react' const useStateString = (commentOrSubplebbit) => { - + // dont show state string if the data is already fetched + if (commentOrSubplebbit?.updatedAt || commentOrSubplebbit?.state === 'succeeded') { + return + } + return useMemo(() => { - - // dont show state string if the data is already fetched - if (commentOrSubplebbit?.updatedAt || commentOrSubplebbit?.state === 'succeeded') { - return - } - if (!commentOrSubplebbit?.clients) { return }