mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-17 13:01:24 +00:00
* feat: support custom keywords and colors in global keyword highlighting (#590) Add ability to create custom keyword highlight rules in global settings (Settings > Terminal > Keyword Highlighting): - Per-rule enable/disable toggle for both built-in and custom rules - Add custom rules with label, regex pattern, and color picker - Delete custom rules (built-in rules cannot be deleted) - Pattern validation with error feedback - Custom rules sync across devices via cloud sync - i18n support (en, zh-CN) Built-in categories (Error, Warning, OK, Info, Debug, URL/IP/MAC) are preserved and cannot be deleted, only toggled and recolored. Closes #590 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * refactor: use dialog modal for adding custom keyword highlight rules Replace inline form with a proper modal dialog: - Button opens dialog instead of showing inline inputs - Dialog has label+color, regex pattern, and live preview - Reset and Add buttons side by side in footer area - Add common.add i18n key (en, zh-CN) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ui: unify button styles in keyword highlight section Both buttons now use ghost variant with equal flex-1 width for a cleaner, balanced layout. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ui: fix keyword highlight rule list alignment - Add placeholder spacer (w-5) for built-in rules to match delete button width on custom rules, keeping color pickers aligned - Move regex pattern to second line for custom rules - Use block+truncate for label and pattern text Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ui: hide regex, show edit/delete icons after label for custom rules - Remove regex pattern display from rule list - Add pencil (edit) and trash (delete) icons after custom rule label, visible on hover - Edit opens the same dialog pre-filled with rule data - Dialog supports both add and edit modes with appropriate titles/buttons Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ui: remove toggle dots, simplify edit/delete to plain icons - Remove the red enable/disable dot button from all rules - Replace Button wrappers with plain Lucide icons for edit/delete (no hover background, just cursor pointer) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: preserve multi-pattern rules on edit, keep disabled state on reset - Editing a custom rule now preserves patterns beyond the first one - Reset to default colors no longer force-enables disabled rules Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: replace all patterns on edit instead of preserving hidden ones When editing a custom rule, save only the single user-visible pattern rather than silently keeping extra patterns the user cannot see. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: preserve regex whitespace and multi-pattern rules on edit - Stop trimming regex patterns on save (only trim for empty check) - If pattern field unchanged during edit, preserve all original patterns so changing just label/color doesn't drop extra regexes Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: preserve additional patterns when editing custom rule When editing, replace only the first pattern (the one shown in the dialog) and keep any additional patterns intact to prevent data loss for multi-pattern rules from sync or import. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>