more quality of life updates
This commit is contained in:
@@ -3001,6 +3001,13 @@ function Flow() {
|
||||
return () => document.removeEventListener('pointerdown', handler);
|
||||
}, [menuOpen]);
|
||||
|
||||
// Auto-dismiss status toast after 5 seconds
|
||||
useEffect(() => {
|
||||
if (!status.text) return;
|
||||
const timer = setTimeout(() => setStatus({ text: '', level: 'info' }), 5000);
|
||||
return () => clearTimeout(timer);
|
||||
}, [status]);
|
||||
|
||||
useEffect(() => {
|
||||
const handler = (e: KeyboardEvent) => {
|
||||
if ((e.ctrlKey || e.metaKey) && e.key === 'Enter') {
|
||||
|
||||
@@ -2,6 +2,18 @@ import React, { useEffect, useMemo, useRef, useState } from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { marked } from 'marked';
|
||||
|
||||
// Open external links in new tabs
|
||||
const renderer = new marked.Renderer();
|
||||
const defaultLinkRenderer = renderer.link.bind(renderer);
|
||||
renderer.link = function (token) {
|
||||
const html = defaultLinkRenderer(token);
|
||||
if (token.href && /^https?:\/\//.test(token.href)) {
|
||||
return html.replace(/^<a /, '<a target="_blank" rel="noopener noreferrer" ');
|
||||
}
|
||||
return html;
|
||||
};
|
||||
marked.use({ renderer });
|
||||
|
||||
interface Heading {
|
||||
level: number;
|
||||
text: string;
|
||||
|
||||
@@ -154,7 +154,7 @@ html, body, #root {
|
||||
.floating-menu-toggle {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 10px;
|
||||
border-radius: 20px;
|
||||
border: 1px solid var(--border-toolbar);
|
||||
background: var(--bg-toolbar);
|
||||
cursor: pointer;
|
||||
@@ -170,8 +170,8 @@ html, body, #root {
|
||||
}
|
||||
|
||||
.floating-menu-logo {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
@@ -744,6 +744,9 @@ html, body, #root {
|
||||
|
||||
.node-help-panel-body strong { color: #e2e8f0; }
|
||||
|
||||
.node-help-panel-body a { color: #ff9800; }
|
||||
.node-help-panel-body a:hover { color: #ffb74d; }
|
||||
|
||||
/* ── Help panel TOC + content layout ──────────────────────────────── */
|
||||
|
||||
.help-content-row {
|
||||
|
||||
Reference in New Issue
Block a user