Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Show subject stats/summary #279

Merged
merged 9 commits into from
Jan 22, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
✨ Update version and fix undefined render
  • Loading branch information
foysalit committed Jan 20, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit fabe753caebf69cd7113cdd2cd3e17c2fe8fbca7
23 changes: 13 additions & 10 deletions components/subject/Summary.tsx
Original file line number Diff line number Diff line change
@@ -74,7 +74,7 @@ export const AccountStats = ({
return (
<>
{hasStats && <UserCircleIcon className="w-4 h-4 dark:text-gray-200" />}
{suspendCount && (
{!!suspendCount && (
<StatView
appearance="danger"
count={suspendCount}
@@ -91,7 +91,7 @@ export const AccountStats = ({
)}`}
/>
)}
{takedownCount && (
{!!takedownCount && (
<StatView
appearance="danger"
count={takedownCount}
@@ -108,7 +108,7 @@ export const AccountStats = ({
)}`}
/>
)}
{shouldShowAppeal && (
{!!shouldShowAppeal && (
<StatView
appearance="warning"
count={appealCount}
@@ -122,7 +122,7 @@ export const AccountStats = ({
title={`This account appealed ${pluralize(appealCount, 'decision')}`}
/>
)}
{shouldShowReport && (
{!!shouldShowReport && (
<StatView
appearance="info"
count={reportCount}
@@ -168,7 +168,7 @@ export const RecordsStats = ({
return (
<>
{hasStats && <PencilSquareIcon className="w-4 h-4 dark:text-gray-200" />}
{takedownCount && (
{!!takedownCount && (
<StatView
appearance="danger"
count={takedownCount}
@@ -184,7 +184,7 @@ export const RecordsStats = ({
)} authored by this account has been taken down`}
/>
)}
{escalatedCount && (
{!!escalatedCount && (
<StatView
appearance="warning"
count={escalatedCount}
@@ -200,7 +200,7 @@ export const RecordsStats = ({
)} authored by this user were escalated`}
/>
)}
{reportedCount && (
{!!reportedCount && (
<StatView
appearance="info"
count={reportedCount}
@@ -209,10 +209,13 @@ export const RecordsStats = ({
title={`${pluralize(
reportedCount,
'record',
)} authored by this user reported ${pluralize(totalReports, 'time')}`}
)} authored by this user reported ${pluralize(
totalReports || 0,
'time',
)}`}
/>
)}
{showAll && pendingCount && (
{showAll && !!pendingCount && (
<StatView
appearance="warning"
count={pendingCount}
@@ -224,7 +227,7 @@ export const RecordsStats = ({
)} authored by this user are pending review`}
/>
)}
{showAll && processedCount && (
{showAll && !!processedCount && (
<StatView
appearance="success"
count={processedCount}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
"e2e:run": "$(yarn bin)/cypress run --browser chrome"
},
"dependencies": {
"@atproto/api": "^0.13.25",
"@atproto/api": "^0.13.29",
"@atproto/oauth-client-browser": "^0.2.0",
"@atproto/oauth-types": "^0.1.4",
"@atproto/xrpc": "^0.6.1",
2 changes: 1 addition & 1 deletion service/package.json
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
"description": "Ozone service entrypoint",
"main": "index.js",
"dependencies": {
"@atproto/ozone": "0.1.64",
"@atproto/ozone": "0.1.70",
"next": "14.2.5"
}
}
164 changes: 73 additions & 91 deletions service/yarn.lock
Original file line number Diff line number Diff line change
@@ -2,24 +2,24 @@
# yarn lockfile v1


"@atproto/api@^0.13.25":
version "0.13.25"
resolved "https://registry.yarnpkg.com/@atproto/api/-/api-0.13.25.tgz#917d6ae75e0c176166f67b7c340944c84a7c6413"
integrity sha512-5tz2NvYO7W9+0PV7x4k4KIAIazQI6Km+q4/+O6VUoNSqHsF3ry9/9mjcZKBoJLdmcVtZdcKSlPUTtxthan6iKw==
"@atproto/api@^0.13.29":
version "0.13.29"
resolved "https://registry.npmjs.org/@atproto/api/-/api-0.13.29.tgz#34b8e8f68df95f9d44de243ff33dc92b6b421e71"
integrity sha512-j+2mZikK7dibAll4TrQBVFMUVlZ9UZKTlTuFMMJ/x/JrngdYSvPoCcujbPHSj3XuKuG+MCNps5e7wK4mXXQsSA==
dependencies:
"@atproto/common-web" "^0.3.1"
"@atproto/lexicon" "^0.4.4"
"@atproto/common-web" "^0.3.2"
"@atproto/lexicon" "^0.4.5"
"@atproto/syntax" "^0.3.1"
"@atproto/xrpc" "^0.6.5"
"@atproto/xrpc" "^0.6.6"
await-lock "^2.2.2"
multiformats "^9.9.0"
tlds "^1.234.0"
zod "^3.23.8"

"@atproto/common-web@^0.3.1":
version "0.3.1"
resolved "https://registry.yarnpkg.com/@atproto/common-web/-/common-web-0.3.1.tgz#86f8efb10a4b9073839cee914c6c08a664917cc4"
integrity sha512-N7wiTnus5vAr+lT//0y8m/FaHHLJ9LpGuEwkwDAeV3LCiPif4m/FS8x/QOYrx1PdZQwKso95RAPzCGWQBH5j6Q==
"@atproto/common-web@^0.3.2":
version "0.3.2"
resolved "https://registry.npmjs.org/@atproto/common-web/-/common-web-0.3.2.tgz#4cf78ad4d24fed801882f3d35afc39bceccdff51"
integrity sha512-Vx0JtL1/CssJbFAb0UOdvTrkbUautsDfHNOXNTcX2vyPIxH9xOameSqLLunM1hZnOQbJwyjmQCt6TV+bhnanDg==
dependencies:
graphemer "^1.4.0"
multiformats "^9.9.0"
@@ -36,12 +36,12 @@
pino "^8.6.1"
zod "^3.14.2"

"@atproto/common@^0.4.5":
version "0.4.5"
resolved "https://registry.yarnpkg.com/@atproto/common/-/common-0.4.5.tgz#28fd176a9b5527c723828e725586bc0be9fa9516"
integrity sha512-LFAGqHcxCI5+b31Xgk+VQQtZU258iGPpHJzNeHVcdh6teIKZi4C2l6YV+m+3CEz+yYcfP7jjUmgqesx7l9Arsg==
"@atproto/common@^0.4.6":
version "0.4.6"
resolved "https://registry.npmjs.org/@atproto/common/-/common-0.4.6.tgz#9a246244cb8f59615b2090ba4d99a2d5537e44b0"
integrity sha512-X33ZubLPrHLNur2Ln4tRP5TY0G0u/t9DyAeA5dgtTNGIXE3iJIlfiUSR0PW5s1iAvBbrrJK4BwaA2Pqsdl+RNw==
dependencies:
"@atproto/common-web" "^0.3.1"
"@atproto/common-web" "^0.3.2"
"@ipld/dag-cbor" "^7.0.3"
cbor-x "^1.5.1"
iso-datestring-validator "^2.2.2"
@@ -59,50 +59,48 @@
one-webcrypto "^1.0.3"
uint8arrays "3.0.0"

"@atproto/crypto@^0.4.2":
version "0.4.2"
resolved "https://registry.yarnpkg.com/@atproto/crypto/-/crypto-0.4.2.tgz#07417887ddbd4baae5298d4b9499fc727f261a31"
integrity sha512-aeOfPQYCDbhn2hV06oBF2KXrWjf/BK4yL8lfANJKSmKl3tKWCkiW/moi643rUXXxSE72KtWtQeqvNFYnnFJ0ig==
"@atproto/crypto@^0.4.3":
version "0.4.3"
resolved "https://registry.npmjs.org/@atproto/crypto/-/crypto-0.4.3.tgz#15b8105892baf1ce23327f2d9cb2d1ffd8153d0d"
integrity sha512-YSSUAvkx+ldpXw97NXZWfLx/prgh5YJ2K0BCw51JCJmXSRp6KhhwvOm4J+K/s5hwpssyuDCVTXknyS4PHwaK5g==
dependencies:
"@noble/curves" "^1.1.0"
"@noble/hashes" "^1.3.1"
"@noble/curves" "^1.7.0"
"@noble/hashes" "^1.6.1"
uint8arrays "3.0.0"

"@atproto/identity@^0.4.3":
version "0.4.3"
resolved "https://registry.yarnpkg.com/@atproto/identity/-/identity-0.4.3.tgz#fd387d4f2dd68a514e3d0138009a4b9db7f489fd"
integrity sha512-DLXMWh57dHvIeBl+IvC+q20z0IdDZT1awOn84vDyxacL9DfhbiTy/zCUPFEzHyvfrilNG1tDA4zQzURubdFqNg==
"@atproto/identity@^0.4.5":
version "0.4.5"
resolved "https://registry.npmjs.org/@atproto/identity/-/identity-0.4.5.tgz#d644fb08c9998cf382d700d3ac25620d6eebc4ec"
integrity sha512-IyW6wk+qfX+z/LmBdjatJgjSJWDTJLSCT/6yQUD/L0mkOjRdxiG7DoYIChaF3xHOPKiIuOGu/fuzhBMxVVcCcw==
dependencies:
"@atproto/common-web" "^0.3.1"
"@atproto/crypto" "^0.4.2"
axios "^0.27.2"
"@atproto/common-web" "^0.3.2"
"@atproto/crypto" "^0.4.3"

"@atproto/lexicon@^0.4.4":
version "0.4.4"
resolved "https://registry.yarnpkg.com/@atproto/lexicon/-/lexicon-0.4.4.tgz#0d97314bb57b693b76f2495fa5e02872469dd93a"
integrity sha512-QFEmr3rpj/RoAmfX9ALU/asBG/rsVtQZnw+9nOB1/AuIwoxXd+ZyndR6lVUc2+DL4GEjl6W2yvBru5xbQIZWyA==
"@atproto/lexicon@^0.4.5":
version "0.4.5"
resolved "https://registry.npmjs.org/@atproto/lexicon/-/lexicon-0.4.5.tgz#4fcf3731193c674286e9e8d677bbab5dd530b817"
integrity sha512-fljWqMGKn+XWtTprBcS3F1hGBREnQYh6qYHv2sjENucc7REms1gtmZXSerB9N6pVeHVNOnXiILdukeAcic5OEw==
dependencies:
"@atproto/common-web" "^0.3.1"
"@atproto/common-web" "^0.3.2"
"@atproto/syntax" "^0.3.1"
iso-datestring-validator "^2.2.2"
multiformats "^9.9.0"
zod "^3.23.8"

"@atproto/[email protected].64":
version "0.1.64"
resolved "https://registry.yarnpkg.com/@atproto/ozone/-/ozone-0.1.64.tgz#babd67fdfaef1a21423e49033a02c82a54ec09e3"
integrity sha512-1eJFx29eG+HW0jFGCsQM/DYI5Yy3PxDuCJk7nDj+s35IcgadV3Hv0d6QzsnL+IRygJetzfS7PewyZTbnh41x4Q==
"@atproto/[email protected].70":
version "0.1.70"
resolved "https://registry.npmjs.org/@atproto/ozone/-/ozone-0.1.70.tgz#8d5cf2e2fdde816027f246e25043bb01cbe45f07"
integrity sha512-0XWj6/dL53r+ww4moSiua30JYgB5xmJJ+ZIg2kuaCmsNNJh4iu8fNOUZpbkzKmOsCT18WJXkbWdaUHfN92nyGg==
dependencies:
"@atproto/api" "^0.13.25"
"@atproto/common" "^0.4.5"
"@atproto/crypto" "^0.4.2"
"@atproto/identity" "^0.4.3"
"@atproto/lexicon" "^0.4.4"
"@atproto/api" "^0.13.29"
"@atproto/common" "^0.4.6"
"@atproto/crypto" "^0.4.3"
"@atproto/identity" "^0.4.5"
"@atproto/lexicon" "^0.4.5"
"@atproto/syntax" "^0.3.1"
"@atproto/xrpc" "^0.6.5"
"@atproto/xrpc-server" "^0.7.4"
"@atproto/xrpc" "^0.6.6"
"@atproto/xrpc-server" "^0.7.7"
"@did-plc/lib" "^0.0.1"
axios "^1.6.7"
compression "^1.7.4"
cors "^2.8.5"
express "^4.17.2"
@@ -116,21 +114,22 @@
structured-headers "^1.0.1"
typed-emitter "^2.1.0"
uint8arrays "3.0.0"
undici "^6.14.1"

"@atproto/syntax@^0.3.1":
version "0.3.1"
resolved "https://registry.yarnpkg.com/@atproto/syntax/-/syntax-0.3.1.tgz#4346418728f9643d783d2ffcf7c77e132e1f53d4"
integrity sha512-fzW0Mg1QUOVCWUD3RgEsDt6d1OZ6DdFmbKcDdbzUfh0t4rhtRAC05KbZYmxuMPWDAiJ4BbbQ5dkAc/mNypMXkw==

"@atproto/xrpc-server@^0.7.4":
version "0.7.4"
resolved "https://registry.yarnpkg.com/@atproto/xrpc-server/-/xrpc-server-0.7.4.tgz#dfac8f7276c1c971a35eaba627eb6372088441c3"
integrity sha512-MrAwxfJBQm/kCol3D8qc+vpQzBMzLqvtUbauSSfVVJ10PlGtxg4LlXqcjkAuhrjyrqp3dQH9LHuhDpgVQK+G3w==
"@atproto/xrpc-server@^0.7.7":
version "0.7.7"
resolved "https://registry.npmjs.org/@atproto/xrpc-server/-/xrpc-server-0.7.7.tgz#0904df2a1da639fdacd7f25593c4b0bc483f32a2"
integrity sha512-hfA0OoGhWYPfrk+D6fumeRz+Jfcspan9JF0F50ok9brDjLySl5c8WAwpX47VTVzrvoInSgm4DEZ/STXWNcFxJg==
dependencies:
"@atproto/common" "^0.4.5"
"@atproto/crypto" "^0.4.2"
"@atproto/lexicon" "^0.4.4"
"@atproto/xrpc" "^0.6.5"
"@atproto/common" "^0.4.6"
"@atproto/crypto" "^0.4.3"
"@atproto/lexicon" "^0.4.5"
"@atproto/xrpc" "^0.6.6"
cbor-x "^1.5.1"
express "^4.17.2"
http-errors "^2.0.0"
@@ -140,12 +139,12 @@
ws "^8.12.0"
zod "^3.23.8"

"@atproto/xrpc@^0.6.5":
version "0.6.5"
resolved "https://registry.yarnpkg.com/@atproto/xrpc/-/xrpc-0.6.5.tgz#8b180fc5f6b8374fd00c41b9e4cd7b24ead48e6b"
integrity sha512-t6u8iPEVbWge5RhzKZDahSzNDYIAxUtop6Q/X/apAZY1rgreVU0/1sSvvRoRFH19d3UIKjYdLuwFqMi9w8nY3Q==
"@atproto/xrpc@^0.6.6":
version "0.6.6"
resolved "https://registry.npmjs.org/@atproto/xrpc/-/xrpc-0.6.6.tgz#28f58270ef4a8056f7f718bd52512e74bcd3702f"
integrity sha512-umXEYVMo9/pyIBoKmIAIi64RXDW9tSXY+wqztlQ6I2GZtjLfNZqmAWU+wADk3SxUe54mvjxxGyA4TtyGtDMfhA==
dependencies:
"@atproto/lexicon" "^0.4.4"
"@atproto/lexicon" "^0.4.5"
zod "^3.23.8"

"@cbor-extract/[email protected]":
@@ -249,17 +248,17 @@
resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.5.tgz#ed199a920efb510cfe941cd75ed38a7be21e756f"
integrity sha512-tEQ7oinq1/CjSG9uSTerca3v4AZ+dFa+4Yu6ihaG8Ud8ddqLQgFGcnwYls13H5X5CPDPZJdYxyeMui6muOLd4g==

"@noble/curves@^1.1.0":
version "1.3.0"
resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.3.0.tgz#01be46da4fd195822dab821e72f71bf4aeec635e"
integrity sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==
"@noble/curves@^1.7.0":
version "1.8.1"
resolved "https://registry.npmjs.org/@noble/curves/-/curves-1.8.1.tgz#19bc3970e205c99e4bdb1c64a4785706bce497ff"
integrity sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ==
dependencies:
"@noble/hashes" "1.3.3"
"@noble/hashes" "1.7.1"

"@noble/hashes@1.3.3", "@noble/hashes@^1.3.1":
version "1.3.3"
resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.3.tgz#39908da56a4adc270147bb07968bf3b16cfe1699"
integrity sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==
"@noble/hashes@1.7.1", "@noble/hashes@^1.6.1":
version "1.7.1"
resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.7.1.tgz#5738f6d765710921e7a751e00c20ae091ed8db0f"
integrity sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ==

"@noble/secp256k1@^1.7.0":
version "1.7.1"
@@ -314,14 +313,6 @@ await-lock@^2.2.2:
resolved "https://registry.yarnpkg.com/await-lock/-/await-lock-2.2.2.tgz#a95a9b269bfd2f69d22b17a321686f551152bcef"
integrity sha512-aDczADvlvTGajTDjcjpJMqRkOF6Qdz3YbPZm/PyW6tKPkx2hlYBzxMhEywM/tU72HrVZjgl5VCdRuMlA7pZ8Gw==

axios@^0.27.2:
version "0.27.2"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.27.2.tgz#207658cc8621606e586c85db4b41a750e756d972"
integrity sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==
dependencies:
follow-redirects "^1.14.9"
form-data "^4.0.0"

axios@^1.3.4:
version "1.6.7"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.7.tgz#7b48c2e27c96f9c68a2f8f31e2ab19f59b06b0a7"
@@ -331,15 +322,6 @@ axios@^1.3.4:
form-data "^4.0.0"
proxy-from-env "^1.1.0"

axios@^1.6.7:
version "1.6.8"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.8.tgz#66d294951f5d988a00e87a0ffb955316a619ea66"
integrity sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==
dependencies:
follow-redirects "^1.15.6"
form-data "^4.0.0"
proxy-from-env "^1.1.0"

base64-js@^1.3.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
@@ -657,16 +639,11 @@ [email protected]:
statuses "2.0.1"
unpipe "~1.0.0"

follow-redirects@^1.14.9, follow-redirects@^1.15.4:
follow-redirects@^1.15.4:
version "1.15.5"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.5.tgz#54d4d6d062c0fa7d9d17feb008461550e3ba8020"
integrity sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==

follow-redirects@^1.15.6:
version "1.15.6"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b"
integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==

form-data@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452"
@@ -1403,6 +1380,11 @@ [email protected]:
dependencies:
multiformats "^9.4.2"

undici@^6.14.1:
version "6.21.1"
resolved "https://registry.npmjs.org/undici/-/undici-6.21.1.tgz#336025a14162e6837e44ad7b819b35b6c6af0e05"
integrity sha512-q/1rj5D0/zayJB2FraXdaWxbhWiNKDvu8naDT2dl1yTlvJp4BLtOcp2a5BvgGNQpYYJzau7tf1WgKv3b+7mqpQ==

[email protected], unpipe@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
Loading