feat: clickable URLs, left-rail settings nav, proportional resizable dialog
URLs in terminal output (http/https/ftp with ports, www. hosts, bare localhost:port dev-server forms) are detected via a link provider: hover underlines and shows the pointer, Ctrl/Cmd+Click opens the system browser. Wrapped URLs spanning buffer rows resolve as one link. The 网址链接 highlight preset grows to cover ftp:// and www. forms. The settings dialog moves to a left navigation rail with the content column scrolling on its own, sizes itself at ~70% of the main window and follows main-window resizes in real time (until the user drags the corner grip), stays centred while resizing, and keeps a stable height.
This commit is contained in:
1 parent
3b2fe06f71
commit
237265e6ba
5 files changed
+246
-5
No files matched your search
@@ -97,7 +97,7 @@ export const DEFAULT_HIGHLIGHT_RULES: HighlightRule[] = [
|
||||
RULE('ipv4', '\\b(?:\\d{1,3}\\.){3}\\d{1,3}(?::\\d{1,5})?\\b', 15, '#58a6ff', '网络与 IP 地址'),
|
||||
RULE('datetime', '\\b\\d{4}[-/]\\d{1,2}[-/]\\d{1,2}(?:[ T]\\d{1,2}:\\d{2}(?::\\d{2})?)?\\b|\\b\\d{1,2}:\\d{2}(?::\\d{2})?\\b', 20, '#bc8cff', '时间与日期'),
|
||||
RULE('numbers', '\\b\\d+(?:\\.\\d+)?(?:%)?\\b', 25, '#f2cc60', '数字与计数'),
|
||||
RULE('url', 'https?://[^\\s]+', 30, '#58a6ff', '网址链接')
|
||||
RULE('url', 'https?://[^\\s]+|ftp://[^\\s]+|www\\.[A-Za-z0-9-]+\\.[A-Za-z]{2,}(?::\\d+)?(?:/[^\\s]*)?', 30, '#58a6ff', '网址链接')
|
||||
]
|
||||
|
||||
export const DEFAULT_SETTINGS: AppSettings = {
|
||||
|
||||
Reference in new issue
Block a user