mirror of https://github.com/usememos/memos.git
chore: fix dark mode
This commit is contained in:
parent
cf16795a98
commit
a3de61a141
|
|
@ -76,7 +76,7 @@ const MemoCommentMessage = observer(({ inbox }: Props) => {
|
||||||
"shrink-0 mt-2 p-2 rounded-full border",
|
"shrink-0 mt-2 p-2 rounded-full border",
|
||||||
inbox.status === Inbox_Status.UNREAD
|
inbox.status === Inbox_Status.UNREAD
|
||||||
? "border-primary text-primary bg-primary/10"
|
? "border-primary text-primary bg-primary/10"
|
||||||
: "border-muted-foreground text-muted-foreground bg-secondary",
|
: "border-muted-foreground text-muted-foreground bg-popover",
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<TooltipProvider>
|
<TooltipProvider>
|
||||||
|
|
@ -92,7 +92,7 @@ const MemoCommentMessage = observer(({ inbox }: Props) => {
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
"border w-full p-2 px-3 rounded-lg flex flex-col justify-start items-start gap-1 border-border hover:bg-secondary",
|
"border w-full p-2 px-3 rounded-lg flex flex-col justify-start items-start gap-1 border-border hover:bg-background",
|
||||||
inbox.status !== Inbox_Status.UNREAD && "opacity-60",
|
inbox.status !== Inbox_Status.UNREAD && "opacity-60",
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -34,10 +34,7 @@ const MemoAttachmentListView = ({ attachments = [] }: { attachments: Attachment[
|
||||||
if (type === "image/*") {
|
if (type === "image/*") {
|
||||||
return (
|
return (
|
||||||
<img
|
<img
|
||||||
className={cn(
|
className={cn("cursor-pointer h-full w-auto rounded-lg border border-border object-contain hover:opacity-80", className)}
|
||||||
"cursor-pointer h-full w-auto rounded-lg border border-border object-contain hover:opacity-80",
|
|
||||||
className,
|
|
||||||
)}
|
|
||||||
src={attachment.externalLink ? attachmentUrl : attachmentUrl + "?thumbnail=true"}
|
src={attachment.externalLink ? attachmentUrl : attachmentUrl + "?thumbnail=true"}
|
||||||
onClick={() => handleImageClick(attachmentUrl)}
|
onClick={() => handleImageClick(attachmentUrl)}
|
||||||
decoding="async"
|
decoding="async"
|
||||||
|
|
@ -47,10 +44,7 @@ const MemoAttachmentListView = ({ attachments = [] }: { attachments: Attachment[
|
||||||
} else if (type === "video/*") {
|
} else if (type === "video/*") {
|
||||||
return (
|
return (
|
||||||
<video
|
<video
|
||||||
className={cn(
|
className={cn("cursor-pointer h-full w-auto rounded-lg border border-border object-contain bg-popover", className)}
|
||||||
"cursor-pointer h-full w-auto rounded-lg border border-border object-contain bg-secondary",
|
|
||||||
className,
|
|
||||||
)}
|
|
||||||
preload="metadata"
|
preload="metadata"
|
||||||
crossOrigin="anonymous"
|
crossOrigin="anonymous"
|
||||||
src={attachmentUrl}
|
src={attachmentUrl}
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ const CodeBlock: React.FC<Props> = ({ language, content }: Props) => {
|
||||||
}, [content]);
|
}, [content]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="w-full my-1 bg-background border-2 border-l-4 border-secondary rounded-md relative">
|
<div className="w-full my-1 bg-background border-2 border-l-4 border-popover rounded-md relative">
|
||||||
<div className="w-full px-2 mt-1 flex flex-row justify-between items-center text-accent-foreground/60">
|
<div className="w-full px-2 mt-1 flex flex-row justify-between items-center text-accent-foreground/60">
|
||||||
<span className="text-sm font-mono">{formatedLanguage}</span>
|
<span className="text-sm font-mono">{formatedLanguage}</span>
|
||||||
<CopyIcon className="w-4 h-auto cursor-pointer hover:opacity-80" onClick={handleCopyButtonClick} />
|
<CopyIcon className="w-4 h-auto cursor-pointer hover:opacity-80" onClick={handleCopyButtonClick} />
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ const EmbeddedMemo = observer(({ resourceId: uid, params: paramsStr }: Props) =>
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="relative flex flex-col justify-start items-start w-full px-3 py-2 bg-secondary rounded-lg border border-border hover:shadow">
|
<div className="relative flex flex-col justify-start items-start w-full px-3 py-2 bg-popover rounded-lg border border-border hover:shadow">
|
||||||
<div className="w-full mb-1 flex flex-row justify-between items-center text-muted-foreground">
|
<div className="w-full mb-1 flex flex-row justify-between items-center text-muted-foreground">
|
||||||
<div className="text-sm leading-5 select-none">
|
<div className="text-sm leading-5 select-none">
|
||||||
<relative-time datetime={memo.displayTime?.toISOString()} format="datetime"></relative-time>
|
<relative-time datetime={memo.displayTime?.toISOString()} format="datetime"></relative-time>
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ const MemoDetailSidebarDrawer = ({ memo, parentPage }: Props) => {
|
||||||
<GanttChartIcon className="w-5 h-auto text-muted-foreground" />
|
<GanttChartIcon className="w-5 h-auto text-muted-foreground" />
|
||||||
</Button>
|
</Button>
|
||||||
</SheetTrigger>
|
</SheetTrigger>
|
||||||
<SheetContent side="right" className="w-full sm:w-80 px-4 bg-secondary">
|
<SheetContent side="right" className="w-full sm:w-80 px-4 bg-popover">
|
||||||
<MemoDetailSidebar className="py-4" memo={memo} parentPage={parentPage} />
|
<MemoDetailSidebar className="py-4" memo={memo} parentPage={parentPage} />
|
||||||
</SheetContent>
|
</SheetContent>
|
||||||
</Sheet>
|
</Sheet>
|
||||||
|
|
|
||||||
|
|
@ -70,14 +70,14 @@ const MarkdownMenu = (props: Props) => {
|
||||||
<div className="flex flex-col text-sm gap-0.5">
|
<div className="flex flex-col text-sm gap-0.5">
|
||||||
<button
|
<button
|
||||||
onClick={handleCodeBlockClick}
|
onClick={handleCodeBlockClick}
|
||||||
className="flex items-center gap-2 px-2 py-1 text-left text-foreground hover:bg-secondary outline-none rounded"
|
className="flex items-center gap-2 px-2 py-1 text-left text-foreground hover:bg-background outline-none rounded"
|
||||||
>
|
>
|
||||||
<Code2Icon className="w-4 h-auto" />
|
<Code2Icon className="w-4 h-auto" />
|
||||||
<span>{t("markdown.code-block")}</span>
|
<span>{t("markdown.code-block")}</span>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
onClick={handleCheckboxClick}
|
onClick={handleCheckboxClick}
|
||||||
className="flex items-center gap-2 px-2 py-1 text-left text-foreground hover:bg-secondary outline-none rounded"
|
className="flex items-center gap-2 px-2 py-1 text-left text-foreground hover:bg-background outline-none rounded"
|
||||||
>
|
>
|
||||||
<CheckSquareIcon className="w-4 h-auto" />
|
<CheckSquareIcon className="w-4 h-auto" />
|
||||||
<span>{t("markdown.checkbox")}</span>
|
<span>{t("markdown.checkbox")}</span>
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ const AttachmentListView = (props: Props) => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
key={attachment.name}
|
key={attachment.name}
|
||||||
className="max-w-full w-auto flex flex-row justify-start items-center flex-nowrap gap-x-1 bg-secondary px-2 py-1 rounded hover:shadow-sm text-muted-foreground"
|
className="max-w-full w-auto flex flex-row justify-start items-center flex-nowrap gap-x-1 bg-popover px-2 py-1 rounded hover:shadow-sm text-muted-foreground"
|
||||||
>
|
>
|
||||||
<SortableItem id={attachment.name} className="flex flex-row justify-start items-center gap-x-1">
|
<SortableItem id={attachment.name} className="flex flex-row justify-start items-center gap-x-1">
|
||||||
<AttachmentIcon attachment={attachment} className="w-4! h-4! opacity-100!" />
|
<AttachmentIcon attachment={attachment} className="w-4! h-4! opacity-100!" />
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ const RelationListView = observer((props: Props) => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
key={memo.name}
|
key={memo.name}
|
||||||
className="w-auto max-w-xs overflow-hidden flex flex-row justify-start items-center bg-secondary hover:opacity-80 rounded-md text-sm p-1 px-2 text-muted-foreground cursor-pointer hover:line-through"
|
className="w-auto max-w-xs overflow-hidden flex flex-row justify-start items-center bg-popover hover:opacity-80 rounded-md text-sm p-1 px-2 text-muted-foreground cursor-pointer hover:line-through"
|
||||||
onClick={() => handleDeleteRelation(memo)}
|
onClick={() => handleDeleteRelation(memo)}
|
||||||
>
|
>
|
||||||
<LinkIcon className="w-4 h-auto shrink-0 opacity-80" />
|
<LinkIcon className="w-4 h-auto shrink-0 opacity-80" />
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ const MemoRelationListView = (props: Props) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="relative flex flex-col justify-start items-start w-full px-2 pt-2 pb-1.5 bg-secondary rounded-lg border border-border">
|
<div className="relative flex flex-col justify-start items-start w-full px-2 pt-2 pb-1.5 bg-popover rounded-lg border border-border">
|
||||||
<div className="w-full flex flex-row justify-start items-center mb-1 gap-3 opacity-60">
|
<div className="w-full flex flex-row justify-start items-center mb-1 gap-3 opacity-60">
|
||||||
{referencingMemoList.length > 0 && (
|
{referencingMemoList.length > 0 && (
|
||||||
<button
|
<button
|
||||||
|
|
|
||||||
|
|
@ -78,9 +78,9 @@ const Navigation = observer((props: Props) => {
|
||||||
<NavLink
|
<NavLink
|
||||||
className={({ isActive }) =>
|
className={({ isActive }) =>
|
||||||
cn(
|
cn(
|
||||||
"px-2 py-2 rounded-2xl border flex flex-row items-center text-lg text-foreground hover:border-border",
|
"px-2 py-2 rounded-2xl border flex flex-row items-center text-lg text-sidebar-foreground hover:border-border",
|
||||||
collapsed ? "" : "w-full px-4",
|
collapsed ? "" : "w-full px-4",
|
||||||
isActive ? "bg-background border-border" : "border-transparent",
|
isActive ? "bg-sidebar-primary text-sidebar-primary-foreground border-border" : "border-transparent",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
key={navLink.id}
|
key={navLink.id}
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ const ReactionView = observer((props: Props) => {
|
||||||
"h-7 border px-2 py-0.5 rounded-full flex flex-row justify-center items-center gap-1",
|
"h-7 border px-2 py-0.5 rounded-full flex flex-row justify-center items-center gap-1",
|
||||||
"text-sm text-muted-foreground",
|
"text-sm text-muted-foreground",
|
||||||
currentUser && !readonly && "cursor-pointer",
|
currentUser && !readonly && "cursor-pointer",
|
||||||
hasReaction && "bg-secondary border-border",
|
hasReaction && "bg-popover border-border",
|
||||||
)}
|
)}
|
||||||
onClick={handleReactionClick}
|
onClick={handleReactionClick}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ const SearchBar = observer(() => {
|
||||||
<div className="relative w-full h-auto flex flex-row justify-start items-center">
|
<div className="relative w-full h-auto flex flex-row justify-start items-center">
|
||||||
<SearchIcon className="absolute left-2 w-4 h-auto opacity-40 text-muted-foreground" />
|
<SearchIcon className="absolute left-2 w-4 h-auto opacity-40 text-muted-foreground" />
|
||||||
<input
|
<input
|
||||||
className={cn("w-full text-muted-foreground leading-6 bg-secondary border border-border text-sm rounded-xl p-1 pl-8 outline-0")}
|
className={cn("w-full text-muted-foreground leading-6 bg-popover border border-border text-sm rounded-xl p-1 pl-8 outline-0")}
|
||||||
placeholder={t("memo.search-placeholder")}
|
placeholder={t("memo.search-placeholder")}
|
||||||
value={queryText}
|
value={queryText}
|
||||||
onChange={onTextChange}
|
onChange={onTextChange}
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ const SSOSection = () => {
|
||||||
<div className="flex flex-row items-center">
|
<div className="flex flex-row items-center">
|
||||||
<Popover>
|
<Popover>
|
||||||
<PopoverTrigger asChild>
|
<PopoverTrigger asChild>
|
||||||
<button className="flex items-center justify-center p-1 hover:bg-secondary rounded">
|
<button className="flex items-center justify-center p-1 hover:bg-popover rounded">
|
||||||
<MoreVerticalIcon className="w-4 h-auto" />
|
<MoreVerticalIcon className="w-4 h-auto" />
|
||||||
</button>
|
</button>
|
||||||
</PopoverTrigger>
|
</PopoverTrigger>
|
||||||
|
|
@ -71,13 +71,13 @@ const SSOSection = () => {
|
||||||
<div className="flex flex-col gap-0.5 text-sm">
|
<div className="flex flex-col gap-0.5 text-sm">
|
||||||
<button
|
<button
|
||||||
onClick={() => showCreateIdentityProviderDialog(identityProvider, fetchIdentityProviderList)}
|
onClick={() => showCreateIdentityProviderDialog(identityProvider, fetchIdentityProviderList)}
|
||||||
className="flex items-center gap-2 px-2 py-1 text-left text-foreground hover:bg-secondary outline-none rounded"
|
className="flex items-center gap-2 px-2 py-1 text-left text-foreground hover:bg-popover outline-none rounded"
|
||||||
>
|
>
|
||||||
{t("common.edit")}
|
{t("common.edit")}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
onClick={() => handleDeleteIdentityProvider(identityProvider)}
|
onClick={() => handleDeleteIdentityProvider(identityProvider)}
|
||||||
className="flex items-center gap-2 px-2 py-1 text-left text-destructive hover:bg-secondary outline-none rounded"
|
className="flex items-center gap-2 px-2 py-1 text-left text-destructive hover:bg-popover outline-none rounded"
|
||||||
>
|
>
|
||||||
{t("common.delete")}
|
{t("common.delete")}
|
||||||
</button>
|
</button>
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ const SectionMenuItem: React.FC<SettingMenuItemProps> = ({ text, icon: IconCompo
|
||||||
<div
|
<div
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
className={`w-auto max-w-full px-3 leading-8 flex flex-row justify-start items-center cursor-pointer rounded-lg select-none hover:opacity-80 ${
|
className={`w-auto max-w-full px-3 leading-8 flex flex-row justify-start items-center cursor-pointer rounded-lg select-none hover:opacity-80 ${
|
||||||
isSelected ? "bg-secondary shadow" : ""
|
isSelected ? "bg-accent shadow" : ""
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<IconComponent className="w-4 h-auto mr-2 opacity-80 shrink-0" />
|
<IconComponent className="w-4 h-auto mr-2 opacity-80 shrink-0" />
|
||||||
|
|
|
||||||
|
|
@ -48,9 +48,7 @@ const RootLayout = observer(() => {
|
||||||
) : (
|
) : (
|
||||||
<div className="w-full min-h-full flex flex-row justify-center items-start sm:pl-16">
|
<div className="w-full min-h-full flex flex-row justify-center items-start sm:pl-16">
|
||||||
{sm && (
|
{sm && (
|
||||||
<div
|
<div className={cn("group flex flex-col justify-start items-start fixed top-0 left-0 select-none h-full bg-sidebar", "w-16 px-2")}>
|
||||||
className={cn("group flex flex-col justify-start items-start fixed top-0 left-0 select-none h-full bg-secondary", "w-16 px-2")}
|
|
||||||
>
|
|
||||||
<Navigation collapsed={true} />
|
<Navigation collapsed={true} />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue