#132 - Persist the last opened folder location

This commit is contained in:
Elio Struyf
2021-10-05 08:32:45 +02:00
parent 5374edfa01
commit 476ec6c2fd
19 changed files with 65 additions and 39 deletions
@@ -1,7 +1,8 @@
import { HomeIcon } from '@heroicons/react/solid';
import { CollectionIcon } from '@heroicons/react/outline';
import { basename, join } from 'path';
import * as React from 'react';
import { useRecoilState, useRecoilValue } from 'recoil';
import { HOME_PAGE_NAVIGATION_ID } from '../../../constants';
import { SelectedMediaFolderAtom, SettingsAtom } from '../../state';
export interface IBreadcrumbProps {}
@@ -63,8 +64,8 @@ export const Breadcrumb: React.FunctionComponent<IBreadcrumbProps> = (props: Rea
<ol role="list" className="w-full mx-auto flex space-x-4 px-5">
<li className="flex">
<div className="flex items-center">
<button onClick={() => setSelectedFolder(null)} className="text-gray-500 hover:text-gray-600 dark:text-whisper-900 dark:hover:text-whisper-500">
<HomeIcon className="flex-shrink-0 h-5 w-5" aria-hidden="true" />
<button onClick={() => setSelectedFolder(HOME_PAGE_NAVIGATION_ID)} className="text-gray-500 hover:text-gray-600 dark:text-whisper-900 dark:hover:text-whisper-500">
<CollectionIcon className="flex-shrink-0 h-5 w-5" aria-hidden="true" />
<span className="sr-only">Home</span>
</button>
</div>