-
Notifications
You must be signed in to change notification settings - Fork 462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert to BlockNote, Image support, Video Support, tamagui theme, white and black theme #503
base: main
Are you sure you want to change the base?
Changes from 1 commit
05328a4
30a5c49
57a1058
b0be2f9
f0d34ec
b1902eb
457f3e1
1dd5bed
9509396
35fa482
ad316b4
a6b1345
9573d0c
05f91e7
21e6999
fd2e395
802326e
ee0be94
80c0bad
b318f4c
b1d3ed0
ca61f50
0e6837d
c5ecac3
09b55d7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ import { EmbeddingModelConfig } from 'electron/main/electron-store/storeConfig' | |
|
||
import NewRemoteEmbeddingModelModal from './modals/NewRemoteEmbeddingModel' | ||
import EmbeddingModelSelect from './EmbeddingModelSelect' | ||
import { XStack, YStack, SizableText } from 'tamagui' | ||
|
||
interface InitialEmbeddingModelSettingsProps { | ||
setErrorMsg: (msg: string) => void | ||
|
@@ -47,16 +48,16 @@ const InitialEmbeddingModelSettings: React.FC<InitialEmbeddingModelSettingsProps | |
} | ||
|
||
return ( | ||
<div className="flex w-full items-center justify-between rounded bg-dark-gray-c-three"> | ||
<div className="flex flex-col"> | ||
<p className="mb-0 text-gray-100">Embedding Model</p>{' '} | ||
<p className="text-xs text-gray-400"> | ||
<XStack className="flex w-full items-center justify-between rounded"> | ||
<YStack className="flex flex-col"> | ||
<SizableText color="$gray13" fontWeight={600} fontSize={16}>Embedding Model</SizableText> | ||
<SizableText color="$black" fontSize={12} fontWeight={300} marginTop="$2"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: Using $black color for text may not work well with dark theme - consider using a theme-aware color token instead |
||
Choose a recommended model or a{' '} | ||
<a className="underline" onClick={() => setShowNewEmbeddingModelModal(true)}> | ||
custom embedding model | ||
</a> | ||
Comment on lines
59
to
61
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. style: Consider using Tamagui's Link component instead of HTML anchor for consistency with the UI framework |
||
</p> | ||
</div> | ||
</SizableText> | ||
</YStack> | ||
<div className="w-[150px]"> | ||
<EmbeddingModelSelect | ||
selectedModel={selectedModel} | ||
|
@@ -74,7 +75,7 @@ const InitialEmbeddingModelSettings: React.FC<InitialEmbeddingModelSettingsProps | |
updateEmbeddingModels() | ||
}} | ||
/> | ||
</div> | ||
</XStack> | ||
) | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import React, { useState } from 'react' | ||
|
||
import { Button } from '@material-tailwind/react' | ||
|
||
import { YStack, H3, SizableText, XStack } from 'tamagui' | ||
import ReorModal from '../Common/Modal' | ||
|
||
import DirectorySelector from './DirectorySelector' | ||
|
@@ -27,31 +27,31 @@ const InitialSetupSinglePage: React.FC<OldInitialSettingsProps> = ({ readyForInd | |
|
||
return ( | ||
<ReorModal isOpen onClose={() => {}} hideCloseButton> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: onClose prop is set to an empty function - consider handling modal closure properly |
||
<div className="ml-2 mr-4 w-[620px] py-3"> | ||
<div className="ml-2 mt-0 h-[450px] "> | ||
<h2 className="mb-0 text-center text-2xl font-semibold text-white">Welcome to the Reor Project</h2> | ||
<p className="mt-2 text-center text-gray-100"> | ||
<YStack className="ml-2 mr-4 w-[620px] py-3"> | ||
<YStack className="ml-2 mt-0 h-[450px] "> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. syntax: Extra space in className string after h-[450px] |
||
<H3 color="$gray13" fontWeight="semi-bold" className="mb-0 text-center text-2xl">Welcome to the Reor Project</H3> | ||
<SizableText color="$gray11" fontWeight={400} marginTop="$4" textAlign="center"> | ||
Reor is a private AI personal knowledge management tool. Each note will be saved as a markdown file to a | ||
vault directory on your machine. | ||
</p> | ||
<div className="mt-10 flex items-center justify-between border-0 border-b-2 border-solid border-neutral-700 pb-4"> | ||
<div className="w-80 flex-col"> | ||
<p className="m-0 text-gray-100">Vault Directory</p> | ||
<p className="m-0 pt-1 text-xs text-gray-100 opacity-40"> | ||
</SizableText> | ||
<XStack className="mt-10 flex items-center justify-between border-0 border-b-2 border-solid border-neutral-700 pb-4"> | ||
<YStack className="w-80 flex-col"> | ||
<SizableText color="$gray13" fontWeight={600} fontSize={16}>Vault Directory</SizableText> | ||
<SizableText color="$black" fontSize={14} fontWeight={300} className="m-0 pt-1"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. style: Using $black color token here may cause visibility issues in dark mode since it's a fixed color rather than a theme token |
||
Your vault directory doesn't need to be empty. Only markdown files will be indexed. | ||
</p> | ||
</div> | ||
</SizableText> | ||
</YStack> | ||
<div className="flex-col"> | ||
<DirectorySelector setErrorMsg={setDirectoryErrorMsg} /> | ||
{showError && directoryErrorMsg && <p className="text-xs text-red-500">{directoryErrorMsg}</p>} | ||
</div> | ||
</div> | ||
</XStack> | ||
<div className="mt-2 border-0 border-b-2 border-solid border-neutral-700 pb-2"> | ||
<InitialEmbeddingModelSettings setErrorMsg={setEmbeddingErrorMsg} /> | ||
{showError && embeddingErrorMsg && <p className="text-xs text-red-500">{embeddingErrorMsg}</p>} | ||
</div> | ||
<InitialSetupLLMSettings /> | ||
</div> | ||
</YStack> | ||
<div className="flex justify-end"> | ||
<Button | ||
className="mb-3 mt-4 h-10 w-[80px] cursor-pointer border-none bg-blue-500 px-2 py-0 text-center hover:bg-blue-600" | ||
|
@@ -61,7 +61,7 @@ const InitialSetupSinglePage: React.FC<OldInitialSettingsProps> = ({ readyForInd | |
Next | ||
</Button> | ||
</div> | ||
</div> | ||
</YStack> | ||
</ReorModal> | ||
) | ||
} | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -3,7 +3,8 @@ import { BsChatLeftDots, BsChatLeftDotsFill } from 'react-icons/bs' | |||||
import NavigationButtons from './NavigationButtons' | ||||||
import ExternalLink from '../Common/ExternalLink' | ||||||
import { useChatContext } from '@/contexts/ChatContext' | ||||||
import { XStack } from 'tamagui' | ||||||
import { XStack, SizableText } from 'tamagui' | ||||||
import { MessageSquareMore, MessageSquareOff } from '@tamagui/lucide-icons' | ||||||
|
||||||
export const titleBarHeight = '30px' | ||||||
|
||||||
|
@@ -32,19 +33,23 @@ const TitleBar: React.FC = () => { | |||||
className="electron-no-drag mt-[0.5px] flex items-center justify-end" | ||||||
style={platform === 'win32' ? { marginRight: '8.5rem' } : { marginRight: '0.3rem' }} | ||||||
> | ||||||
<ExternalLink href="https://forms.gle/8H4GtEcE6MBnNAUa7" className="decoration-gray-200"> | ||||||
<span className="mr-2 cursor-pointer text-sm text-gray-200 hover:text-gray-300">Feedback</span> | ||||||
<ExternalLink href="https://forms.gle/8H4GtEcE6MBnNAUa7" className="cursor-pointer"> | ||||||
<SizableText | ||||||
color="$gray13" | ||||||
fontSize={14} | ||||||
className="mr-2" | ||||||
>Feedback</SizableText> | ||||||
</ExternalLink> | ||||||
{showChatbot ? ( | ||||||
<BsChatLeftDotsFill | ||||||
className="electron-no-drag mr-1 mt-[0.2rem] -scale-x-100 cursor-pointer p-[2px] text-gray-100" | ||||||
size={22} | ||||||
<MessageSquareOff | ||||||
className="electron-no-drag mr-1 mt-[0.2rem] ml-1 -scale-x-100 cursor-pointer p-[2px] text-gray-100" | ||||||
size={19} | ||||||
Comment on lines
+41
to
+42
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. style: size={19} for MessageSquareOff but size={22} for MessageSquareMore creates inconsistent icon sizes |
||||||
title="Hide Similar Files" | ||||||
onClick={() => setShowChatbot((show) => !show)} | ||||||
/> | ||||||
) : ( | ||||||
<BsChatLeftDots | ||||||
className="electron-no-drag mr-1 mt-[0.2rem] -scale-x-100 cursor-pointer p-[2px] text-gray-100" | ||||||
<MessageSquareMore | ||||||
className="electron-no-drag mr-1 mt-[0.2rem ml-1 -scale-x-100 cursor-pointer p-[2px] text-gray-100" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. syntax: typo in className - missing closing quote after [0.2rem
Suggested change
|
||||||
size={22} | ||||||
title="Show Chatbot" | ||||||
onClick={() => setShowChatbot((show) => !show)} | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: onClose prop is empty function - consider handling modal close during indexing