Skip to content

Commit 96140f3

Browse files
committed
chore: tweak dark mode styles
1 parent 369b8af commit 96140f3

29 files changed

+62
-56
lines changed

web/src/components/CreateMemoRelationDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const CreateMemoRelationDialog: React.FC<Props> = (props: Props) => {
9696
<div className="w-full flex flex-row justify-start items-start flex-wrap gap-2 mt-1">
9797
{memoList.map((memo) => (
9898
<div
99-
className="max-w-[50%] text-sm px-3 py-1 flex flex-row justify-start items-center border rounded-md cursor-pointer truncate opacity-80 dark:text-gray-300 hover:opacity-60 hover:line-through"
99+
className="max-w-[50%] text-sm px-3 py-1 flex flex-row justify-start items-center border rounded-md cursor-pointer truncate opacity-80 dark:text-gray-300 dark:border-zinc-700 hover:opacity-60 hover:line-through"
100100
key={memo.id}
101101
onClick={() => handleDeleteMemoRelation(memo)}
102102
>

web/src/components/MemoContent/Code.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ interface Props {
33
}
44

55
const Code: React.FC<Props> = ({ content }: Props) => {
6-
return <code>{content}</code>;
6+
return <code className="text-sm">`{content}`</code>;
77
};
88

99
export default Code;

web/src/components/MemoContent/CodeBlock.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const CodeBlock: React.FC<Props> = ({ language, content }: Props) => {
2929
};
3030

3131
return (
32-
<pre className="w-full my-1 p-3 rounded bg-gray-100 dark:bg-zinc-600 whitespace-pre-wrap relative">
32+
<pre className="w-full my-1 p-3 rounded bg-gray-100 dark:bg-zinc-700 whitespace-pre-wrap relative">
3333
<IconButton
3434
size="sm"
3535
className="!absolute top-0.5 right-0.5 opacity-50"

web/src/components/MemoEditor/ActionButton/TagSelector.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,17 @@ const TagSelector = (props: Props) => {
2424
}, []);
2525

2626
return (
27-
<IconButton className="relative group flex flex-row justify-center items-center p-1 w-auto h-auto mr-1 select-none rounded cursor-pointer text-gray-600 dark:text-gray-400 hover:bg-gray-300 dark:hover:bg-zinc-800 hover:shadow">
27+
<IconButton
28+
className="relative group flex flex-row justify-center items-center p-1 w-auto h-auto mr-1 select-none rounded cursor-pointer text-gray-600 dark:!text-gray-400 hover:bg-gray-300 hover:shadow"
29+
size="sm"
30+
>
2831
<Icon.Hash className="w-5 h-5 mx-auto" />
29-
<div className="hidden flex-row justify-start items-start flex-wrap absolute top-8 left-0 mt-1 p-1 z-1 rounded w-52 h-auto max-h-48 overflow-y-auto font-mono shadow bg-zinc-200 dark:bg-zinc-600 group-hover:flex">
32+
<div className="hidden flex-row justify-start items-start flex-wrap absolute top-8 left-0 mt-1 p-1 z-1 rounded w-52 h-auto max-h-48 overflow-y-auto font-mono shadow bg-zinc-100 dark:bg-zinc-700 group-hover:flex">
3033
{tags.length > 0 ? (
3134
tags.map((tag) => {
3235
return (
3336
<div
34-
className="w-auto max-w-full text-black dark:text-gray-300 cursor-pointer rounded text-sm leading-6 px-2 hover:bg-zinc-300 dark:hover:bg-zinc-700 shrink-0"
37+
className="w-auto max-w-full text-black dark:text-gray-300 cursor-pointer rounded text-sm leading-6 px-2 hover:bg-zinc-200 dark:hover:bg-zinc-800 shrink-0"
3538
onClick={() => onTagSelectorClick(tag)}
3639
key={tag}
3740
>

web/src/components/MemoEditor/Editor/TagSuggestions.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,15 +114,15 @@ const TagSuggestions = ({ editorRef, editorActions }: Props) => {
114114
if (!isVisibleRef.current || !position) return null;
115115
return (
116116
<div
117-
className="z-20 p-1 mt-1 -ml-2 absolute max-w-[12rem] gap-px rounded font-mono flex flex-col justify-start items-start overflow-auto shadow bg-zinc-200 dark:bg-zinc-600"
117+
className="z-20 p-1 mt-1 -ml-2 absolute max-w-[12rem] gap-px rounded font-mono flex flex-col justify-start items-start overflow-auto shadow bg-zinc-100 dark:bg-zinc-700"
118118
style={{ left: position.left, top: position.top + position.height }}
119119
>
120120
{suggestionsRef.current.map((tag, i) => (
121121
<div
122122
key={tag}
123123
onMouseDown={() => autocomplete(tag)}
124124
className={classNames(
125-
"rounded p-1 px-2 w-full truncate text-sm dark:text-gray-300 cursor-pointer hover:bg-zinc-300 dark:hover:bg-zinc-700",
125+
"rounded p-1 px-2 w-full truncate text-sm dark:text-gray-300 cursor-pointer hover:bg-zinc-200 dark:hover:bg-zinc-800",
126126
i === selected ? "bg-zinc-300 dark:bg-zinc-700" : ""
127127
)}
128128
>

web/src/components/MemoEditor/Editor/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ const Editor = forwardRef(function Editor(props: Props, ref: React.ForwardedRef<
145145
}, []);
146146

147147
return (
148-
<div className={classNames("flex flex-col justify-start items-start relative w-full h-auto bg-inherit dark:text-gray-200", className)}>
148+
<div className={classNames("flex flex-col justify-start items-start relative w-full h-auto bg-inherit dark:text-gray-300", className)}>
149149
<textarea
150150
className="w-full h-full max-h-[300px] my-1 text-base resize-none overflow-x-hidden overflow-y-auto bg-transparent outline-none whitespace-pre-wrap word-break"
151151
rows={1}

web/src/components/MemoEditor/MemoEditorDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default function showMemoEditorDialog(props: Pick<Props, "memoId" | "rela
5252
{
5353
className: "memo-editor-dialog",
5454
dialogName: "memo-editor-dialog",
55-
containerClassName: "dark:!bg-zinc-700",
55+
containerClassName: "dark:!bg-zinc-800",
5656
},
5757
MemoEditorDialog,
5858
props

web/src/components/MemoEditor/RelationListView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ const RelationListView = (props: Props) => {
3838
return (
3939
<div
4040
key={memo.id}
41-
className="w-auto max-w-xs overflow-hidden flex flex-row justify-start items-center bg-gray-100 dark:bg-zinc-800 hover:opacity-80 rounded-md text-sm p-1 px-2 text-gray-500 cursor-pointer hover:line-through"
41+
className="w-auto max-w-xs overflow-hidden flex flex-row justify-start items-center bg-zinc-100 dark:bg-zinc-900 hover:opacity-80 rounded-md text-sm p-1 px-2 text-gray-500 dark:text-gray-400 cursor-pointer hover:line-through"
4242
onClick={() => handleDeleteRelation(memo)}
4343
>
4444
<Icon.Link className="w-4 h-auto shrink-0 opacity-80" />
4545
<span className="px-1 shrink-0 opacity-80">#{memo.id}</span>
4646
<span className="max-w-full text-ellipsis whitespace-nowrap overflow-hidden">{memo.content}</span>
47-
<Icon.X className="w-4 h-auto hover:opacity-80 shrink-0 ml-1" />
47+
<Icon.X className="w-4 h-auto cursor-pointer opacity-60 hover:opacity-100" />
4848
</div>
4949
);
5050
})}

web/src/components/MemoEditor/ResourceListView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const ResourceListView = (props: Props) => {
2222
return (
2323
<div
2424
key={resource.id}
25-
className="max-w-full flex flex-row justify-start items-center flex-nowrap gap-x-1 bg-gray-100 dark:bg-zinc-800 px-2 py-1 rounded text-gray-500"
25+
className="max-w-full flex flex-row justify-start items-center flex-nowrap gap-x-1 bg-zinc-100 dark:bg-zinc-900 px-2 py-1 rounded text-gray-500 dark:text-gray-400"
2626
>
2727
<ResourceIcon resource={resource} className="!w-4 !h-4 !opacity-100" />
2828
<span className="text-sm max-w-[8rem] truncate">{resource.filename}</span>

web/src/components/MemoEditor/index.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ const MemoEditor = (props: Props) => {
357357
<div
358358
className={`${
359359
className ?? ""
360-
} relative w-full flex flex-col justify-start items-start bg-white dark:bg-zinc-700 px-4 pt-4 rounded-lg border border-gray-200 dark:border-zinc-600`}
360+
} relative w-full flex flex-col justify-start items-start bg-white dark:bg-zinc-800 px-4 pt-4 rounded-lg border border-gray-200 dark:border-zinc-700`}
361361
tabIndex={0}
362362
onKeyDown={handleKeyDown}
363363
onDrop={handleDropEvent}
@@ -368,13 +368,15 @@ const MemoEditor = (props: Props) => {
368368
<div className="flex flex-row justify-start items-center">
369369
<TagSelector onTagSelectorClick={(tag) => handleTagSelectorClick(tag)} />
370370
<IconButton
371-
className="flex flex-row justify-center items-center p-1 w-auto h-auto mr-1 select-none rounded cursor-pointer text-gray-600 dark:text-gray-400 hover:bg-gray-300 dark:hover:bg-zinc-800 hover:shadow"
371+
className="flex flex-row justify-center items-center p-1 w-auto h-auto mr-1 select-none rounded cursor-pointer text-gray-600 dark:!text-gray-400 hover:bg-gray-300 dark:hover:bg-zinc-800 hover:shadow"
372+
size="sm"
372373
onClick={handleUploadFileBtnClick}
373374
>
374375
<Icon.Image className="w-5 h-5 mx-auto" />
375376
</IconButton>
376377
<IconButton
377-
className="flex flex-row justify-center items-center p-1 w-auto h-auto mr-1 select-none rounded cursor-pointer text-gray-600 dark:text-gray-400 hover:bg-gray-300 dark:hover:bg-zinc-800 hover:shadow"
378+
className="flex flex-row justify-center items-center p-1 w-auto h-auto mr-1 select-none rounded cursor-pointer text-gray-600 dark:!text-gray-400 hover:bg-gray-300 dark:hover:bg-zinc-800 hover:shadow"
379+
size="sm"
378380
onClick={handleAddMemoRelationBtnClick}
379381
>
380382
<Icon.Link className="w-5 h-5 mx-auto" />

0 commit comments

Comments
 (0)