fix(webui): align chat links with edit filename colors (#6484)
This commit is contained in:
1 parent
960bfa9a83
commit
164ddadd8e
10 files changed
+24
-10
No files matched your search
@@ -359,7 +359,7 @@ function DocumentLink({ href, path, onOpen, children }: {
|
||||
// Fragment-only links must not replace the application's hash route.
|
||||
if (!href || href.startsWith("#")) return <>{children}</>;
|
||||
if (/^(https?:\/\/|mailto:)/i.test(href)) {
|
||||
return <WebLink href={href} className="text-blue-500 underline underline-offset-2 dark:text-blue-300">{children}</WebLink>;
|
||||
return <WebLink href={href} className="text-content-link underline underline-offset-2">{children}</WebLink>;
|
||||
}
|
||||
if (/^[a-z][a-z\d+.-]*:/i.test(href) || href.startsWith("//")) return <>{children}</>;
|
||||
let target = href.split(/[?#]/, 1)[0];
|
||||
@@ -465,7 +465,7 @@ function InlineLinkPreviewRow({ link }: { link: InlineLinkPreview }) {
|
||||
aria-label={t("message.openLink", { label })}
|
||||
className={cn(
|
||||
"not-prose inline-flex max-w-full items-center gap-2 align-baseline",
|
||||
"text-blue-500 no-underline underline-offset-2 hover:underline dark:text-blue-300",
|
||||
"text-content-link no-underline underline-offset-2 hover:underline",
|
||||
)}
|
||||
>
|
||||
<span
|
||||
@@ -659,7 +659,7 @@ export default function MarkdownTextRenderer({
|
||||
href={href}
|
||||
target="_blank"
|
||||
rel="noreferrer noopener"
|
||||
className="text-blue-500 underline underline-offset-2 hover:text-blue-600 dark:text-blue-300 dark:hover:text-blue-200"
|
||||
className="text-content-link underline underline-offset-2 hover:text-content-link-hover"
|
||||
{...props}
|
||||
>
|
||||
{markdownChildren}
|
||||
@@ -841,7 +841,7 @@ export default function MarkdownTextRenderer({
|
||||
"prose-ul:my-2 prose-ol:my-2 prose-li:my-0.5",
|
||||
"prose-blockquote:my-3 prose-blockquote:border-l-2 prose-blockquote:font-normal",
|
||||
"prose-blockquote:not-italic prose-blockquote:text-foreground/80",
|
||||
"prose-a:text-blue-500 prose-a:underline-offset-2 hover:prose-a:text-blue-600 dark:prose-a:text-blue-300 dark:hover:prose-a:text-blue-200",
|
||||
"prose-a:text-content-link prose-a:underline-offset-2 hover:prose-a:text-content-link-hover",
|
||||
"prose-hr:my-6",
|
||||
"prose-pre:my-0 prose-pre:bg-transparent prose-pre:p-0",
|
||||
"prose-code:before:content-none prose-code:after:content-none prose-code:font-normal",
|
||||
|
||||
Reference in new issue
Block a user