From 95f504c0bc0b9ec0930b6c6facefc1a8ea093192 Mon Sep 17 00:00:00 2001
From: Brandon Wong <29965003+brandonw3612@users.noreply.github.com>
Date: Sun, 13 Apr 2025 22:50:45 +0200
Subject: feat: add support for filtering by bookmark age (#1228)
---
.../dashboard/search/QueryExplainerTooltip.tsx | 26 ++++++++++++++++++++++
1 file changed, 26 insertions(+)
(limited to 'apps/web/components/dashboard/search')
diff --git a/apps/web/components/dashboard/search/QueryExplainerTooltip.tsx b/apps/web/components/dashboard/search/QueryExplainerTooltip.tsx
index 89c15ad5..e6abb9c9 100644
--- a/apps/web/components/dashboard/search/QueryExplainerTooltip.tsx
+++ b/apps/web/components/dashboard/search/QueryExplainerTooltip.tsx
@@ -66,6 +66,32 @@ export default function QueryExplainerTooltip({
{matcher.dateBefore.toDateString()}
);
+ case "age":
+ return (
+
+
+ {matcher.relativeDate.direction === "newer"
+ ? t("search.created_within")
+ : t("search.created_earlier_than")}
+
+
+ {matcher.relativeDate.amount.toString() +
+ (matcher.relativeDate.direction === "newer"
+ ? {
+ day: t("search.day_s"),
+ week: t("search.week_s"),
+ month: t("search.month_s"),
+ year: t("search.year_s"),
+ }[matcher.relativeDate.unit]
+ : {
+ day: t("search.day_s_ago"),
+ week: t("search.week_s_ago"),
+ month: t("search.month_s_ago"),
+ year: t("search.year_s_ago"),
+ }[matcher.relativeDate.unit])}
+
+
+ );
case "favourited":
return (
--
cgit v1.2.3-70-g09d2