Skip to content

Commit

Permalink
add current path
Browse files Browse the repository at this point in the history
Signed-off-by: James <[email protected]>
  • Loading branch information
James committed Jan 22, 2024
1 parent d01b050 commit a86b243
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions web/screens/Settings/Advanced/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,17 @@ const Advanced = () => {
[setPartialProxy, setProxy]
)

// TODO: remove me later.
const [currentPath, setCurrentPath] = useState('')

useEffect(() => {
window.core?.api
?.getAppConfigurations()
?.then((appConfig: AppConfiguration) => {
setCurrentPath(appConfig.data_folder)
})
}, [])

useEffect(() => {
readSettings().then((settings) => {
setGpuEnabled(settings.run_mode === 'gpu')
Expand Down Expand Up @@ -224,11 +235,12 @@ const Advanced = () => {
<div className="w-4/5 flex-shrink-0 space-y-1.5">
<div className="flex gap-x-2">
<h6 className="text-sm font-semibold capitalize">
Select Directory
Select Jan Data Folder
</h6>
</div>
<p className="whitespace-pre-wrap leading-relaxed">
Select Jan&apos;s vault directory
Select Jan&apos;s data folder. Current folder is located at
{` ${currentPath}`}
</p>
</div>
<Button size="sm" themes="secondary" onClick={onJanVaultDirectoryClick}>
Expand Down

0 comments on commit a86b243

Please sign in to comment.