From ed6bf9f1bb983be303d371bdfdc2dfbe1bf24d2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Sat, 30 May 2026 00:08:07 +0200 Subject: [PATCH] last changes --- client/admin/admin.less | 4 ++++ .../brewUtils/brewCleanup/brewCleanup.jsx | 11 ++++++----- server/admin.api.js | 18 ++++++++++-------- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/client/admin/admin.less b/client/admin/admin.less index 432f92e8b..e66ead5e3 100644 --- a/client/admin/admin.less +++ b/client/admin/admin.less @@ -111,6 +111,10 @@ body { vertical-align : middle; text-align : center; border-right : 1px solid; + max-width:50ch; + overflow:hidden; + text-overflow: ellipsis; + white-space: nowrap; &:last-child { border-right : none; } } diff --git a/client/admin/brewUtils/brewCleanup/brewCleanup.jsx b/client/admin/brewUtils/brewCleanup/brewCleanup.jsx index cd60e6728..5f19fb474 100644 --- a/client/admin/brewUtils/brewCleanup/brewCleanup.jsx +++ b/client/admin/brewUtils/brewCleanup/brewCleanup.jsx @@ -67,6 +67,7 @@ const BrewCleanup = ({})=>{ return null; } + return <>

{`Results - ${brewList.length} brews` }

@@ -74,21 +75,21 @@ const BrewCleanup = ({})=>{ - + {brewList .sort((a, b)=>{ // Sort brews from most recently updated - if(a.updatedAt > b.updatedAt) return -1; + if(a.lastViewed > b.lastViewed) return -1; return 1; }) .map((brew, idx)=>{ return - + ; })} @@ -101,7 +102,7 @@ const BrewCleanup = ({})=>{ if(type === 'junk' && junkBrewCollection.length === 0 || type === 'lost' && lostBrewCollection.length === 0) return
No Matching Brews found.
; return
- {renderBrewList(type)} + Found {type === 'junk' ? junkBrewCollection.length : lostBrewCollection.length} Brews that could be removed. - + {renderBrewList(type)}
; }; const renderJunkBrewCleanup = ()=>{ diff --git a/server/admin.api.js b/server/admin.api.js index c47e72c60..161570dc2 100644 --- a/server/admin.api.js +++ b/server/admin.api.js @@ -50,14 +50,16 @@ export default function createAdminApi(vite) { ]; const lostBrewsPipeline = [ - { $match : { - updatedAt : { $lt: Moment().subtract(365, 'days').toDate() }, - lastViewed : { $lt: Moment().subtract(365, 'days').toDate() } - }}, - { $match: { - authors : [], - }}, - { $limit: 300 } + { + $match: { + authors: [], + updatedAt: { $lt: Moment().subtract(9, 'years').toDate() }, + lastViewed: { $lt: Moment().subtract(9, 'years').toDate() } + } + }, + { + $limit: 1000 + } ]; /* Search for brews that aren't compressed (missing the compressed text field) */
Title Last UpdateCreatedlast viewed Storage
{brew.title || 'No Title'} {Moment(brew.updatedAt).fromNow()}{brew.createdAt ? Moment(brew.createdAt).fromNow() : 'No creation date'}{brew.lastViewed ? Moment(brew.lastViewed).fromNow() : 'No creation date'} {brew.googleId ? 'Google' : 'Homebrewery'}