Skip to content

Private AI meeting notes that stay on your computer. No meeting bot. Free and open source for Mac, Windows and Linux. An alternative to Granola, Otter and Fireflies.

Meetings list: select several meetings to add to folders or move to Trash

Eric Brownrout37c1e1c7c94f
diff --git a/app/e2e/multiselect.spec.ts b/app/e2e/multiselect.spec.ts
new file mode 100644
index 00000000..22c2a3f3
--- /dev/null
+++ b/app/e2e/multiselect.spec.ts
@@ -0,0 +1,197 @@
+import { _electron as electron, expect, test, type Page } from '@playwright/test'
+import { mkdtempSync } from 'node:fs'
+import { tmpdir } from 'node:os'
+import { join } from 'node:path'
+
+async function launch() {
+ const app = await electron.launch({ args: [join(import.meta.dirname, '../out/main/index.js')], env: {
+ ...process.env, YOGURT_FAKE: '1', YOGURT_USER_DATA: mkdtempSync(join(tmpdir(), 'yogurt-e2e-')),
+ } })
+ const page = await app.firstWindow()
+ await expect(page.getByTestId('home')).toBeVisible()
+ await app.evaluate(() => (globalThis as unknown as { __fake__: { manyMeetings: (options: { n: number; clean: boolean }) => unknown } }).__fake__.manyMeetings({ n: 4, clean: true }))
+ await page.reload()
+ await expect(page.getByTestId('past-note')).toHaveCount(4)
+ return { app, page }
+}
+
+async function selectFirst(page: Page) {
+ const row = page.locator('.native-meeting-row').first()
+ await row.hover()
+ await row.getByTestId('past-note-more').click()
+ const menu = page.getByTestId('meeting-row-menu')
+ await expect(menu.getByRole('menuitem').first()).toHaveText('Select')
+ await expect(menu.getByRole('separator')).toHaveCount(1)
+ await menu.getByTestId('meeting-select').click()
+ await expect(row.getByTestId('past-note')).toHaveAttribute('aria-pressed', 'true')
+}
+
+for (const theme of ['light', 'dark'] as const) test(`select from the menu, click to add, delete once and undo all in ${theme}`, async () => {
+ const { app, page } = await launch()
+ try {
+ await page.emulateMedia({ colorScheme: theme, reducedMotion: 'reduce' })
+ const rows = page.getByTestId('past-note'), bar = page.getByTestId('meeting-selection-bar')
+ await selectFirst(page)
+ await expect(bar.getByRole('status')).toContainText('1 selected')
+ await expect(bar).toContainText('Click meetings to add more')
+ await rows.nth(1).click()
+ await expect(page.getByTestId('home')).toBeVisible()
+ await expect(rows.nth(1)).toHaveAttribute('aria-pressed', 'true')
+ await expect(bar.getByRole('status')).toHaveText('2 selected')
+ await expect(bar).not.toContainText('Click meetings to add more')
+ await bar.getByRole('button', { name: 'Delete', exact: true }).click()
+ await expect(rows).toHaveCount(2)
+ await expect(bar).toHaveCount(0)
+ const toast = page.getByTestId('trash-toast')
+ await expect(toast).toHaveCount(1)
+ await expect(toast).toContainText('2 meetings moved to Trash')
+ expect(await rows.first().evaluate(el => el.matches(':focus-visible'))).toBe(false)
+ await toast.getByTestId('trash-undo').click()
+ await expect(rows).toHaveCount(4)
+ await expect(toast).toHaveCount(0)
+ await expect(page.locator('[data-selected=true]')).toHaveCount(0)
+ await rows.first().click()
+ await expect(page.getByTestId('note-title')).toBeVisible()
+ } finally { await app.close() }
+})
+
+test('folder checks show mixed membership, toggle the selection, and dragging remains add-only', async () => {
+ const { app, page } = await launch()
+ try {
+ const { target, other, ids } = await page.evaluate(async () => {
+ const target = (await window.yogurt.folders.create('Launch'))!
+ const other = (await window.yogurt.folders.create('Hiring'))!
+ const cards = await window.yogurt.meetings.cards({ limit: 4 })
+ await window.yogurt.folders.add(other.id, cards[0].id)
+ return { target, other, ids: cards.map(card => card.id) }
+ })
+ await expect(page.getByTestId('past-note').first().getByTestId('past-note-folder')).toHaveText('Hiring')
+ await selectFirst(page)
+ await page.getByTestId('past-note').nth(1).click()
+ const bar = page.getByTestId('meeting-selection-bar')
+ await bar.getByRole('button', { name: 'Add to folder', exact: true }).click()
+ const picker = page.getByTestId('selection-folders')
+ const launch = picker.getByRole('menuitemcheckbox', { name: 'Launch', exact: true })
+ const hiring = picker.getByRole('menuitemcheckbox', { name: 'Hiring', exact: true })
+ await expect(launch).toHaveAttribute('aria-checked', 'false')
+ await expect(hiring).toHaveAttribute('aria-checked', 'mixed')
+ await launch.click()
+ const memberships = () => page.evaluate(async ids => Promise.all(ids.slice(0, 2).map(async id => (await window.yogurt.folders.of(id)).map(folder => folder.id).sort())), ids)
+ await expect.poll(memberships).toEqual([[other.id, target.id].sort(), [target.id]])
+ await expect(page.getByTestId('past-note').nth(1).getByTestId('past-note-folder')).toHaveText('Launch')
+ await expect(launch).toHaveAttribute('aria-checked', 'true')
+ await expect(hiring).toHaveAttribute('aria-checked', 'mixed')
+ await expect(hiring).toHaveAttribute('aria-disabled', 'false')
+ await hiring.click()
+ await expect.poll(memberships).toEqual([[other.id, target.id].sort(), [other.id, target.id].sort()])
+ await expect(hiring).toHaveAttribute('aria-checked', 'true')
+ await expect(hiring).toHaveAttribute('aria-disabled', 'false')
+ await hiring.click()
+ await expect.poll(memberships).toEqual([[target.id], [target.id]])
+ await expect(hiring).toHaveAttribute('aria-checked', 'false')
+ await expect(launch).toHaveAttribute('aria-checked', 'true')
+ await expect(picker).toBeVisible()
+ await page.keyboard.press('Escape')
+ const folder = page.getByTestId('sidebar-folder').filter({ hasText: 'Hiring' })
+ await page.getByTestId('past-note').first().dragTo(folder.getByTestId('sidebar-folder-open'))
+ await expect(folder.getByTestId('sidebar-folder-count')).toHaveText('2')
+ await folder.getByTestId('sidebar-folder-open').click()
+ await expect(page.getByTestId('folder-page')).toBeVisible()
+ await expect(bar).toHaveCount(0)
+ await expect(page.getByTestId('past-note')).toHaveCount(2)
+ await selectFirst(page)
+ await page.getByTestId('past-note').nth(1).click()
+ await expect(bar.getByRole('status')).toHaveText('2 selected')
+ await page.getByTestId('nav-home').click()
+ await expect(bar).toHaveCount(0)
+ await selectFirst(page)
+ await page.getByTestId('past-note').nth(1).click()
+ await page.getByTestId('past-note').first().click({ button: 'right' })
+ await page.getByTestId('meeting-row-menu').getByRole('menuitem', { name: 'Add 2 meetings to folder' }).click()
+ const contextFolder = page.getByTestId('meeting-row-folders').getByRole('menuitemcheckbox', { name: 'Hiring', exact: true })
+ await expect(contextFolder).toHaveAttribute('aria-checked', 'true')
+ await contextFolder.click()
+ await expect.poll(memberships).toEqual([[target.id], [target.id]])
+ await expect(contextFolder).toHaveAttribute('aria-checked', 'false')
+ await expect(page.getByTestId('meeting-row-folders')).toBeVisible()
+ } finally { await app.close() }
+})
+
+for (const theme of ['light', 'dark'] as const) test(`one selected meeting has the same persistent folder toggles as its own menu in ${theme}`, async () => {
+ const { app, page } = await launch()
+ try {
+ await page.emulateMedia({ colorScheme: theme, reducedMotion: 'reduce' })
+ const { id, launch, hiring } = await page.evaluate(async () => {
+ const launch = (await window.yogurt.folders.create('Launch'))!.id
+ const hiring = (await window.yogurt.folders.create('Hiring'))!.id
+ const id = (await window.yogurt.meetings.cards({ limit: 1 }))[0].id
+ await window.yogurt.folders.add(hiring, id)
+ return { id, launch, hiring }
+ })
+ const row = page.getByTestId('past-note').first()
+ await expect(row.getByTestId('past-note-folder')).toHaveText('Hiring')
+ await selectFirst(page)
+ const bar = page.getByTestId('meeting-selection-bar')
+ await bar.getByRole('button', { name: 'Add to folder', exact: true }).click()
+ const picker = page.getByTestId('selection-folders')
+ const first = picker.getByRole('menuitemcheckbox', { name: 'Launch', exact: true })
+ const second = picker.getByRole('menuitemcheckbox', { name: 'Hiring', exact: true })
+ const memberships = () => page.evaluate(async id => (await window.yogurt.folders.of(id)).map(folder => folder.id).sort(), id)
+ await expect(first).toHaveAttribute('aria-checked', 'false')
+ await expect(second).toHaveAttribute('aria-checked', 'true')
+ await first.click()
+ await expect.poll(memberships).toEqual([launch, hiring].sort())
+ await expect(first).toHaveAttribute('aria-checked', 'true')
+ await expect(second).toHaveAttribute('aria-disabled', 'false')
+ await second.click()
+ await expect.poll(memberships).toEqual([launch])
+ await expect(row.getByTestId('past-note-folder')).toHaveText('Launch')
+ await expect(first).toHaveAttribute('aria-checked', 'true')
+ await expect(second).toHaveAttribute('aria-checked', 'false')
+ await expect(second).toHaveAttribute('aria-disabled', 'false')
+ await second.click()
+ await expect.poll(memberships).toEqual([launch, hiring].sort())
+ await expect(first).toHaveAttribute('aria-disabled', 'false')
+ await first.click()
+ await expect.poll(memberships).toEqual([hiring])
+ await expect(row.getByTestId('past-note-folder')).toHaveText('Hiring')
+ await expect(first).toHaveAttribute('aria-checked', 'false')
+ await expect(second).toHaveAttribute('aria-checked', 'true')
+ await page.keyboard.press('Escape')
+ await bar.getByRole('button', { name: 'Clear selection' }).click()
+ await row.click({ button: 'right' })
+ await page.getByTestId('meeting-row-menu').getByRole('menuitem', { name: 'Add to folder', exact: true }).click()
+ const own = page.getByTestId('meeting-row-folders')
+ await expect(own.getByRole('menuitemcheckbox', { name: 'Launch', exact: true })).toHaveAttribute('aria-checked', 'false')
+ await expect(own.getByRole('menuitemcheckbox', { name: 'Hiring', exact: true })).toHaveAttribute('aria-checked', 'true')
+ } finally { await app.close() }
+})
+
+test('selection menus, range, select all and Escape stay within the current list', async () => {
+ const { app, page } = await launch()
+ try {
+ const rows = page.getByTestId('past-note'), menu = page.getByTestId('meeting-row-menu'), bar = page.getByTestId('meeting-selection-bar')
+ const modifier = process.platform === 'darwin' ? 'Meta' : 'Control'
+ await rows.first().click({ modifiers: [modifier] })
+ await rows.nth(2).click({ modifiers: ['Shift'] })
+ await expect(bar.getByRole('status')).toHaveText('3 selected')
+ await rows.first().click({ button: 'right' })
+ await expect(menu.getByRole('menuitem')).toHaveText(['Add 3 meetings to folder', 'Move 3 meetings to Trash'])
+ await page.keyboard.press('Escape')
+ await rows.last().click({ button: 'right' })
+ await expect(menu.getByRole('menuitem')).toHaveText(['Select', 'Add to folder', 'Move to Trash'])
+ await page.keyboard.press('Escape')
+ await page.keyboard.press(`${modifier}+a`)
+ await expect(bar.getByRole('status')).toHaveText('4 selected')
+ await page.keyboard.press('Escape')
+ await expect(bar).toHaveCount(0)
+ await rows.first().click({ modifiers: [modifier] })
+ await rows.first().click()
+ await expect(bar).toHaveCount(0)
+ await expect(page.getByTestId('home')).toBeVisible()
+ await rows.first().click({ modifiers: [modifier] })
+ await page.getByTestId('nav-home').focus()
+ await page.keyboard.press('Escape')
+ await expect(bar).toHaveCount(0)
+ } finally { await app.close() }
+})
diff --git a/app/e2e/trash.spec.ts b/app/e2e/trash.spec.ts
index f2ace7d0..1f776611 100644
--- a/app/e2e/trash.spec.ts
+++ b/app/e2e/trash.spec.ts
@@ -60,7 +60,9 @@ test('meeting rows swap metadata for More without shifting content and share poi
await expect(more).toBeFocused()
await page.keyboard.press('Space')
const menu = page.getByTestId('meeting-row-menu')
- await expect(menu.getByRole('menuitem')).toHaveText(['Add to folder', 'Move to Trash'])
+ await expect(menu.getByRole('menuitem')).toHaveText(['Select', 'Add to folder', 'Move to Trash'])
+ await expect(menu.getByRole('menuitem', { name: 'Select', exact: true })).toBeFocused()
+ await page.keyboard.press('ArrowDown')
await expect(menu.getByRole('menuitem', { name: 'Add to folder' })).toBeFocused()
await page.keyboard.press('ArrowDown')
await expect(menu.getByRole('menuitem', { name: 'Move to Trash' })).toBeFocused()
@@ -70,7 +72,7 @@ test('meeting rows swap metadata for More without shifting content and share poi
await page.keyboard.press('Escape')
await expect(link).toBeFocused()
await card.click({ button: 'right', position: { x: 40, y: 20 } })
- await expect(menu.getByRole('menuitem')).toHaveText(['Add to folder', 'Move to Trash'])
+ await expect(menu.getByRole('menuitem')).toHaveText(['Select', 'Add to folder', 'Move to Trash'])
await page.keyboard.press('Escape')
await expect(link).toBeFocused()
await page.keyboard.press('Backspace')
diff --git a/app/src/renderer/src/components/FolderPicker.tsx b/app/src/renderer/src/components/FolderPicker.tsx
index 19bc2bef..d322ced2 100644
--- a/app/src/renderer/src/components/FolderPicker.tsx
+++ b/app/src/renderer/src/components/FolderPicker.tsx
@@ -1,37 +1,49 @@
import { FolderGlyph } from './FolderAppearance'
-import { useEffect, useRef, useState, type KeyboardEvent } from 'react'
-import { Check, FolderIcon, Plus, X } from 'lucide-react'
+import { useEffect, useMemo, useRef, useState, type KeyboardEvent } from 'react'
+import { Check, FolderIcon, Minus, Plus, X } from 'lucide-react'
import type { Folder } from '../../../shared/types'
import { t } from '../../../shared/i18n'
-import { useFolders } from '../folders'
+import { setMeetingsInFolder, useFolders } from '../folders'
+import { folderCheck, nextFolderCheck, reconcileFolderChecks, type FolderMemberships, type PendingFolderChecks } from '../folderSelection'
import { toasts } from './TrashToast'
export type FolderSuggestion = { folder: Folder; dismiss: () => void }
/**
- * Every folder with a check on the ones this meeting is in; a click puts it in or takes it out, and the list stays
- * open for the next. New folder… asks for a name (onNew), and the meeting goes into it.
+ * A full check removes the selection; an empty or mixed check adds it. The picker stays open for the next toggle.
*/
-export function FolderPicker({ meetingId, onNew, testId }: { meetingId: string; onNew: () => void; testId: string }) {
+export function FolderPicker({ meetingId, meetingIds, memberships, onNew, testId }: { meetingId?: string; meetingIds?: string[]; memberships?: FolderMemberships; onNew: () => void; testId: string }) {
const all = useFolders()
- const mine = useFolders(meetingId)
- // shown at once while main catches up, so a quick second click undoes the first
- const [pending, setPending] = useState<Record<string, boolean>>({})
- useEffect(() => { setPending({}) }, [mine])
- const inIt = (id: string) => pending[id] ?? !!mine?.some((s) => s.id === id)
- const toggle = (id: string) => {
- const on = !inIt(id)
- setPending((p) => ({ ...p, [id]: on }))
- void (on ? window.yogurt.folders.add(id, meetingId) : window.yogurt.folders.remove(id, meetingId))
+ const mine = useFolders(memberships ? null : meetingId)
+ const ids = useMemo(() => meetingIds ?? (meetingId ? [meetingId] : []), [meetingIds, meetingId])
+ const real = useMemo(() => memberships ?? { [meetingId ?? '']: mine?.map(folder => folder.id) ?? [] }, [memberships, meetingId, mine])
+ const [pending, setPending] = useState<PendingFolderChecks>({})
+ const saving = useRef(false)
+ const busy = Object.values(pending).some(change => change.saving)
+ useEffect(() => { setPending(p => reconcileFolderChecks(p, ids, real)) }, [ids, real, pending])
+ const inIt = (id: string) => id in pending ? pending[id].checked : folderCheck(ids, real, id)
+ const toggle = async (id: string) => {
+ if (saving.current || !ids.length || (!memberships && !mine)) return
+ const on = nextFolderCheck(inIt(id))
+ saving.current = true
+ setPending(p => ({ ...p, [id]: { checked: on, saving: true, source: real } }))
+ try {
+ await setMeetingsInFolder(id, ids, on)
+ setPending(p => ({ ...p, [id]: { ...p[id], saving: false } }))
+ } catch {
+ setPending(p => { const next = { ...p }; delete next[id]; return next })
+ toasts.add({ title: t("Yogurt couldn't make that change. Try again.") })
+ } finally { saving.current = false }
}
const row = 'flex w-full items-center gap-2.5 rounded-xl px-3 py-2 text-start text-sm hover:bg-[var(--line)] focus-visible:bg-[var(--line)] focus-visible:outline-none'
return <div data-testid={testId} role="group" aria-label={t('Folders')}>
- {all?.map((s) => <button key={s.id} role="menuitemcheckbox" aria-checked={inIt(s.id)} data-testid="folder-option" onClick={() => toggle(s.id)} className={row}>
+ {all?.map((s) => <button key={s.id} role="menuitemcheckbox" aria-checked={inIt(s.id)} aria-disabled={busy || (!memberships && !mine)} data-testid="folder-option" onClick={() => void toggle(s.id)} className={row}>
<FolderGlyph appearance={s} size={15} />
<span className="min-w-0 flex-1 truncate">{s.name}</span>
- {inIt(s.id) && <Check size={15} aria-hidden="true" className="shrink-0 text-accent" />}
+ {inIt(s.id) === true && <Check size={15} aria-hidden="true" className="shrink-0 text-accent" />}
+ {inIt(s.id) === 'mixed' && <Minus size={15} aria-hidden="true" className="shrink-0 text-accent" />}
</button>)}
- <button role="menuitem" data-testid="folder-new" onClick={onNew} className={`${row} ${all?.length ? 'folder-picker-new' : ''}`}>
+ <button role="menuitem" data-testid="folder-new" disabled={busy} onClick={onNew} className={`${row} ${all?.length ? 'folder-picker-new' : ''}`}>
<Plus size={15} aria-hidden="true" className="shrink-0 text-muted" />{t('New folder…')}
</button>
</div>
diff --git a/app/src/renderer/src/components/FoldersNav.tsx b/app/src/renderer/src/components/FoldersNav.tsx
index eefffae9..841a6a26 100644
--- a/app/src/renderer/src/components/FoldersNav.tsx
+++ b/app/src/renderer/src/components/FoldersNav.tsx
@@ -6,7 +6,8 @@ import { Reorder, useDragControls, useReducedMotion } from 'motion/react'
import type { Folder } from '../../../shared/types'
import { t } from '../../../shared/i18n'
import { FolderGlyph } from './FolderAppearance'
-import { MEETING_DRAG } from '../folders'
+import { MEETING_DRAG, addMeetingsToFolder } from '../folders'
+import { draggedMeetings } from '../meetingSelection'
import { DeleteFolder, FolderName, FolderAppearanceDialog } from './FolderDialogs'
import { toasts } from './TrashToast'
@@ -122,8 +123,11 @@ function FolderItem({ folder, collapsed, current, go, onRename, onDelete, onAppe
onDragLeave={() => setDrop(false)}
onDrop={(e) => {
setDrop(false)
- const id = e.dataTransfer.getData(MEETING_DRAG)
- if (id) { e.preventDefault(); void window.yogurt.folders.add(folder.id, id) }
+ const ids = draggedMeetings(e.dataTransfer.getData(MEETING_DRAG))
+ if (ids.length) {
+ e.preventDefault()
+ void addMeetingsToFolder(folder.id, ids).catch(() => toasts.add({ title: t("Yogurt couldn't add this note to the folder. Try again.") }))
+ }
}}>
<FolderGlyph appearance={folder} /><span>{folder.name}</span>
<small data-testid="sidebar-folder-count" aria-label={t('{count} meetings', { count: folder.count })}>{folder.count}</small>
diff --git a/app/src/renderer/src/components/MeetingRow.tsx b/app/src/renderer/src/components/MeetingRow.tsx
index 3fc9a697..f98a4cd7 100644
--- a/app/src/renderer/src/components/MeetingRow.tsx
+++ b/app/src/renderer/src/components/MeetingRow.tsx
@@ -1,15 +1,21 @@
-import { useEffect, useId, useLayoutEffect, useRef, useState, type KeyboardEvent, type ReactNode } from 'react'
+import { useEffect, useId, useLayoutEffect, useRef, useState, type KeyboardEvent, type MouseEvent, type ReactNode } from 'react'
import { createPortal } from 'react-dom'
import { autoUpdate, computePosition, flip, offset, shift } from '@floating-ui/dom'
-import { ChevronRight, Ellipsis, FolderIcon, Trash2 } from 'lucide-react'
+import { ChevronRight, Ellipsis, FolderIcon, ListChecks, Trash2 } from 'lucide-react'
import { t } from '../../../shared/i18n'
import { deleteMeetingFromKey } from '../meetingRowKeys'
import { FolderPicker } from './FolderPicker'
import { FolderName } from './FolderDialogs'
-import { moveToTrash, toasts } from './TrashToast'
+import { addMeetingsToFolder } from '../folders'
+import type { FolderMemberships } from '../folderSelection'
+import { toasts } from './TrashToast'
/** Metadata and actions share the trailing column without moving the row content. */
-export function MeetingRow({ id, recording, children }: { id: string; recording: boolean; children: ReactNode }) {
+export function MeetingRow({ id, recording, children, selected, targets, memberships, busy, onSelect, onClick, onTrash }: {
+ id: string; recording: boolean; children: ReactNode; selected: boolean; targets: string[]; busy: boolean
+ memberships: FolderMemberships
+ onSelect: () => void; onClick: (event: MouseEvent) => void; onTrash: (ids: string[]) => void
+}) {
const row = useRef<HTMLLIElement>(null), button = useRef<HTMLButtonElement>(null), menu = useRef<HTMLDivElement>(null)
const [open, setOpen] = useState<'button' | { x: number; y: number } | null>(null)
const [inFolders, setInFolders] = useState(false), [namingFolder, setNamingFolder] = useState(false)
@@ -38,29 +44,34 @@ export function MeetingRow({ id, recording, children }: { id: string; recording:
return () => document.removeEventListener('pointerdown', away)
}, [open])
const menuKey = (e: KeyboardEvent) => {
- const items = Array.from(menu.current?.querySelectorAll<HTMLElement>('[role="menuitem"]:not(:disabled), [role="menuitemcheckbox"]') ?? [])
+ const items = Array.from(menu.current?.querySelectorAll<HTMLElement>('[role="menuitem"]:not(:disabled), [role="menuitemcheckbox"]:not(:disabled)') ?? [])
const at = items.indexOf(document.activeElement as HTMLElement)
if (e.key === 'Escape') { e.preventDefault(); e.stopPropagation(); close() }
else if (e.key === 'ArrowDown' || e.key === 'ArrowUp') { e.preventDefault(); items[(at + (e.key === 'ArrowDown' ? 1 : -1) + items.length) % items.length]?.focus() }
else if (e.key === 'Home' || e.key === 'End') { e.preventDefault(); items[e.key === 'Home' ? 0 : items.length - 1]?.focus() }
else if (e.key === 'Tab') close()
}
- return <li ref={row} className="native-meeting-row row-swap" data-menu-open={!!open}
+ return <li ref={row} className="native-meeting-row row-swap" data-menu-open={!!open} data-selected={selected}
+ onClickCapture={e => { if (row.current?.contains(e.target as Node) && (e.target as HTMLElement).closest('.native-meeting-link')) onClick(e) }}
onContextMenu={(e) => { if (!row.current?.contains(e.target as Node)) return; e.preventDefault(); show({ x: e.clientX, y: e.clientY }) }}
- onKeyDown={(e) => deleteMeetingFromKey(e, e.target === row.current?.querySelector('.native-meeting-link'), recording, () => void moveToTrash(id))}>
+ onKeyDown={(e) => {
+ if (e.key === 'ContextMenu' || (e.shiftKey && e.key === 'F10')) { e.preventDefault(); const box = row.current!.getBoundingClientRect(); show({ x: box.left + 20, y: box.bottom }); return }
+ deleteMeetingFromKey(e, e.target === row.current?.querySelector('.native-meeting-link'), busy || (recording && !selected), () => onTrash(targets))
+ }}>
{children}
<button ref={button} data-testid="past-note-more" className="workspace-icon meeting-more row-swap-actions" aria-label={t('More')} title={t('More')} aria-haspopup="menu" aria-expanded={!!open} aria-controls={open ? menuId : undefined}
onClick={() => open ? close() : show('button')}><Ellipsis size={14} aria-hidden="true" /></button>
{open && createPortal(<div ref={menu} id={menuId} data-testid="meeting-row-menu" role="menu" aria-label={t('More')} onKeyDown={menuKey}
className="menu-entry meeting-row-menu" style={{ visibility: 'hidden' }}>
- {inFolders ? <FolderPicker meetingId={id} testId="meeting-row-folders" onNew={() => { close(); setNamingFolder(true) }} /> : <>
- <button role="menuitem" aria-haspopup="menu" onClick={() => setInFolders(true)}><FolderIcon size={15} aria-hidden="true" /><span className="flex-1">{t('Add to folder')}</span><ChevronRight size={14} aria-hidden="true" className="rtl:-scale-x-100" /></button>
- <button role="menuitem" data-testid="past-note-trash" disabled={recording} title={recording ? t('Stop the recording first') : undefined} className="text-danger" onClick={() => { close(); void moveToTrash(id) }}><Trash2 size={15} aria-hidden="true" />{t('Move to Trash')}</button>
+ {inFolders ? <FolderPicker key={targets.join(',')} meetingIds={targets} memberships={memberships} testId="meeting-row-folders" onNew={() => { close(); setNamingFolder(true) }} /> : <>
+ {!selected && <><button role="menuitem" data-testid="meeting-select" onClick={() => { onSelect(); close() }}><ListChecks size={15} aria-hidden="true" />{t('Select')}</button><div role="separator" className="meeting-menu-divider" /></>}
+ <button role="menuitem" aria-haspopup="menu" onClick={() => setInFolders(true)}><FolderIcon size={15} aria-hidden="true" /><span className="flex-1">{selected ? t('Add {count} meetings to folder', { count: targets.length }) : t('Add to folder')}</span><ChevronRight size={14} aria-hidden="true" className="rtl:-scale-x-100" /></button>
+ <button role="menuitem" data-testid="past-note-trash" disabled={busy || (recording && !selected)} title={recording ? t('Stop the recording first') : undefined} className="text-danger" onClick={() => { close(); onTrash(targets) }}><Trash2 size={15} aria-hidden="true" />{selected ? t('Move {count} meetings to Trash', { count: targets.length }) : t('Move to Trash')}</button>
</>}
</div>, document.body)}
{namingFolder && <FolderName onDone={(made) => {
setNamingFolder(false); focusRow()
- if (made) void window.yogurt.folders.add(made.id, id).catch(() => toasts.add({ title: t("Yogurt couldn't make that change. Try again.") }))
+ if (made) void addMeetingsToFolder(made.id, targets).catch(() => toasts.add({ title: t("Yogurt couldn't make that change. Try again.") }))
}} />}
</li>
}
diff --git a/app/src/renderer/src/components/MeetingSelectionBar.tsx b/app/src/renderer/src/components/MeetingSelectionBar.tsx
new file mode 100644
index 00000000..a0443818
--- /dev/null
+++ b/app/src/renderer/src/components/MeetingSelectionBar.tsx
@@ -0,0 +1,69 @@
+import { useEffect, useLayoutEffect, useRef, useState, type RefObject } from 'react'
+import { createPortal } from 'react-dom'
+import { autoUpdate, computePosition, flip, offset, shift } from '@floating-ui/dom'
+import { Folder, Trash2, X } from 'lucide-react'
+import { t } from '../../../shared/i18n'
+import { addMeetingsToFolder } from '../folders'
+import type { FolderMemberships } from '../folderSelection'
+import { FolderPicker } from './FolderPicker'
+import { FolderName } from './FolderDialogs'
+import { toasts } from './TrashToast'
+
+export function MeetingSelectionBar({ ids, memberships, list, busy, clear, trash }: {
+ ids: string[]; list: RefObject<HTMLElement | null>; busy: boolean; clear: () => void; trash: () => void
+ memberships: FolderMemberships
+}) {
+ const bar = useRef<HTMLDivElement>(null), trigger = useRef<HTMLButtonElement>(null), menu = useRef<HTMLDivElement>(null)
+ const [open, setOpen] = useState(false), [naming, setNaming] = useState(false)
+ useLayoutEffect(() => {
+ const pane = list.current?.closest<HTMLElement>('.native-library'), el = bar.current
+ if (!pane || !el) return
+ return autoUpdate(pane, el, () => {
+ const box = pane.getBoundingClientRect()
+ Object.assign(el.style, { left: `${box.left + box.width / 2}px`, bottom: `${innerHeight - box.bottom + 20}px`, maxWidth: `${box.width - 32}px` })
+ })
+ }, [list])
+ useLayoutEffect(() => {
+ if (!open || !trigger.current || !menu.current) return
+ const anchor = trigger.current, popup = menu.current
+ let live = true, focus = true
+ const update = () => { void computePosition(anchor, popup, { placement: 'top-start', middleware: [offset(16), flip(), shift({ padding: 8 })] }).then(({ x, y }) => {
+ if (!live) return
+ Object.assign(popup.style, { left: `${x}px`, top: `${y}px`, visibility: 'visible' })
+ if (focus) { focus = false; popup.querySelector<HTMLElement>('[role="menuitemcheckbox"], [role="menuitem"]')?.focus({ preventScroll: true }) }
+ }) }
+ const stop = autoUpdate(anchor, popup, update)
+ return () => { live = false; stop() }
+ }, [open])
+ useEffect(() => {
+ if (!open) return
+ const away = (event: PointerEvent) => { if (!menu.current?.contains(event.target as Node) && !trigger.current?.contains(event.target as Node)) setOpen(false) }
+ document.addEventListener('pointerdown', away)
+ return () => document.removeEventListener('pointerdown', away)
+ }, [open])
+ return createPortal(<>
+ <div ref={bar} className="meeting-selection-bar" data-testid="meeting-selection-bar" role="region" aria-label={t('{count} selected', { count: ids.length })}
+ onKeyDown={e => { if (e.key === 'Escape' && !open) { e.preventDefault(); e.stopPropagation(); clear(); list.current?.querySelector<HTMLButtonElement>('.native-meeting-link')?.focus() } }}>
+ <span className="meeting-selection-count" role="status" aria-live="polite" aria-atomic="true">{t('{count} selected', { count: ids.length })}
+ {ids.length === 1 && <small>{t('Click meetings to add more')}</small>}
+ </span>
+ <div className="meeting-selection-folder">
+ <button ref={trigger} className="workspace-button" disabled={busy} aria-haspopup="menu" aria-expanded={open} onClick={() => setOpen(!open)}><Folder size={14} aria-hidden="true" />{t('Add to folder')}</button>
+ {open && <div ref={menu} role="menu" aria-label={t('Add to folder')} className="menu-entry meeting-selection-menu" style={{ visibility: 'hidden' }} onKeyDown={e => {
+ const items = Array.from(menu.current?.querySelectorAll<HTMLElement>('[role="menuitem"]:not(:disabled), [role="menuitemcheckbox"]:not(:disabled)') ?? [])
+ const at = items.indexOf(document.activeElement as HTMLElement)
+ if (e.key === 'Escape') { e.preventDefault(); e.stopPropagation(); setOpen(false); trigger.current?.focus() }
+ else if (e.key === 'ArrowDown' || e.key === 'ArrowUp') { e.preventDefault(); items[(at + (e.key === 'ArrowDown' ? 1 : -1) + items.length) % items.length]?.focus() }
+ else if (e.key === 'Home' || e.key === 'End') { e.preventDefault(); items[e.key === 'Home' ? 0 : items.length - 1]?.focus() }
+ else if (e.key === 'Tab') setOpen(false)
+ }}><FolderPicker key={ids.join(',')} meetingIds={ids} memberships={memberships} testId="selection-folders" onNew={() => { setOpen(false); setNaming(true) }} /></div>}
+ </div>
+ <button className="workspace-button meeting-selection-delete" disabled={busy} onClick={trash}><Trash2 size={14} aria-hidden="true" />{t('Delete')}</button>
+ <button className="workspace-icon" aria-label={t('Clear selection')} onClick={e => { clear(); if (!e.detail) list.current?.querySelector<HTMLButtonElement>('.native-meeting-link')?.focus() }}><X size={16} aria-hidden="true" /></button>
+ </div>
+ {naming && <FolderName onDone={made => {
+ setNaming(false); trigger.current?.focus()
+ if (made) void addMeetingsToFolder(made.id, ids).catch(() => toasts.add({ title: t("Yogurt couldn't add this note to the folder. Try again.") }))
+ }} />}
+ </>, document.body)
+}
diff --git a/app/src/renderer/src/components/TrashToast.tsx b/app/src/renderer/src/components/TrashToast.tsx
index b7639c58..e7c7301a 100644
--- a/app/src/renderer/src/components/TrashToast.tsx
+++ b/app/src/renderer/src/components/TrashToast.tsx
@@ -4,6 +4,7 @@ import { X } from 'lucide-react'
import { t } from '../../../shared/i18n'
import type { SetupState } from '../../../shared/types'
import { notesReadyNotice } from '../notesSetup'
+import { trashMeetings, restoreMeetings } from '../trashMeetings'
let toastHost: HTMLDivElement | undefined
// Keep Undo reachable when Ask uses the native modal top layer on smaller windows.
@@ -11,7 +12,7 @@ export function setToastDialog(dialog: HTMLDialogElement | null) {
if (toastHost) (dialog ?? document.body).append(toastHost)
}
-type Shown = { id: string; error?: string; /** the note it was moved from: Undo opens it again */ from?: string }
+type Shown = { ids: string[]; bulk?: boolean; error?: string; /** the note it was moved from: Undo opens it again */ from?: string }
let show: ((s: Shown) => void) | undefined
export const toasts = Toast.createToastManager<{ testId?: string; actionTestId?: string }>()
@@ -20,13 +21,16 @@ export const toasts = Toast.createToastManager<{ testId?: string; actionTestId?:
* says so with Undo. from: the route it was deleted on, when that was its own note (main has already gone home).
*/
export async function moveToTrash(id: string, from?: string): Promise<boolean> {
- const r = await window.yogurt.meetings.trash(id).catch(() => 'failed' as const)
- if (r === 'trashed') { show?.({ id, from }); return true }
- if (r === 'missing') return true
- show?.({ id, error: r === 'recording' ? t('Stop the recording first, then try again.')
- : r === 'save-pending' ? t('Open this note and finish saving before deleting it.')
- : t("Yogurt couldn't move this note to the Trash. Try again.") })
- return false
+ return (await moveMeetingsToTrash([id], from, false)).includes(id)
+}
+
+export async function moveMeetingsToTrash(ids: string[], from?: string, bulk = true): Promise<string[]> {
+ const result = await trashMeetings(ids, id => window.yogurt.meetings.trash(id))
+ const error = result.error === 'recording' ? t('Stop the recording first, then try again.')
+ : result.error === 'save-pending' ? t('Open this note and finish saving before deleting it.')
+ : result.error ? t("Yogurt couldn't move this note to the Trash. Try again.") : undefined
+ if (result.trashed.length || error) show?.({ ids: result.trashed, from, bulk, error })
+ return result.done
}
/** "Moved to the Trash" with Undo, for a few seconds; one at a time, the newest wins */
@@ -67,15 +71,17 @@ export function TrashToast({ go }: { go: (route: string) => void }) {
useEffect(() => {
show = (s) => {
if (previous.current) toasts.close(previous.current)
- let restoring = false
+ let restoring = false, remaining = s.ids
+ const moved = s.bulk ? t('{count} meetings moved to Trash', { count: s.ids.length }) : t('Moved to the Trash')
const id = toasts.add({
- title: s.error ?? t('Moved to the Trash'), timeout: 8000,
+ title: s.error ? (s.ids.length ? `${moved} · ${s.error}` : s.error) : moved, timeout: s.error ? 0 : 8000,
data: { testId: 'trash-toast', actionTestId: 'trash-undo' },
- actionProps: s.error ? undefined : { children: t('Undo'), onClick: async () => {
+ actionProps: !s.ids.length ? undefined : { children: t('Undo'), onClick: async () => {
if (restoring) return
restoring = true
try {
- await window.yogurt.meetings.restore(s.id)
+ remaining = await restoreMeetings(remaining, id => window.yogurt.meetings.restore(id))
+ if (remaining.length) { toasts.update(id, { title: t("Yogurt couldn't make that change. Try again."), timeout: 0 }); return }
toasts.close(id)
if (s.from) go(s.from)
} catch { toasts.update(id, { title: t("Yogurt couldn't make that change. Try again."), timeout: 0 }) }
diff --git a/app/src/renderer/src/folderSelection.ts b/app/src/renderer/src/folderSelection.ts
new file mode 100644
index 00000000..449be78f
--- /dev/null
+++ b/app/src/renderer/src/folderSelection.ts
@@ -0,0 +1,17 @@
+export type FolderMemberships = Readonly<Record<string, readonly string[]>>
+export type FolderCheck = boolean | 'mixed'
+export type PendingFolderChecks = Record<string, { checked: boolean; saving: boolean; source: FolderMemberships }>
+
+export function folderCheck(ids: readonly string[], memberships: FolderMemberships, folder: string): FolderCheck {
+ const count = ids.filter(id => memberships[id]?.includes(folder)).length
+ return count === 0 ? false : count === ids.length ? true : 'mixed'
+}
+
+export const nextFolderCheck = (checked: FolderCheck) => checked !== true
+
+/** Keep the optimistic check through stale or unrelated refreshes, until the saved membership arrives. */
+export function reconcileFolderChecks(pending: PendingFolderChecks, ids: readonly string[], memberships: FolderMemberships): PendingFolderChecks {
+ const waiting = Object.entries(pending).filter(([folder, change]) =>
+ change.saving || change.source === memberships || folderCheck(ids, memberships, folder) !== change.checked)
+ return waiting.length === Object.keys(pending).length ? pending : Object.fromEntries(waiting)
+}
diff --git a/app/src/renderer/src/folders.ts b/app/src/renderer/src/folders.ts
index 40be6567..38985533 100644
--- a/app/src/renderer/src/folders.ts
+++ b/app/src/renderer/src/folders.ts
@@ -8,9 +8,10 @@ export const MEETING_DRAG = 'application/x-yogurt-meeting'
* Folders as main has them, read again on every change to a folder and every change to meetings (a meeting deleted or
* imported changes the counts). meetingId: only the folders that meeting is in.
*/
-export function useFolders(meetingId?: string): Folder[] | undefined {
+export function useFolders(meetingId?: string | null): Folder[] | undefined {
const [folders, setFolders] = useState<Folder[]>()
useEffect(() => {
+ if (meetingId === null) return
let seq = 0
const load = () => {
const mine = ++seq
@@ -23,3 +24,16 @@ export function useFolders(meetingId?: string): Folder[] | undefined {
}, [meetingId])
return folders
}
+
+/** Folder writes are idempotent; wait for every result before reporting a failure. */
+export async function addMeetingsToFolder(folder: string, ids: string[]) {
+ return setMeetingsInFolder(folder, ids, true)
+}
+
+export async function setMeetingsInFolder(folder: string, ids: string[], on: boolean) {
+ const results = await Promise.allSettled([...new Set(ids)].map(async id => {
+ await (on ? window.yogurt.folders.add(folder, id) : window.yogurt.folders.remove(folder, id))
+ if ((await window.yogurt.folders.of(id)).some(item => item.id === folder) !== on) throw new Error('Folder membership not updated')
+ }))
+ if (results.some(result => result.status === 'rejected')) throw new Error(on ? 'Folder not added' : 'Folder not removed')
+}
diff --git a/app/src/renderer/src/meetingSelection.ts b/app/src/renderer/src/meetingSelection.ts
new file mode 100644
index 00000000..6026fa70
--- /dev/null
+++ b/app/src/renderer/src/meetingSelection.ts
@@ -0,0 +1,37 @@
+export type MeetingSelection = { ids: string[]; anchor: string | null }
+export const emptySelection: MeetingSelection = { ids: [], anchor: null }
+type Action = { type: 'toggle' | 'range' | 'select'; id: string; visible: string[] }
+ | { type: 'all'; visible: string[] } | { type: 'prune'; visible: string[] } | { type: 'clear' } | { type: 'remove'; ids: string[] }
+
+export function meetingSelection(state: MeetingSelection, action: Action): MeetingSelection {
+ if (action.type === 'clear') return emptySelection
+ if (action.type === 'all') return { ids: [...action.visible], anchor: action.visible[0] ?? null }
+ if (action.type === 'prune' || action.type === 'remove') {
+ const ids = state.ids.filter(id => action.type === 'prune' ? action.visible.includes(id) : !action.ids.includes(id))
+ return ids.length === state.ids.length ? state : { ids, anchor: ids.includes(state.anchor ?? '') ? state.anchor : null }
+ }
+ if (!action.visible.includes(action.id)) return state
+ const ids = new Set(state.ids)
+ const at = action.visible.indexOf(state.anchor ?? '')
+ if (action.type === 'range' && at >= 0) {
+ const end = action.visible.indexOf(action.id)
+ action.visible.slice(Math.min(at, end), Math.max(at, end) + 1).forEach(id => ids.add(id))
+ return { ids: [...ids], anchor: state.anchor }
+ }
+ if (action.type === 'toggle' && ids.has(action.id)) ids.delete(action.id)
+ else ids.add(action.id)
+ return { ids: [...ids], anchor: ids.size ? action.id : null }
+}
+
+export const selectsMeeting = (selected: number, command: boolean, shift: boolean) => selected > 0 || command || shift
+export const meetingTargets = (selected: string[], id: string) => selected.includes(id) ? selected : [id]
+
+/** Single-row drags remain readable by the same drop target. */
+export function draggedMeetings(value: string): string[] {
+ if (!value) return []
+ if (!value.startsWith('[')) return [value]
+ try {
+ const ids: unknown = JSON.parse(value)
+ return Array.isArray(ids) && ids.every(id => typeof id === 'string' && id.length > 0) ? [...new Set(ids)] : []
+ } catch { return [] }
+}
diff --git a/app/src/renderer/src/screens/Folder.tsx b/app/src/renderer/src/screens/Folder.tsx
index c23459ba..fd1eab2a 100644
--- a/app/src/renderer/src/screens/Folder.tsx
+++ b/app/src/renderer/src/screens/Folder.tsx
@@ -17,7 +17,7 @@ export function Folder({ folder, open, onStarted }: { folder: FolderRow; open: (
const day = useDay()
return <div data-testid="folder-page" className="native-folder">
<StartRecording onStarted={onStarted} />
- <div className="native-library" ref={past.setRoot}>
+ <div className="native-library" ref={past.setRoot} tabIndex={-1}>
<div className="folder-page-heading"><button className="folder-heading-icon" data-testid="folder-heading-icon" aria-label={t('Change icon')} title={t('Change icon')} onClick={() => setAppearance(true)} data-folder-color={folder.color}><FolderGlyph appearance={folder} size={24} /></button><FolderTitle folder={folder} /></div>
{appearance && <FolderAppearanceDialog folder={folder} onDone={() => setAppearance(false)} />}
<LoadingContent pending={!past.cards} testId="meetings-loading" skeleton={<MeetingListLoading showFolders={false} />} className="library-load">{!past.cards?.length ? <section data-testid="folder-empty" className="library-empty empty-state"><div className="empty-state-content">
diff --git a/app/src/renderer/src/screens/Home.tsx b/app/src/renderer/src/screens/Home.tsx
index 2ea5da04..1c7ebe3c 100644
--- a/app/src/renderer/src/screens/Home.tsx
+++ b/app/src/renderer/src/screens/Home.tsx
@@ -1,6 +1,6 @@
import { LoadingContent } from '../components/LoadingContent'
import { Mic } from '../components/Icons'
-import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
+import { useCallback, useEffect, useMemo, useReducer, useRef, useState } from 'react'
import { Circle, FileText, Users } from 'lucide-react'
import type { MeetingCard } from '../../../shared/types'
import { useScrollMemory } from '../useScrollMemory'
@@ -8,10 +8,13 @@ import { loadUpTo } from '../paging'
import { t } from '../../../shared/i18n'
import { dayLabel, timeOf, useDay } from '../dates'
import { useLanguage } from '../i18n'
-import { toasts } from '../components/TrashToast'
+import { moveMeetingsToTrash, toasts } from '../components/TrashToast'
import { MeetingRow } from '../components/MeetingRow'
import { Agenda } from '../components/Agenda'
import { MEETING_DRAG } from '../folders'
+import { command } from '../keys'
+import { emptySelection, meetingSelection, meetingTargets, selectsMeeting } from '../meetingSelection'
+import { MeetingSelectionBar } from '../components/MeetingSelectionBar'
import { peopleSummary, useMyName } from '../components/People'
const PAGE = 40
@@ -36,7 +39,7 @@ export function Home({ open, openFolder }: { open: (id: string) => void; openFol
<div className="home-toolbar-action no-drag">
{!recording && <button data-testid="new-note" onClick={() => start(null)} className="workspace-button primary"><Mic size={14} aria-hidden="true" />{t('Start recording')}</button>}
</div>
- <div className="native-library" ref={past.setRoot}>
+ <div className="native-library" ref={past.setRoot} tabIndex={-1}>
<h1>{t('Your meetings')}</h1>
<LoadingContent pending={!past.cards} testId="meetings-loading" skeleton={<MeetingListLoading />} className="library-load">{noMeetings ? <section data-testid="past-empty" className="library-empty empty-state"><div className="empty-state-content">
<div className="empty-tile"><FileText size={28} strokeWidth={1.5} aria-hidden="true" /></div><h2>{t('Your notes will show up here')}</h2>
@@ -114,6 +117,36 @@ export function usePastNotes(folder?: string) {
export function PastNotes({ cards, day, more, sentinel, onOpen, openFolder, showFolders = true, loading = false }: { loading?: boolean; cards: MeetingCard[]; day: string; more: boolean; sentinel: (el: HTMLDivElement | null) => void; onOpen: (id: string) => void; openFolder?: (id: string) => void; showFolders?: boolean }) {
const lang = useLanguage()
const me = useMyName()
+ const [selection, select] = useReducer(meetingSelection, emptySelection)
+ const [busy, setBusy] = useState(false)
+ const pending = useRef(false), list = useRef<HTMLElement>(null)
+ const visible = useMemo(() => cards.map(card => card.id), [cards])
+ const memberships = useMemo(() => Object.fromEntries(cards.map(card => [card.id, (card.folders ?? []).map(folder => folder.id)])), [cards])
+ const selected = selection.ids.filter(id => visible.includes(id))
+ useEffect(() => { select({ type: 'prune', visible }) }, [visible])
+ useEffect(() => {
+ if (!selected.length) return
+ const escape = (e: KeyboardEvent) => {
+ if (e.key !== 'Escape' || e.defaultPrevented || (e.target instanceof Element && e.target.closest('input,textarea,[contenteditable=true],[role="menu"],dialog,[role="dialog"]'))) return
+ e.preventDefault(); select({ type: 'clear' })
+ }
+ window.addEventListener('keydown', escape)
+ return () => window.removeEventListener('keydown', escape)
+ }, [selected.length > 0])
+ const trash = async (ids: string[]) => {
+ if (pending.current) return
+ pending.current = true; setBusy(true)
+ const keyboard = !!document.activeElement?.matches(':focus-visible')
+ try {
+ const done = await moveMeetingsToTrash(ids, undefined, selected.includes(ids[0]))
+ select({ type: 'remove', ids: done })
+ if (keyboard) {
+ const next = Array.from(list.current?.querySelectorAll<HTMLButtonElement>('.native-meeting-link') ?? []).find(row => !done.includes(row.dataset.meetingId!))
+ const target = next ?? list.current?.closest<HTMLElement>('.native-library')
+ target?.focus()
+ }
+ } finally { pending.current = false; setBusy(false) }
+ }
const days = useMemo(() => {
const out: Array<{ key: string; label: string; cards: MeetingCard[] }> = []
for (const c of cards) {
@@ -123,37 +156,49 @@ export function PastNotes({ cards, day, more, sentinel, onOpen, openFolder, show
}
return out
}, [cards, day, lang])
- return <section aria-label={t('Saved meetings')}>
+ return <section ref={list} aria-label={t('Saved meetings')} data-selecting={selected.length > 0} onKeyDown={e => {
+ if (!list.current?.contains(e.target as Node) || (e.target as HTMLElement).closest('input,textarea,[contenteditable=true],[role="menu"]')) return
+ if (command(e) && e.key.toLowerCase() === 'a' && !e.altKey && !e.shiftKey) { e.preventDefault(); select({ type: 'all', visible }) }
+ else if (e.key === 'Escape') { e.preventDefault(); select({ type: 'clear' }) }
+ }}>
{days.map((group) => <div className="native-meeting-day" key={group.key}>
<h2 data-testid={loading ? undefined : "past-day"}>{loading ? <span className="loading-bar" style={{ width: 48 }} /> : group.label}</h2>
- <ul>{group.cards.map((meeting) => loading ? <li className="native-meeting-row" key={meeting.id}><PastCard c={meeting} onOpen={onOpen} me="" showFolders={showFolders} loading /></li> : <MeetingRow key={meeting.id} id={meeting.id} recording={meeting.state === 'recording'}>
- <PastCard c={meeting} onOpen={onOpen} openFolder={openFolder} me={me} showFolders={showFolders} />
+ <ul>{group.cards.map((meeting) => loading ? <li className="native-meeting-row" key={meeting.id}><PastCard c={meeting} onOpen={onOpen} me="" showFolders={showFolders} loading /></li> : <MeetingRow key={meeting.id} id={meeting.id} recording={meeting.state === 'recording'} selected={selected.includes(meeting.id)} targets={meetingTargets(selected, meeting.id)} memberships={memberships} busy={busy}
+ onSelect={() => select({ type: 'select', id: meeting.id, visible })} onTrash={ids => void trash(ids)}
+ onClick={e => {
+ if (selectsMeeting(selected.length, command(e), e.shiftKey)) {
+ e.preventDefault(); e.stopPropagation(); select({ type: e.shiftKey ? 'range' : 'toggle', id: meeting.id, visible })
+ }
+ }}>
+ <PastCard c={meeting} onOpen={onOpen} openFolder={openFolder} me={me} selected={selected.includes(meeting.id)} dragIds={meetingTargets(selected, meeting.id)} showFolders={showFolders} />
</MeetingRow>)}</ul>
</div>)}
{more && <div data-testid="past-more" ref={sentinel} className="h-8" aria-hidden="true" />}
+ {!loading && selected.length > 0 && <MeetingSelectionBar ids={selected} memberships={memberships} list={list} busy={busy} clear={() => select({ type: 'clear' })} trash={() => void trash(selected)} />}
</section>
}
/** when: in place of the time (the Trash shows the day); fixed: not dragged onto folders */
-export function PastCard({ c, onOpen, openFolder, when, fixed, me, showFolders = true, loading = false }: { loading?: boolean; c: MeetingCard; onOpen: (id: string) => void; openFolder?: (id: string) => void; when?: string; fixed?: boolean; me: string; showFolders?: boolean }) {
+export function PastCard({ c, onOpen, openFolder, when, fixed, me, selected, dragIds, showFolders = true, loading = false }: { selected?: boolean; dragIds?: string[]; loading?: boolean; c: MeetingCard; onOpen: (id: string) => void; openFolder?: (id: string) => void; when?: string; fixed?: boolean; me: string; showFolders?: boolean }) {
const recording = c.state === 'recording'
const minutes = (c.state === 'done' || c.state === 'stopped') && c.endedAt != null
? Math.max(1, Math.round((c.durationMs ?? (c.endedAt - c.startedAt)) / 60_000)) : null
const initials = c.attendees[0]?.name.split(/\s+/).filter(Boolean).slice(0, 2).map((part) => Array.from(part)[0]).join('').toLocaleUpperCase()
// dragged onto a folder in the sidebar, it goes into that folder
- return <button data-testid={loading ? undefined : "past-note"} disabled={loading} draggable={!fixed && !loading} onDragStart={fixed ? undefined : (e) => {
- e.dataTransfer.setData(MEETING_DRAG, c.id)
+ return <button data-testid={loading ? undefined : "past-note"} data-meeting-id={c.id} disabled={loading} draggable={!fixed && !loading} onDragStart={fixed ? undefined : (e) => {
+ e.dataTransfer.setData(MEETING_DRAG, dragIds && dragIds.length > 1 ? JSON.stringify(dragIds) : c.id)
e.dataTransfer.effectAllowed = 'link'
const preview = document.createElement('div')
preview.className = 'meeting-drag-preview'
preview.setAttribute('aria-hidden', 'true')
preview.append(e.currentTarget.querySelector('.meeting-identity')!.cloneNode(true), e.currentTarget.querySelector('.meeting-description strong')!.cloneNode(true))
+ if (dragIds && dragIds.length > 1) { const count = document.createElement('span'); count.className = 'meeting-drag-count'; count.textContent = t('{count} meetings', { count: dragIds.length }); preview.append(count) }
document.body.append(preview)
e.dataTransfer.setDragImage(preview, 24, 24)
// The native drag keeps its snapshot after this frame; no duplicate row stays in the page.
requestAnimationFrame(() => preview.remove())
}}
- onClick={() => onOpen(c.id)} className="native-meeting-link">
+ onClick={() => onOpen(c.id)} aria-pressed={selected} className="native-meeting-link">
<span className="meeting-content">
<span className={`meeting-identity ${recording ? 'recording' : ''}`} aria-hidden="true">{loading ? null : recording ? <Mic size={16} /> : c.attendees.length > 1 ? <Users size={16} /> : initials || <FileText size={16} />}</span>
<span className="meeting-description"><strong>{loading ? <span className="loading-bar" style={{ width: c.title.length * 6, maxWidth: '85%' }} /> : c.title}</strong><span data-testid={loading ? undefined : "past-note-attendees"} title={c.attendees.map((p) => p.name).join(', ') || undefined}>{loading ? <span className="loading-bar" style={{ width: 110 }} /> : c.attendees.length ? peopleSummary(c.attendees, me) : t('Personal notes')}</span>
diff --git a/app/src/renderer/src/trashMeetings.ts b/app/src/renderer/src/trashMeetings.ts
new file mode 100644
index 00000000..4a4d75a1
--- /dev/null
+++ b/app/src/renderer/src/trashMeetings.ts
@@ -0,0 +1,22 @@
+type Result = 'trashed' | 'missing' | 'recording' | 'save-pending' | 'failed'
+
+/** Keep failures out of Undo, and leave them selected so they can be retried. */
+export async function trashMeetings(ids: string[], trash: (id: string) => Promise<Result>) {
+ const trashed: string[] = [], done: string[] = []
+ let error: Exclude<Result, 'trashed' | 'missing'> | undefined
+ for (const id of new Set(ids)) {
+ const result = await trash(id).catch(() => 'failed' as const)
+ if (result === 'trashed') trashed.push(id)
+ if (result === 'trashed' || result === 'missing') done.push(id)
+ else error ??= result
+ }
+ return { trashed, done, error }
+}
+
+export async function restoreMeetings(ids: string[], restore: (id: string) => Promise<void>) {
+ const failed: string[] = []
+ for (const id of ids) {
+ try { await restore(id) } catch { failed.push(id) }
+ }
+ return failed
+}
diff --git a/app/src/renderer/src/workspace.css b/app/src/renderer/src/workspace.css
index 69f6be94..3a38c9b3 100644
--- a/app/src/renderer/src/workspace.css
+++ b/app/src/renderer/src/workspace.css
@@ -591,3 +591,16 @@ body:has(.chat-panel[open]) .app-toast-viewport { inset-inline-end:460px; }
.note-summary-rim { inset:0;z-index:2; }
.note-summary-status { position:absolute;inset-inline-start:14px;bottom:10px;z-index:1;background:var(--bg);color:var(--muted);font-size:11px;line-height:16px;pointer-events:none; }
.note-latest { position:absolute;bottom:10px;left:50%;transform:translateX(-50%);z-index:3;display:flex;align-items:center;gap:4px;border:1px solid var(--line);border-radius:6px;padding:4px 12px;background:var(--float);color:var(--ink);font-size:12px;line-height:16px;box-shadow:var(--shadow); }
+
+.native-library .native-meeting-row[data-selected=true],.native-library .native-meeting-row[data-selected=true]:hover { background:color-mix(in srgb,var(--primary) 9%,var(--bg)); }
+.native-library:has([data-selecting=true]) { padding-bottom:100px; }
+.native-library:focus-visible { outline:2px solid var(--focus);outline-offset:-2px; }
+.meeting-menu-divider { height:1px;margin:4px 0;background:var(--line); }
+.meeting-selection-bar { position:fixed;transform:translateX(-50%);display:flex;align-items:center;flex-wrap:wrap;gap:10px;width:max-content;padding:9px 10px 9px 16px;border:1px solid var(--line);border-radius:11px;background:var(--float);color:var(--ink);box-shadow:0 8px 24px #0000001F,0 1px 3px #00000014;z-index:60; }
+.meeting-selection-count { margin-inline-end:8px;font-size:12px;font-weight:500;font-variant-numeric:tabular-nums; }
+.meeting-selection-count small { display:block;color:var(--muted);font-size:11px;line-height:14px;font-weight:400; }
+.meeting-selection-delete { color:var(--danger); }
+.meeting-selection-folder { position:relative; }
+.meeting-selection-menu { position:absolute;width:240px;max-width:calc(100vw - 16px);max-height:min(320px,60vh);overflow:auto;border:1px solid var(--line); }
+.meeting-selection-bar button:focus-visible { outline:2px solid var(--focus);outline-offset:2px; }
+.meeting-drag-count { border-radius:5px;padding:2px 6px;background:var(--primary);color:#FFFFFF;font-size:11px; }
diff --git a/app/src/shared/locales/ar.json b/app/src/shared/locales/ar.json
index 3a5ed9e5..e3e180a1 100644
--- a/app/src/shared/locales/ar.json
+++ b/app/src/shared/locales/ar.json
@@ -688,5 +688,29 @@
"You can restart once the recording stops.": "يمكنك إعادة التشغيل بعد توقف التسجيل.",
"Check now": "تحقّق الآن",
"Eject the Yogurt installer?": "إخراج مثبّت Yogurt؟",
- "Eject": "إخراج"
+ "Eject": "إخراج",
+ "{count} selected": "تم تحديد {count}",
+ "Click meetings to add more": "انقر على الاجتماعات لإضافة المزيد",
+ "Clear selection": "مسح التحديد",
+ "Add {count} meetings to folder": {
+ "one": "إضافة اجتماع واحد إلى مجلد",
+ "two": "إضافة اجتماعين إلى مجلد",
+ "few": "إضافة {count} اجتماعات إلى مجلد",
+ "many": "إضافة {count} اجتماعًا إلى مجلد",
+ "other": "إضافة {count} اجتماع إلى مجلد"
+ },
+ "Move {count} meetings to Trash": {
+ "one": "نقل اجتماع واحد إلى سلة المهملات",
+ "two": "نقل اجتماعين إلى سلة المهملات",
+ "few": "نقل {count} اجتماعات إلى سلة المهملات",
+ "many": "نقل {count} اجتماعًا إلى سلة المهملات",
+ "other": "نقل {count} اجتماع إلى سلة المهملات"
+ },
+ "{count} meetings moved to Trash": {
+ "one": "تم نقل اجتماع واحد إلى سلة المهملات",
+ "two": "تم نقل اجتماعين إلى سلة المهملات",
+ "few": "تم نقل {count} اجتماعات إلى سلة المهملات",
+ "many": "تم نقل {count} اجتماعًا إلى سلة المهملات",
+ "other": "تم نقل {count} اجتماع إلى سلة المهملات"
+ }
}
diff --git a/app/src/shared/locales/bn.json b/app/src/shared/locales/bn.json
index 01d35e18..b7b95b64 100644
--- a/app/src/shared/locales/bn.json
+++ b/app/src/shared/locales/bn.json
@@ -632,5 +632,11 @@
"You can restart once the recording stops.": "রেকর্ডিং থামলে আবার চালু করতে পারবেন।",
"Check now": "এখনই দেখুন",
"Eject the Yogurt installer?": "Yogurt ইনস্টলার বের করবেন?",
- "Eject": "বের করুন"
+ "Eject": "বের করুন",
+ "{count} selected": "{count}টি বেছে নেওয়া হয়েছে",
+ "Click meetings to add more": "আরও যোগ করতে মিটিংয়ে ক্লিক করুন",
+ "Clear selection": "নির্বাচন মুছুন",
+ "Add {count} meetings to folder": "{count}টি মিটিং ফোল্ডারে যোগ করুন",
+ "Move {count} meetings to Trash": "{count}টি মিটিং ট্র্যাশে সরান",
+ "{count} meetings moved to Trash": "{count}টি মিটিং ট্র্যাশে সরানো হয়েছে"
}
diff --git a/app/src/shared/locales/cs.json b/app/src/shared/locales/cs.json
index eab25551..21e8bd1c 100644
--- a/app/src/shared/locales/cs.json
+++ b/app/src/shared/locales/cs.json
@@ -658,5 +658,30 @@
"You can restart once the recording stops.": "Restartovat můžete, až nahrávání skončí.",
"Check now": "Zkontrolovat",
"Eject the Yogurt installer?": "Vysunout instalátor Yogurt?",
- "Eject": "Vysunout"
+ "Eject": "Vysunout",
+ "{count} selected": {
+ "one": "{count} vybrána",
+ "few": "{count} vybrány",
+ "other": "{count} vybráno"
+ },
+ "Click meetings to add more": "Kliknutím na schůzky přidáte další",
+ "Clear selection": "Zrušit výběr",
+ "Add {count} meetings to folder": {
+ "one": "Přidat {count} schůzku do složky",
+ "few": "Přidat {count} schůzky do složky",
+ "many": "Přidat {count} schůzky do složky",
+ "other": "Přidat {count} schůzek do složky"
+ },
+ "Move {count} meetings to Trash": {
+ "one": "Přesunout {count} schůzku do koše",
+ "few": "Přesunout {count} schůzky do koše",
+ "many": "Přesunout {count} schůzky do koše",
+ "other": "Přesunout {count} schůzek do koše"
+ },
+ "{count} meetings moved to Trash": {
+ "one": "{count} schůzka přesunuta do koše",
+ "few": "{count} schůzky přesunuty do koše",
+ "many": "{count} schůzky přesunuto do koše",
+ "other": "{count} schůzek přesunuto do koše"
+ }
}
diff --git a/app/src/shared/locales/da.json b/app/src/shared/locales/da.json
index 212a8b79..c858254a 100644
--- a/app/src/shared/locales/da.json
+++ b/app/src/shared/locales/da.json
@@ -632,5 +632,20 @@
"You can restart once the recording stops.": "Du kan genstarte, når optagelsen stopper.",
"Check now": "Søg nu",
"Eject the Yogurt installer?": "Skub Yogurt-installationsprogrammet ud?",
- "Eject": "Skub ud"
+ "Eject": "Skub ud",
+ "{count} selected": "{count} valgt",
+ "Click meetings to add more": "Klik på møder for at tilføje flere",
+ "Clear selection": "Ryd markering",
+ "Add {count} meetings to folder": {
+ "one": "Føj {count} møde til mappe",
+ "other": "Føj {count} møder til mappe"
+ },
+ "Move {count} meetings to Trash": {
+ "one": "Flyt {count} møde til papirkurv",
+ "other": "Flyt {count} møder til papirkurv"
+ },
+ "{count} meetings moved to Trash": {
+ "one": "{count} møde flyttet til papirkurv",
+ "other": "{count} møder flyttet til papirkurv"
+ }
}
diff --git a/app/src/shared/locales/de.json b/app/src/shared/locales/de.json
index 94b3a822..f65b3ed4 100644
--- a/app/src/shared/locales/de.json
+++ b/app/src/shared/locales/de.json
@@ -632,5 +632,20 @@
"You can restart once the recording stops.": "Du kannst neu starten, sobald die Aufnahme endet.",
"Check now": "Jetzt suchen",
"Eject the Yogurt installer?": "Yogurt-Installationsprogramm auswerfen?",
- "Eject": "Auswerfen"
+ "Eject": "Auswerfen",
+ "{count} selected": "{count} ausgewählt",
+ "Click meetings to add more": "Weitere Meetings durch Klicken hinzufügen",
+ "Clear selection": "Auswahl aufheben",
+ "Add {count} meetings to folder": {
+ "one": "{count} Meeting zu Ordner hinzufügen",
+ "other": "{count} Meetings zu Ordner hinzufügen"
+ },
+ "Move {count} meetings to Trash": {
+ "one": "{count} Meeting in den Papierkorb verschieben",
+ "other": "{count} Meetings in den Papierkorb verschieben"
+ },
+ "{count} meetings moved to Trash": {
+ "one": "{count} Meeting in den Papierkorb verschoben",
+ "other": "{count} Meetings in den Papierkorb verschoben"
+ }
}
diff --git a/app/src/shared/locales/el.json b/app/src/shared/locales/el.json
index f62fcf31..cab1a500 100644
--- a/app/src/shared/locales/el.json
+++ b/app/src/shared/locales/el.json
@@ -632,5 +632,23 @@
"You can restart once the recording stops.": "Μπορείς να κάνεις επανεκκίνηση όταν σταματήσει η εγγραφή.",
"Check now": "Έλεγχος τώρα",
"Eject the Yogurt installer?": "Εξαγωγή του προγράμματος εγκατάστασης του Yogurt;",
- "Eject": "Εξαγωγή"
+ "Eject": "Εξαγωγή",
+ "{count} selected": {
+ "one": "{count} επιλεγμένη",
+ "other": "{count} επιλεγμένες"
+ },
+ "Click meetings to add more": "Κάντε κλικ σε συσκέψεις για να προσθέσετε κι άλλες",
+ "Clear selection": "Εκκαθάριση επιλογής",
+ "Add {count} meetings to folder": {
+ "one": "Προσθήκη {count} σύσκεψης σε φάκελο",
+ "other": "Προσθήκη {count} συσκέψεων σε φάκελο"
+ },
+ "Move {count} meetings to Trash": {
+ "one": "Μετακίνηση {count} σύσκεψης στον Κάδο",
+ "other": "Μετακίνηση {count} συσκέψεων στον Κάδο"
+ },
+ "{count} meetings moved to Trash": {
+ "one": "{count} σύσκεψη μετακινήθηκε στον Κάδο",
+ "other": "{count} συσκέψεις μετακινήθηκαν στον Κάδο"
+ }
}
diff --git a/app/src/shared/locales/en.json b/app/src/shared/locales/en.json
index 567566f9..9722d65f 100644
--- a/app/src/shared/locales/en.json
+++ b/app/src/shared/locales/en.json
@@ -68,5 +68,21 @@
"Downloading Yogurt's AI: {progress}": "Downloading Yogurt's AI: {progress}",
"{done} of {total} GB": "{done} of {total} GB",
"{progress} · about {minutes} min left": "{progress} · about {minutes} min left",
- "You can record now. Yogurt writes your notes and answers questions once this finishes.": "You can record now. Yogurt writes your notes and answers questions once this finishes."
+ "You can record now. Yogurt writes your notes and answers questions once this finishes.": "You can record now. Yogurt writes your notes and answers questions once this finishes.",
+ "{count} selected": {
+ "one": "{count} selected",
+ "other": "{count} selected"
+ },
+ "Add {count} meetings to folder": {
+ "one": "Add {count} meeting to folder",
+ "other": "Add {count} meetings to folder"
+ },
+ "Move {count} meetings to Trash": {
+ "one": "Move {count} meeting to Trash",
+ "other": "Move {count} meetings to Trash"
+ },
+ "{count} meetings moved to Trash": {
+ "one": "{count} meeting moved to Trash",
+ "other": "{count} meetings moved to Trash"
+ }
}
diff --git a/app/src/shared/locales/es.json b/app/src/shared/locales/es.json
index ec3d3152..2b25e5b4 100644
--- a/app/src/shared/locales/es.json
+++ b/app/src/shared/locales/es.json
@@ -645,5 +645,23 @@
"You can restart once the recording stops.": "Puedes reiniciar cuando termine la grabación.",
"Check now": "Buscar ahora",
"Eject the Yogurt installer?": "¿Expulsar el instalador de Yogurt?",
- "Eject": "Expulsar"
+ "Eject": "Expulsar",
+ "{count} selected": {
+ "one": "{count} seleccionada",
+ "other": "{count} seleccionadas"
+ },
+ "Click meetings to add more": "Haz clic en reuniones para añadir más",
+ "Clear selection": "Borrar selección",
+ "Add {count} meetings to folder": {
+ "one": "Añadir {count} reunión a una carpeta",
+ "other": "Añadir {count} reuniones a una carpeta"
+ },
+ "Move {count} meetings to Trash": {
+ "one": "Mover {count} reunión a la papelera",
+ "other": "Mover {count} reuniones a la papelera"
+ },
+ "{count} meetings moved to Trash": {
+ "one": "{count} reunión movida a la papelera",
+ "other": "{count} reuniones movidas a la papelera"
+ }
}
diff --git a/app/src/shared/locales/fi.json b/app/src/shared/locales/fi.json
index 641ba78c..02c99191 100644
--- a/app/src/shared/locales/fi.json
+++ b/app/src/shared/locales/fi.json
@@ -635,5 +635,20 @@
"You can restart once the recording stops.": "Voit käynnistää uudelleen, kun tallennus päättyy.",
"Check now": "Tarkista nyt",
"Eject the Yogurt installer?": "Poistetaanko Yogurtin asennusohjelma?",
- "Eject": "Poista"
+ "Eject": "Poista",
+ "{count} selected": "{count} valittu",
+ "Click meetings to add more": "Lisää kokouksia napsauttamalla niitä",
+ "Clear selection": "Tyhjennä valinta",
+ "Add {count} meetings to folder": {
+ "one": "Lisää {count} kokous kansioon",
+ "other": "Lisää {count} kokousta kansioon"
+ },
+ "Move {count} meetings to Trash": {
+ "one": "Siirrä {count} kokous roskakoriin",
+ "other": "Siirrä {count} kokousta roskakoriin"
+ },
+ "{count} meetings moved to Trash": {
+ "one": "{count} kokous siirretty roskakoriin",
+ "other": "{count} kokousta siirretty roskakoriin"
+ }
}
diff --git a/app/src/shared/locales/fil.json b/app/src/shared/locales/fil.json
index 4d2f5f11..481eb4ad 100644
--- a/app/src/shared/locales/fil.json
+++ b/app/src/shared/locales/fil.json
@@ -632,5 +632,20 @@
"You can restart once the recording stops.": "Puwede kang mag-restart kapag huminto na ang recording.",
"Check now": "Tingnan ngayon",
"Eject the Yogurt installer?": "I-eject ang installer ng Yogurt?",
- "Eject": "I-eject"
+ "Eject": "I-eject",
+ "{count} selected": "{count} ang napili",
+ "Click meetings to add more": "Mag-click ng mga meeting para magdagdag pa",
+ "Clear selection": "Alisin ang pagpili",
+ "Add {count} meetings to folder": {
+ "one": "Idagdag ang {count} meeting sa folder",
+ "other": "Idagdag ang {count} na meeting sa folder"
+ },
+ "Move {count} meetings to Trash": {
+ "one": "Ilipat ang {count} meeting sa Basurahan",
+ "other": "Ilipat ang {count} na meeting sa Basurahan"
+ },
+ "{count} meetings moved to Trash": {
+ "one": "Inilipat ang {count} meeting sa Basurahan",
+ "other": "Inilipat ang {count} na meeting sa Basurahan"
+ }
}
diff --git a/app/src/shared/locales/fr.json b/app/src/shared/locales/fr.json
index be3d8c23..98ff3f28 100644
--- a/app/src/shared/locales/fr.json
+++ b/app/src/shared/locales/fr.json
@@ -645,5 +645,23 @@
"You can restart once the recording stops.": "Vous pourrez redémarrer une fois l’enregistrement terminé.",
"Check now": "Rechercher",
"Eject the Yogurt installer?": "Éjecter le programme d’installation de Yogurt ?",
- "Eject": "Éjecter"
+ "Eject": "Éjecter",
+ "{count} selected": {
+ "one": "{count} sélectionnée",
+ "other": "{count} sélectionnées"
+ },
+ "Click meetings to add more": "Cliquez sur des réunions pour en ajouter",
+ "Clear selection": "Effacer la sélection",
+ "Add {count} meetings to folder": {
+ "one": "Ajouter {count} réunion à un dossier",
+ "other": "Ajouter {count} réunions à un dossier"
+ },
+ "Move {count} meetings to Trash": {
+ "one": "Déplacer {count} réunion vers la corbeille",
+ "other": "Déplacer {count} réunions vers la corbeille"
+ },
+ "{count} meetings moved to Trash": {
+ "one": "{count} réunion déplacée vers la corbeille",
+ "other": "{count} réunions déplacées vers la corbeille"
+ }
}
diff --git a/app/src/shared/locales/he.json b/app/src/shared/locales/he.json
index 88615366..9715e761 100644
--- a/app/src/shared/locales/he.json
+++ b/app/src/shared/locales/he.json
@@ -645,5 +645,20 @@
"You can restart once the recording stops.": "אפשר להפעיל מחדש אחרי שההקלטה תיפסק.",
"Check now": "בדיקה עכשיו",
"Eject the Yogurt installer?": "להוציא את תוכנית ההתקנה של Yogurt?",
- "Eject": "הוצא"
+ "Eject": "הוצא",
+ "{count} selected": "{count} נבחרו",
+ "Click meetings to add more": "לחצו על פגישות כדי להוסיף עוד",
+ "Clear selection": "ניקוי הבחירה",
+ "Add {count} meetings to folder": {
+ "one": "הוספת פגישה אחת לתיקייה",
+ "other": "הוספת {count} פגישות לתיקייה"
+ },
+ "Move {count} meetings to Trash": {
+ "one": "העברת פגישה אחת לאשפה",
+ "other": "העברת {count} פגישות לאשפה"
+ },
+ "{count} meetings moved to Trash": {
+ "one": "פגישה אחת הועברה לאשפה",
+ "other": "{count} פגישות הועברו לאשפה"
+ }
}
diff --git a/app/src/shared/locales/hi.json b/app/src/shared/locales/hi.json
index 6b5a6c69..5df71ad0 100644
--- a/app/src/shared/locales/hi.json
+++ b/app/src/shared/locales/hi.json
@@ -632,5 +632,11 @@
"You can restart once the recording stops.": "रिकॉर्डिंग रुकने के बाद आप रीस्टार्ट कर सकते हैं।",
"Check now": "अभी देखें",
"Eject the Yogurt installer?": "Yogurt इंस्टॉलर निकालें?",
- "Eject": "निकालें"
+ "Eject": "निकालें",
+ "{count} selected": "{count} चुने गए",
+ "Click meetings to add more": "और जोड़ने के लिए मीटिंग पर क्लिक करें",
+ "Clear selection": "चयन हटाएँ",
+ "Add {count} meetings to folder": "{count} मीटिंग फ़ोल्डर में जोड़ें",
+ "Move {count} meetings to Trash": "{count} मीटिंग ट्रैश में ले जाएँ",
+ "{count} meetings moved to Trash": "{count} मीटिंग ट्रैश में ले जाई गईं"
}
diff --git a/app/src/shared/locales/hu.json b/app/src/shared/locales/hu.json
index 9f51e854..55a83649 100644
--- a/app/src/shared/locales/hu.json
+++ b/app/src/shared/locales/hu.json
@@ -632,5 +632,11 @@
"You can restart once the recording stops.": "A felvétel leállása után indíthatod újra.",
"Check now": "Keresés most",
"Eject the Yogurt installer?": "Kiadja a Yogurt telepítőjét?",
- "Eject": "Kiadás"
+ "Eject": "Kiadás",
+ "{count} selected": "{count} kiválasztva",
+ "Click meetings to add more": "További megbeszélések hozzáadásához kattintson rájuk",
+ "Clear selection": "Kijelölés törlése",
+ "Add {count} meetings to folder": "{count} megbeszélés hozzáadása mappához",
+ "Move {count} meetings to Trash": "{count} megbeszélés áthelyezése a kukába",
+ "{count} meetings moved to Trash": "{count} megbeszélés a kukába helyezve"
}
diff --git a/app/src/shared/locales/id.json b/app/src/shared/locales/id.json
index 5bc77d67..5ff81088 100644
--- a/app/src/shared/locales/id.json
+++ b/app/src/shared/locales/id.json
@@ -593,5 +593,11 @@
"You can restart once the recording stops.": "Anda bisa memulai ulang setelah perekaman berhenti.",
"Check now": "Periksa sekarang",
"Eject the Yogurt installer?": "Keluarkan penginstal Yogurt?",
- "Eject": "Keluarkan"
+ "Eject": "Keluarkan",
+ "{count} selected": "{count} dipilih",
+ "Click meetings to add more": "Klik rapat untuk menambahkan lagi",
+ "Clear selection": "Hapus pilihan",
+ "Add {count} meetings to folder": "Tambahkan {count} rapat ke folder",
+ "Move {count} meetings to Trash": "Pindahkan {count} rapat ke Sampah",
+ "{count} meetings moved to Trash": "{count} rapat dipindahkan ke Sampah"
}
diff --git a/app/src/shared/locales/it.json b/app/src/shared/locales/it.json
index bcccb706..a0cb1339 100644
--- a/app/src/shared/locales/it.json
+++ b/app/src/shared/locales/it.json
@@ -648,5 +648,23 @@
"You can restart once the recording stops.": "Puoi riavviare quando la registrazione si ferma.",
"Check now": "Controlla ora",
"Eject the Yogurt installer?": "Espellere il programma di installazione di Yogurt?",
- "Eject": "Espelli"
+ "Eject": "Espelli",
+ "{count} selected": {
+ "one": "{count} selezionata",
+ "other": "{count} selezionate"
+ },
+ "Click meetings to add more": "Fai clic sulle riunioni per aggiungerne altre",
+ "Clear selection": "Annulla selezione",
+ "Add {count} meetings to folder": {
+ "one": "Aggiungi {count} riunione a una cartella",
+ "other": "Aggiungi {count} riunioni a una cartella"
+ },
+ "Move {count} meetings to Trash": {
+ "one": "Sposta {count} riunione nel Cestino",
+ "other": "Sposta {count} riunioni nel Cestino"
+ },
+ "{count} meetings moved to Trash": {
+ "one": "{count} riunione spostata nel Cestino",
+ "other": "{count} riunioni spostate nel Cestino"
+ }
}
diff --git a/app/src/shared/locales/ja.json b/app/src/shared/locales/ja.json
index a29a66c3..55f7bc5c 100644
--- a/app/src/shared/locales/ja.json
+++ b/app/src/shared/locales/ja.json
@@ -593,5 +593,11 @@
"You can restart once the recording stops.": "録音が止まったら再起動できます。",
"Check now": "今すぐ確認",
"Eject the Yogurt installer?": "Yogurt インストーラを取り出しますか?",
- "Eject": "取り出す"
+ "Eject": "取り出す",
+ "{count} selected": "{count}件選択中",
+ "Click meetings to add more": "ミーティングをクリックして追加",
+ "Clear selection": "選択を解除",
+ "Add {count} meetings to folder": "{count}件のミーティングをフォルダに追加",
+ "Move {count} meetings to Trash": "{count}件のミーティングをゴミ箱に移動",
+ "{count} meetings moved to Trash": "{count}件のミーティングをゴミ箱に移動しました"
}
diff --git a/app/src/shared/locales/ko.json b/app/src/shared/locales/ko.json
index a2dc4f55..6f97b257 100644
--- a/app/src/shared/locales/ko.json
+++ b/app/src/shared/locales/ko.json
@@ -593,5 +593,11 @@
"You can restart once the recording stops.": "녹음이 끝나면 다시 시작할 수 있습니다.",
"Check now": "지금 확인",
"Eject the Yogurt installer?": "Yogurt 설치 프로그램을 추출할까요?",
- "Eject": "추출"
+ "Eject": "추출",
+ "{count} selected": "{count}개 선택됨",
+ "Click meetings to add more": "회의를 클릭하여 더 추가하세요",
+ "Clear selection": "선택 해제",
+ "Add {count} meetings to folder": "회의 {count}개를 폴더에 추가",
+ "Move {count} meetings to Trash": "회의 {count}개를 휴지통으로 이동",
+ "{count} meetings moved to Trash": "회의 {count}개를 휴지통으로 이동했습니다"
}
diff --git a/app/src/shared/locales/ms.json b/app/src/shared/locales/ms.json
index d02a7fc6..d181a576 100644
--- a/app/src/shared/locales/ms.json
+++ b/app/src/shared/locales/ms.json
@@ -593,5 +593,11 @@
"You can restart once the recording stops.": "Anda boleh mula semula selepas rakaman berhenti.",
"Check now": "Semak sekarang",
"Eject the Yogurt installer?": "Keluarkan pemasang Yogurt?",
- "Eject": "Keluarkan"
+ "Eject": "Keluarkan",
+ "{count} selected": "{count} dipilih",
+ "Click meetings to add more": "Klik mesyuarat untuk menambah lagi",
+ "Clear selection": "Kosongkan pilihan",
+ "Add {count} meetings to folder": "Tambah {count} mesyuarat ke folder",
+ "Move {count} meetings to Trash": "Alih {count} mesyuarat ke Sampah",
+ "{count} meetings moved to Trash": "{count} mesyuarat dialihkan ke Sampah"
}
diff --git a/app/src/shared/locales/nb.json b/app/src/shared/locales/nb.json
index f0201e83..7fce6019 100644
--- a/app/src/shared/locales/nb.json
+++ b/app/src/shared/locales/nb.json
@@ -632,5 +632,20 @@
"You can restart once the recording stops.": "Du kan starte på nytt når opptaket stopper.",
"Check now": "Se etter nå",
"Eject the Yogurt installer?": "Løse ut Yogurt-installasjonsprogrammet?",
- "Eject": "Løs ut"
+ "Eject": "Løs ut",
+ "{count} selected": "{count} valgt",
+ "Click meetings to add more": "Klikk på møter for å legge til flere",
+ "Clear selection": "Fjern markering",
+ "Add {count} meetings to folder": {
+ "one": "Legg {count} møte til i mappe",
+ "other": "Legg {count} møter til i mappe"
+ },
+ "Move {count} meetings to Trash": {
+ "one": "Flytt {count} møte til papirkurven",
+ "other": "Flytt {count} møter til papirkurven"
+ },
+ "{count} meetings moved to Trash": {
+ "one": "{count} møte flyttet til papirkurven",
+ "other": "{count} møter flyttet til papirkurven"
+ }
}
diff --git a/app/src/shared/locales/nl.json b/app/src/shared/locales/nl.json
index e7fcac37..94e99a9e 100644
--- a/app/src/shared/locales/nl.json
+++ b/app/src/shared/locales/nl.json
@@ -632,5 +632,20 @@
"You can restart once the recording stops.": "Je kunt opnieuw starten zodra de opname stopt.",
"Check now": "Nu zoeken",
"Eject the Yogurt installer?": "Yogurt-installatieprogramma verwijderen?",
- "Eject": "Verwijder"
+ "Eject": "Verwijder",
+ "{count} selected": "{count} geselecteerd",
+ "Click meetings to add more": "Klik op meetings om meer toe te voegen",
+ "Clear selection": "Selectie wissen",
+ "Add {count} meetings to folder": {
+ "one": "{count} meeting aan map toevoegen",
+ "other": "{count} meetings aan map toevoegen"
+ },
+ "Move {count} meetings to Trash": {
+ "one": "{count} meeting naar prullenmand verplaatsen",
+ "other": "{count} meetings naar prullenmand verplaatsen"
+ },
+ "{count} meetings moved to Trash": {
+ "one": "{count} meeting naar prullenmand verplaatst",
+ "other": "{count} meetings naar prullenmand verplaatst"
+ }
}
diff --git a/app/src/shared/locales/pl.json b/app/src/shared/locales/pl.json
index 39a6b516..4c99dd2d 100644
--- a/app/src/shared/locales/pl.json
+++ b/app/src/shared/locales/pl.json
@@ -658,5 +658,29 @@
"You can restart once the recording stops.": "Możesz uruchomić ponownie po zatrzymaniu nagrywania.",
"Check now": "Sprawdź teraz",
"Eject the Yogurt installer?": "Wysunąć instalator Yogurt?",
- "Eject": "Wysuń"
+ "Eject": "Wysuń",
+ "{count} selected": {
+ "one": "Wybrano {count}",
+ "other": "Wybrano {count}"
+ },
+ "Click meetings to add more": "Kliknij spotkania, aby dodać kolejne",
+ "Clear selection": "Wyczyść zaznaczenie",
+ "Add {count} meetings to folder": {
+ "one": "Dodaj {count} spotkanie do folderu",
+ "few": "Dodaj {count} spotkania do folderu",
+ "many": "Dodaj {count} spotkań do folderu",
+ "other": "Dodaj {count} spotkania do folderu"
+ },
+ "Move {count} meetings to Trash": {
+ "one": "Przenieś {count} spotkanie do kosza",
+ "few": "Przenieś {count} spotkania do kosza",
+ "many": "Przenieś {count} spotkań do kosza",
+ "other": "Przenieś {count} spotkania do kosza"
+ },
+ "{count} meetings moved to Trash": {
+ "one": "Przeniesiono {count} spotkanie do kosza",
+ "few": "Przeniesiono {count} spotkania do kosza",
+ "many": "Przeniesiono {count} spotkań do kosza",
+ "other": "Przeniesiono {count} spotkania do kosza"
+ }
}
diff --git a/app/src/shared/locales/pt-BR.json b/app/src/shared/locales/pt-BR.json
index 0b5f9270..e355ae8d 100644
--- a/app/src/shared/locales/pt-BR.json
+++ b/app/src/shared/locales/pt-BR.json
@@ -645,5 +645,23 @@
"You can restart once the recording stops.": "Você pode reiniciar quando a gravação parar.",
"Check now": "Verificar agora",
"Eject the Yogurt installer?": "Ejetar o instalador do Yogurt?",
- "Eject": "Ejetar"
+ "Eject": "Ejetar",
+ "{count} selected": {
+ "one": "{count} selecionada",
+ "other": "{count} selecionadas"
+ },
+ "Click meetings to add more": "Clique nas reuniões para adicionar mais",
+ "Clear selection": "Limpar seleção",
+ "Add {count} meetings to folder": {
+ "one": "Adicionar {count} reunião a uma pasta",
+ "other": "Adicionar {count} reuniões a uma pasta"
+ },
+ "Move {count} meetings to Trash": {
+ "one": "Mover {count} reunião para a Lixeira",
+ "other": "Mover {count} reuniões para a Lixeira"
+ },
+ "{count} meetings moved to Trash": {
+ "one": "{count} reunião movida para a Lixeira",
+ "other": "{count} reuniões movidas para a Lixeira"
+ }
}
diff --git a/app/src/shared/locales/ro.json b/app/src/shared/locales/ro.json
index cf21c562..5af1e37c 100644
--- a/app/src/shared/locales/ro.json
+++ b/app/src/shared/locales/ro.json
@@ -645,5 +645,26 @@
"You can restart once the recording stops.": "Poți reporni după ce se oprește înregistrarea.",
"Check now": "Verifică acum",
"Eject the Yogurt installer?": "Scoți programul de instalare Yogurt?",
- "Eject": "Scoate"
+ "Eject": "Scoate",
+ "{count} selected": {
+ "one": "{count} selectată",
+ "other": "{count} selectate"
+ },
+ "Click meetings to add more": "Faceți clic pe întâlniri pentru a adăuga altele",
+ "Clear selection": "Ștergeți selecția",
+ "Add {count} meetings to folder": {
+ "one": "Adăugați {count} întâlnire într-un dosar",
+ "few": "Adăugați {count} întâlniri într-un dosar",
+ "other": "Adăugați {count} de întâlniri într-un dosar"
+ },
+ "Move {count} meetings to Trash": {
+ "one": "Mutați {count} întâlnire în Coș",
+ "few": "Mutați {count} întâlniri în Coș",
+ "other": "Mutați {count} de întâlniri în Coș"
+ },
+ "{count} meetings moved to Trash": {
+ "one": "{count} întâlnire mutată în Coș",
+ "few": "{count} întâlniri mutate în Coș",
+ "other": "{count} de întâlniri mutate în Coș"
+ }
}
diff --git a/app/src/shared/locales/ru.json b/app/src/shared/locales/ru.json
index 040cecc2..a3fed55d 100644
--- a/app/src/shared/locales/ru.json
+++ b/app/src/shared/locales/ru.json
@@ -658,5 +658,26 @@
"You can restart once the recording stops.": "Перезапустить можно после остановки записи.",
"Check now": "Проверить",
"Eject the Yogurt installer?": "Извлечь установщик Yogurt?",
- "Eject": "Извлечь"
+ "Eject": "Извлечь",
+ "{count} selected": "Выбрано: {count}",
+ "Click meetings to add more": "Нажимайте на встречи, чтобы добавить ещё",
+ "Clear selection": "Снять выделение",
+ "Add {count} meetings to folder": {
+ "one": "Добавить {count} встречу в папку",
+ "few": "Добавить {count} встречи в папку",
+ "many": "Добавить {count} встреч в папку",
+ "other": "Добавить {count} встречи в папку"
+ },
+ "Move {count} meetings to Trash": {
+ "one": "Переместить {count} встречу в Корзину",
+ "few": "Переместить {count} встречи в Корзину",
+ "many": "Переместить {count} встреч в Корзину",
+ "other": "Переместить {count} встречи в Корзину"
+ },
+ "{count} meetings moved to Trash": {
+ "one": "{count} встреча перемещена в Корзину",
+ "few": "{count} встречи перемещены в Корзину",
+ "many": "{count} встреч перемещено в Корзину",
+ "other": "{count} встречи перемещены в Корзину"
+ }
}
diff --git a/app/src/shared/locales/sv.json b/app/src/shared/locales/sv.json
index f97aa5d3..ea14b5ab 100644
--- a/app/src/shared/locales/sv.json
+++ b/app/src/shared/locales/sv.json
@@ -632,5 +632,23 @@
"You can restart once the recording stops.": "Du kan starta om när inspelningen har stoppat.",
"Check now": "Sök nu",
"Eject the Yogurt installer?": "Mata ut installationsprogrammet för Yogurt?",
- "Eject": "Mata ut"
+ "Eject": "Mata ut",
+ "{count} selected": {
+ "one": "{count} valt",
+ "other": "{count} valda"
+ },
+ "Click meetings to add more": "Klicka på möten för att lägga till fler",
+ "Clear selection": "Rensa markering",
+ "Add {count} meetings to folder": {
+ "one": "Lägg till {count} möte i mapp",
+ "other": "Lägg till {count} möten i mapp"
+ },
+ "Move {count} meetings to Trash": {
+ "one": "Flytta {count} möte till papperskorgen",
+ "other": "Flytta {count} möten till papperskorgen"
+ },
+ "{count} meetings moved to Trash": {
+ "one": "{count} möte flyttat till papperskorgen",
+ "other": "{count} möten flyttade till papperskorgen"
+ }
}
diff --git a/app/src/shared/locales/th.json b/app/src/shared/locales/th.json
index 197c79b4..dfe47d69 100644
--- a/app/src/shared/locales/th.json
+++ b/app/src/shared/locales/th.json
@@ -593,5 +593,11 @@
"You can restart once the recording stops.": "คุณรีสตาร์ทได้เมื่อการบันทึกหยุดแล้ว",
"Check now": "ตรวจสอบเลย",
"Eject the Yogurt installer?": "นำตัวติดตั้ง Yogurt ออกไหม",
- "Eject": "นำออก"
+ "Eject": "นำออก",
+ "{count} selected": "เลือกแล้ว {count} รายการ",
+ "Click meetings to add more": "คลิกการประชุมเพื่อเพิ่มอีก",
+ "Clear selection": "ล้างการเลือก",
+ "Add {count} meetings to folder": "เพิ่มการประชุม {count} รายการไปยังโฟลเดอร์",
+ "Move {count} meetings to Trash": "ย้ายการประชุม {count} รายการไปถังขยะ",
+ "{count} meetings moved to Trash": "ย้ายการประชุม {count} รายการไปถังขยะแล้ว"
}
diff --git a/app/src/shared/locales/tr.json b/app/src/shared/locales/tr.json
index 76f95969..27ee0a73 100644
--- a/app/src/shared/locales/tr.json
+++ b/app/src/shared/locales/tr.json
@@ -632,5 +632,11 @@
"You can restart once the recording stops.": "Kayıt durduğunda yeniden başlatabilirsiniz.",
"Check now": "Şimdi denetle",
"Eject the Yogurt installer?": "Yogurt yükleyicisi çıkarılsın mı?",
- "Eject": "Çıkar"
+ "Eject": "Çıkar",
+ "{count} selected": "{count} seçildi",
+ "Click meetings to add more": "Daha fazla eklemek için toplantılara tıklayın",
+ "Clear selection": "Seçimi temizle",
+ "Add {count} meetings to folder": "{count} toplantıyı klasöre ekle",
+ "Move {count} meetings to Trash": "{count} toplantıyı Çöp Kutusuna taşı",
+ "{count} meetings moved to Trash": "{count} toplantı Çöp Kutusuna taşındı"
}
diff --git a/app/src/shared/locales/uk.json b/app/src/shared/locales/uk.json
index fd812755..ee18ecbe 100644
--- a/app/src/shared/locales/uk.json
+++ b/app/src/shared/locales/uk.json
@@ -658,5 +658,26 @@
"You can restart once the recording stops.": "Перезапустити можна після зупинки запису.",
"Check now": "Перевірити",
"Eject the Yogurt installer?": "Витягти інсталятор Yogurt?",
- "Eject": "Витягти"
+ "Eject": "Витягти",
+ "{count} selected": "Вибрано: {count}",
+ "Click meetings to add more": "Натискайте на зустрічі, щоб додати ще",
+ "Clear selection": "Скасувати вибір",
+ "Add {count} meetings to folder": {
+ "one": "Додати {count} зустріч до папки",
+ "few": "Додати {count} зустрічі до папки",
+ "many": "Додати {count} зустрічей до папки",
+ "other": "Додати {count} зустрічі до папки"
+ },
+ "Move {count} meetings to Trash": {
+ "one": "Перемістити {count} зустріч до Кошика",
+ "few": "Перемістити {count} зустрічі до Кошика",
+ "many": "Перемістити {count} зустрічей до Кошика",
+ "other": "Перемістити {count} зустрічі до Кошика"
+ },
+ "{count} meetings moved to Trash": {
+ "one": "{count} зустріч переміщено до Кошика",
+ "few": "{count} зустрічі переміщено до Кошика",
+ "many": "{count} зустрічей переміщено до Кошика",
+ "other": "{count} зустрічі переміщено до Кошика"
+ }
}
diff --git a/app/src/shared/locales/vi.json b/app/src/shared/locales/vi.json
index e643d446..1a27942d 100644
--- a/app/src/shared/locales/vi.json
+++ b/app/src/shared/locales/vi.json
@@ -593,5 +593,11 @@
"You can restart once the recording stops.": "Bạn có thể khởi động lại khi bản ghi dừng.",
"Check now": "Kiểm tra ngay",
"Eject the Yogurt installer?": "Đẩy trình cài đặt Yogurt ra?",
- "Eject": "Đẩy ra"
+ "Eject": "Đẩy ra",
+ "{count} selected": "Đã chọn {count}",
+ "Click meetings to add more": "Nhấp vào cuộc họp để thêm",
+ "Clear selection": "Bỏ chọn tất cả",
+ "Add {count} meetings to folder": "Thêm {count} cuộc họp vào thư mục",
+ "Move {count} meetings to Trash": "Chuyển {count} cuộc họp vào Thùng rác",
+ "{count} meetings moved to Trash": "Đã chuyển {count} cuộc họp vào Thùng rác"
}
diff --git a/app/src/shared/locales/zh-CN.json b/app/src/shared/locales/zh-CN.json
index 6e7ed5da..6046292e 100644
--- a/app/src/shared/locales/zh-CN.json
+++ b/app/src/shared/locales/zh-CN.json
@@ -593,5 +593,11 @@
"You can restart once the recording stops.": "录音停止后即可重新启动。",
"Check now": "立即检查",
"Eject the Yogurt installer?": "要推出 Yogurt 安装器吗?",
- "Eject": "推出"
+ "Eject": "推出",
+ "{count} selected": "已选择 {count} 个",
+ "Click meetings to add more": "点击会议以添加更多",
+ "Clear selection": "清除选择",
+ "Add {count} meetings to folder": "将 {count} 个会议添加到文件夹",
+ "Move {count} meetings to Trash": "将 {count} 个会议移到废纸篓",
+ "{count} meetings moved to Trash": "已将 {count} 个会议移到废纸篓"
}
diff --git a/app/src/shared/locales/zh-TW.json b/app/src/shared/locales/zh-TW.json
index 64527152..2658ae1d 100644
--- a/app/src/shared/locales/zh-TW.json
+++ b/app/src/shared/locales/zh-TW.json
@@ -593,5 +593,11 @@
"You can restart once the recording stops.": "錄音停止後即可重新啟動。",
"Check now": "立即檢查",
"Eject the Yogurt installer?": "要退出 Yogurt 安裝程式嗎?",
- "Eject": "退出"
+ "Eject": "退出",
+ "{count} selected": "已選取 {count} 場",
+ "Click meetings to add more": "點擊會議以加入更多",
+ "Clear selection": "清除選取",
+ "Add {count} meetings to folder": "將 {count} 場會議加入資料夾",
+ "Move {count} meetings to Trash": "將 {count} 場會議移到垃圾桶",
+ "{count} meetings moved to Trash": "已將 {count} 場會議移到垃圾桶"
}
diff --git a/app/test/folderSelection.test.ts b/app/test/folderSelection.test.ts
new file mode 100644
index 00000000..eb8cc2f5
--- /dev/null
+++ b/app/test/folderSelection.test.ts
@@ -0,0 +1,83 @@
+import { afterEach, expect, it, vi } from 'vitest'
+import { addMeetingsToFolder, setMeetingsInFolder } from '../src/renderer/src/folders'
+import { folderCheck, nextFolderCheck, reconcileFolderChecks } from '../src/renderer/src/folderSelection'
+
+afterEach(() => vi.unstubAllGlobals())
+
+it('shows all, some and none from the selected meetings, ignoring other rows', () => {
+ const memberships = { a: ['all', 'some'], b: ['all'], outside: ['none'] }
+ expect(folderCheck(['a', 'b'], memberships, 'all')).toBe(true)
+ expect(folderCheck(['a', 'b'], memberships, 'some')).toBe('mixed')
+ expect(folderCheck(['a', 'b'], memberships, 'none')).toBe(false)
+ expect(folderCheck(['a'], memberships, 'some')).toBe(true)
+ expect(folderCheck(['b'], memberships, 'some')).toBe(false)
+ expect(folderCheck([], memberships, 'all')).toBe(false)
+})
+
+it('adds on empty or mixed and removes on checked, including a single selected meeting', () => {
+ expect(nextFolderCheck(false)).toBe(true)
+ expect(nextFolderCheck('mixed')).toBe(true)
+ expect(nextFolderCheck(true)).toBe(false)
+ expect(nextFolderCheck(folderCheck(['a'], { a: ['folder'] }, 'folder'))).toBe(false)
+})
+
+it('keeps optimism through partial and unrelated refreshes until the saved data agrees', () => {
+ const source = { a: [], b: [] }
+ const pending = { folder: { checked: true, saving: false, source } }
+ expect(reconcileFolderChecks(pending, ['a', 'b'], { a: ['other'], b: [] })).toBe(pending)
+ expect(reconcileFolderChecks(pending, ['a', 'b'], { a: ['folder'], b: [] })).toBe(pending)
+ expect(reconcileFolderChecks(pending, ['a', 'b'], { a: ['folder'], b: ['folder'] })).toEqual({})
+})
+
+it('does not clear a second toggle against the unchanged snapshot from before the first write', () => {
+ const source = { a: [] }
+ const pending = { folder: { checked: false, saving: false, source } }
+ expect(reconcileFolderChecks(pending, ['a'], source)).toBe(pending)
+ expect(reconcileFolderChecks(pending, ['a'], { a: ['folder'] })).toBe(pending)
+ expect(reconcileFolderChecks(pending, ['a'], { a: [] })).toEqual({})
+})
+
+it('waits for the write to finish even if a refresh already agrees, and preserves other pending toggles', () => {
+ const source = { a: [] }
+ const pending = { folder: { checked: true, saving: true, source }, other: { checked: true, saving: false, source } }
+ const real = { a: ['folder'] }
+ expect(reconcileFolderChecks(pending, ['a'], real)).toBe(pending)
+ expect(reconcileFolderChecks({ ...pending, folder: { ...pending.folder, saving: false } }, ['a'], real)).toEqual({ other: pending.other })
+})
+
+it('adds every selected meeting once while preserving other folder memberships', async () => {
+ const memberships = new Map([['a', new Set(['existing'])], ['b', new Set<string>()]])
+ const add = vi.fn(async (folder: string, id: string) => { memberships.get(id)!.add(folder) })
+ vi.stubGlobal('window', { yogurt: { folders: { add, of: async (id: string) => [...memberships.get(id)!].map(id => ({ id })) } } })
+ await addMeetingsToFolder('new', ['a', 'b', 'a'])
+ expect(add.mock.calls).toEqual([['new', 'a'], ['new', 'b']])
+ expect([...memberships.get('a')!]).toEqual(['existing', 'new'])
+ expect([...memberships.get('b')!]).toEqual(['new'])
+})
+
+it('waits for every write and reports rejection or a missing folder', async () => {
+ const add = vi.fn(async (_folder: string, id: string) => { if (id === 'a') throw new Error('Unavailable') })
+ const of = vi.fn(async () => [])
+ vi.stubGlobal('window', { yogurt: { folders: { add, of } } })
+ await expect(addMeetingsToFolder('gone', ['a', 'b'])).rejects.toThrow('Folder not added')
+ expect(add).toHaveBeenCalledTimes(2)
+ expect(of).toHaveBeenCalledWith('b')
+ await expect(addMeetingsToFolder('gone', ['b'])).rejects.toThrow('Folder not added')
+})
+
+it('removes every selected meeting once without touching its other folders', async () => {
+ const memberships = new Map([['a', new Set(['target', 'other'])], ['b', new Set(['target'])]])
+ const remove = vi.fn(async (folder: string, id: string) => { memberships.get(id)!.delete(folder) })
+ vi.stubGlobal('window', { yogurt: { folders: { remove, of: async (id: string) => [...memberships.get(id)!].map(id => ({ id })) } } })
+ await setMeetingsInFolder('target', ['a', 'b', 'a'], false)
+ expect(remove.mock.calls).toEqual([['target', 'a'], ['target', 'b']])
+ expect([...memberships.get('a')!]).toEqual(['other'])
+ expect([...memberships.get('b')!]).toEqual([])
+})
+
+it('reports failed removals after trying the entire selection', async () => {
+ const remove = vi.fn(async (_folder: string, id: string) => { if (id === 'a') throw new Error('Unavailable') })
+ vi.stubGlobal('window', { yogurt: { folders: { remove, of: async () => [{ id: 'target' }] } } })
+ await expect(setMeetingsInFolder('target', ['a', 'b'], false)).rejects.toThrow('Folder not removed')
+ expect(remove).toHaveBeenCalledTimes(2)
+})
diff --git a/app/test/meetingSelection.test.ts b/app/test/meetingSelection.test.ts
new file mode 100644
index 00000000..238616cb
--- /dev/null
+++ b/app/test/meetingSelection.test.ts
@@ -0,0 +1,64 @@
+import { describe, expect, it } from 'vitest'
+import { draggedMeetings, emptySelection, meetingSelection, meetingTargets, selectsMeeting } from '../src/renderer/src/meetingSelection'
+import { commandKey } from '../src/shared/platform'
+
+const visible = ['a', 'b', 'c', 'd']
+const first = meetingSelection(emptySelection, { type: 'select', id: 'b', visible })
+
+describe('meeting selection', () => {
+ it('selects from the menu without toggling an existing selection off', () => {
+ expect(first).toEqual({ ids: ['b'], anchor: 'b' })
+ expect(meetingSelection(first, { type: 'select', id: 'b', visible })).toEqual(first)
+ })
+
+ it('toggles and ends the mode when the last meeting is removed', () => {
+ const two = meetingSelection(first, { type: 'toggle', id: 'c', visible })
+ expect(two.ids).toEqual(['b', 'c'])
+ expect(meetingSelection(two, { type: 'toggle', id: 'c', visible }).ids).toEqual(['b'])
+ expect(meetingSelection(first, { type: 'toggle', id: 'b', visible })).toEqual(emptySelection)
+ })
+
+ it('adds inclusive ranges in either direction and preserves the anchor', () => {
+ const down = meetingSelection(first, { type: 'range', id: 'd', visible })
+ expect(down).toEqual({ ids: ['b', 'c', 'd'], anchor: 'b' })
+ expect(meetingSelection(down, { type: 'range', id: 'a', visible })).toEqual({ ids: ['b', 'c', 'd', 'a'], anchor: 'b' })
+ expect(meetingSelection(emptySelection, { type: 'range', id: 'c', visible }).ids).toEqual(['c'])
+ })
+
+ it('selects only the current list and clears without retaining a range anchor', () => {
+ const all = meetingSelection(first, { type: 'all', visible: ['c', 'd'] })
+ expect(all).toEqual({ ids: ['c', 'd'], anchor: 'c' })
+ expect(meetingSelection(all, { type: 'clear' })).toEqual(emptySelection)
+ expect(meetingSelection(all, { type: 'all', visible: [] })).toEqual(emptySelection)
+ })
+
+ it('drops unavailable rows and removes only successful deletes', () => {
+ const all = meetingSelection(first, { type: 'all', visible })
+ expect(meetingSelection(all, { type: 'remove', ids: ['a', 'c'] })).toEqual({ ids: ['b', 'd'], anchor: null })
+ expect(meetingSelection(all, { type: 'prune', visible: ['a', 'b'] })).toEqual({ ids: ['a', 'b'], anchor: 'a' })
+ expect(meetingSelection(first, { type: 'toggle', id: 'outside', visible })).toBe(first)
+ })
+
+ it('a plain click opens a meeting at rest and toggles it in selection mode', () => {
+ expect(selectsMeeting(0, false, false)).toBe(false)
+ expect(selectsMeeting(1, false, false)).toBe(true)
+ expect(selectsMeeting(0, true, false)).toBe(true)
+ expect(selectsMeeting(0, false, true)).toBe(true)
+ const state = selectsMeeting(first.ids.length, false, false)
+ ? meetingSelection(first, { type: 'toggle', id: 'c', visible }) : first
+ expect(state.ids).toEqual(['b', 'c'])
+ expect(commandKey({ metaKey: true, ctrlKey: false }, 'darwin')).toBe(true)
+ for (const os of ['win32', 'linux']) expect(commandKey({ metaKey: false, ctrlKey: true }, os)).toBe(true)
+ })
+
+ it('menus and drags target the selection only when their row is selected', () => {
+ expect(meetingTargets(['a', 'b'], 'a')).toEqual(['a', 'b'])
+ expect(meetingTargets(['a', 'b'], 'c')).toEqual(['c'])
+ })
+
+ it('reads single and multi-meeting drags and rejects malformed selections', () => {
+ expect(draggedMeetings('a')).toEqual(['a'])
+ expect(draggedMeetings('["a","b","a"]')).toEqual(['a', 'b'])
+ for (const payload of ['', '[]', '[', '["a",null]', '[""]']) expect(draggedMeetings(payload)).toEqual([])
+ })
+})
diff --git a/app/test/trashMeetings.test.ts b/app/test/trashMeetings.test.ts
new file mode 100644
index 00000000..c3e37800
--- /dev/null
+++ b/app/test/trashMeetings.test.ts
@@ -0,0 +1,34 @@
+import { expect, it, vi } from 'vitest'
+import { restoreMeetings, trashMeetings } from '../src/renderer/src/trashMeetings'
+
+it('trashes each selected meeting once and returns one set for Undo', async () => {
+ const trash = vi.fn(async () => 'trashed' as const)
+ expect(await trashMeetings(['a', 'b', 'a'], trash)).toEqual({ trashed: ['a', 'b'], done: ['a', 'b'], error: undefined })
+ expect(trash.mock.calls).toHaveLength(2)
+})
+
+it('continues after failures, leaving failed meetings selected and out of Undo', async () => {
+ const trash = vi.fn(async (id: string) => {
+ if (id === 'throws') throw new Error('Unavailable')
+ const results: Record<string, 'trashed' | 'save-pending' | 'recording' | 'missing' | 'failed'> = { a: 'trashed', b: 'save-pending', c: 'recording', d: 'missing', e: 'failed', f: 'trashed' }
+ return results[id]
+ })
+ expect(await trashMeetings(['a', 'b', 'c', 'd', 'e', 'throws', 'f'], trash)).toEqual({
+ trashed: ['a', 'f'], done: ['a', 'd', 'f'], error: 'save-pending',
+ })
+ expect(trash).toHaveBeenCalledTimes(7)
+})
+
+it('reports a rejected trash call without rejecting the whole operation', async () => {
+ expect(await trashMeetings(['a'], async () => { throw new Error('Unavailable') })).toEqual({ trashed: [], done: [], error: 'failed' })
+})
+
+it('Undo tries every meeting and retries only the ones that failed', async () => {
+ const restore = vi.fn(async (id: string) => { if (id === 'b') throw new Error('Unavailable') })
+ const retry = await restoreMeetings(['a', 'b', 'c'], restore)
+ expect(retry).toEqual(['b'])
+ expect(restore.mock.calls).toEqual([['a'], ['b'], ['c']])
+ restore.mockReset().mockResolvedValue(undefined)
+ expect(await restoreMeetings(retry, restore)).toEqual([])
+ expect(restore.mock.calls).toEqual([['b']])
+})