fix(search): the live-search tooltip says what a search costs

It always said a live search spends the shared API quota, while the default source (the website's
own endpoint, scrape) spends none — the owner avoided a free search because of it. /api/me now names
the running search_source, and the tooltip names the cost under it: none for scrape (the enrich step
costs a unit or two), 100 units a page for the official API.
This commit is contained in:
2026-10-04 17:53:19 +02:00
parent ce8ccfc3c0
commit 0e077b84c8
8 changed files with 85 additions and 3 deletions
+3 -1
View File
@@ -60,7 +60,9 @@ const Header = forwardRef<
}}
onGo={() => onYtSearch(trimmed)}
goLabel={t("header.searchYoutube")}
goTitle={t("header.searchYoutubeTip")}
goTitle={t(
me.search_source === "api" ? "header.searchYoutubeTipApi" : "header.searchYoutubeTip",
)}
goIcon={<YouTubeIcon className="w-4 h-4" />}
goDisabled={!trimmed || me.is_demo}
/>