Skip to content

Commit ed1f74d

Browse files
committed
enhance: add tiny setting button on graph row
Signed-off-by: EINDEX <snowstarlbk@gmail.com>
1 parent 7c085c0 commit ed1f74d

File tree

4 files changed

+41
-5
lines changed

4 files changed

+41
-5
lines changed

package-lock.json

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"@chakra-ui/react": "^2.4.9",
1818
"@emotion/react": "^11.10.6",
1919
"@emotion/styled": "^11.10.6",
20+
"@tabler/icons-react": "^2.12.0",
2021
"@tailwindcss/typography": "^0.5.9",
2122
"@thedutchcoder/postcss-rem-to-px": "^0.0.2",
2223
"@types/marked": "^4.0.8",

src/pages/content/LogseqCopliot.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { LogseqBlock } from '@components/LogseqBlock';
55
import LogseqPageLink from '@components/LogseqPage';
66
import Browser from 'webextension-polyfill';
77
import styles from './index.module.scss';
8+
import { IconSettings } from '@tabler/icons-react';
89

910
type LogseqCopliotProps = {
1011
connect: Browser.Runtime.Port;
@@ -59,7 +60,6 @@ export const LogseqCopliot = ({ connect }: LogseqCopliotProps) => {
5960
);
6061
};
6162

62-
6363
const pages = () => {
6464
return (
6565
<>
@@ -114,7 +114,10 @@ export const LogseqCopliot = ({ connect }: LogseqCopliotProps) => {
114114
<>{statusShower()}</>
115115
) : (
116116
<>
117-
<span>Graph: {logseqSearchResult?.graph}</span>
117+
<div className={styles.copilotCardHeader}>
118+
<span>Graph: {logseqSearchResult?.graph}</span>
119+
<IconSettings onClick={goOptionPage} size={16} />
120+
</div>
118121
{noContent()}
119122
{pages()}
120123
{blocks()}
@@ -125,9 +128,7 @@ export const LogseqCopliot = ({ connect }: LogseqCopliotProps) => {
125128

126129
<div className={styles.copilotFooter}>
127130
<span>
128-
<a href="https://github.com/EINDEX/logseq-copilot/issues">
129-
Feedback
130-
</a>
131+
<a href="https://github.com/EINDEX/logseq-copilot/issues">Feedback</a>
131132
</span>
132133
<span>
133134
power by{' '}

src/pages/content/index.module.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@
3333
@apply divide-y divide-x-0 divide-dashed;
3434
}
3535

36+
.copilotCardHeader {
37+
@apply flex flex-row justify-between items-center text-sm pb-2;
38+
39+
a {
40+
@apply text-sm text-center object-center;
41+
}
42+
}
43+
3644
.copilotFooter {
3745
@apply flex flex-row text-xs justify-between text-gray-500 px-2;
3846

0 commit comments

Comments
 (0)