This commit introduces a new user setting allowing you to define the maximum number of lines displayed in the preview for text or code clipboard history items. Key changes: - Added a "History Item Preview Line Limit" setting in `ClipboardHistorySettings.tsx` (defaulting to 5 lines), stored in `settingsStore.ts`. - The `historyPreviewLineLimit` setting is now passed as a prop to `ClipboardHistoryRow.tsx` and `ClipboardHistoryQuickPasteRow.tsx` from their parent pages (`ClipboardHistoryPage.tsx` and `ClipboardHistoryQuickPastePage.tsx` respectively). - Modified `ClipboardHistoryRow.tsx` and `ClipboardHistoryQuickPasteRow.tsx` to truncate the displayed text or code preview based on the `historyPreviewLineLimit` prop when the item is not expanded. - The "Show all / Show less" indicators (+X lines / +Y chars) have been updated to accurately reflect the truncation based on the new line limit. - Added comprehensive unit tests for both `ClipboardHistoryRow.tsx` and `ClipboardHistoryQuickPasteRow.tsx` using Vitest and React Testing Library to ensure the new functionality works as expected across various scenarios (different limits, content lengths, text vs. code, expanded state).
PasteBar - Limitless, Free Clipboard Manager for Mac and Windows.
Effortless Management Of Everything You Copy and Paste. Free and open-source.
Key features are:
- Unlimited clipboard history
- Searchable copy history
- Custom saved clips
- Quick-access paste menus
- Collections, tabs, and boards for organization
- Local storage for privacy and security
- Lock screen and passcode protection
- Support for text, images, files, links, and code snippets
- Automatic programming language detection and syntax highlighting
- Markdown support in notes
- Instant pasting from system menu
- Dark theme
- Global search functionality
- Customizable clips and menus
- Support for forms and templates
- Web scraping and API data extraction capabilities
- Available for macOS and Windows (including Apple Silicon M1, Intel, AMD, and ARM processors)
Stack
- Rust: Tauri Apps, Diesel ORM, Reqwest, Anyhow, Serde, Tokio.
- Javascript: Typescript, React, React Query, Vite, TailwindCSS, Signals, Jotai, Zustand.
Build Local PasteBar App
$ npm install
$ npm run build
Development Start
After cloning run:
$ cargo install diesel_cli --no-default-features --features sqlite
$ npm install
$ npm start
Description
PasteBar - Limitless, Free Clipboard Manager for Mac and Windows
clipboardclipboard-copyclipboard-historyclipboard-managerclipscopy-pastemacmenubarmenubar-appreactrusttailwindtaskbartaskbar-applicationtauriwindows
Readme
224 MiB
Languages
TypeScript
52.1%
Rust
44.5%
JavaScript
2%
CSS
1.1%
HTML
0.2%