commit 77c5beda232d35a48e31f46e2196fb367ba0f8c4
parent 52a6afa7519837f530764269c999c04c2bce3f7d
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Mon, 4 May 2026 17:52:00 -0400
All channels toggle
Diffstat:
1 file changed, 32 insertions(+), 0 deletions(-)
diff --git a/common/components/TranscriptSearch.tsx b/common/components/TranscriptSearch.tsx
@@ -316,6 +316,11 @@ export default function TranscriptSearch() {
<span className="text-xs uppercase tracking-wide text-zinc-500">
Channels
</span>
+ <ChannelAllToggle
+ channelOptions={channelOptions}
+ draftExcludedChannels={draftExcludedChannels}
+ setDraftExcludedChannels={setDraftExcludedChannels}
+ />
{channelOptions.map((name) => {
const checked = !draftExcludedChannels.has(name);
return (
@@ -564,6 +569,33 @@ export default function TranscriptSearch() {
);
}
+function ChannelAllToggle({
+ channelOptions,
+ draftExcludedChannels,
+ setDraftExcludedChannels,
+}: {
+ channelOptions: string[];
+ draftExcludedChannels: Set<string>;
+ setDraftExcludedChannels: (next: Set<string>) => void;
+}) {
+ const allChecked = draftExcludedChannels.size === 0;
+ return (
+ <label className="flex items-center gap-1.5 select-none">
+ <input
+ type="checkbox"
+ checked={allChecked}
+ onChange={() => {
+ setDraftExcludedChannels(
+ allChecked ? new Set(channelOptions) : new Set(),
+ );
+ }}
+ className="accent-blue-600"
+ />
+ All
+ </label>
+ );
+}
+
function sameSet<T>(a: Set<T>, b: Set<T>): boolean {
if (a.size !== b.size) return false;
for (const v of a) if (!b.has(v)) return false;