diff --git a/src/__tests__/__mock__/recurrence.txt b/src/__tests__/__mock__/recurrence.txt index 949c45a3..f21077c6 100644 --- a/src/__tests__/__mock__/recurrence.txt +++ b/src/__tests__/__mock__/recurrence.txt @@ -1,7 +1,7 @@ -2023-09-10 Line 1 rec:1d due:2023-09-11 -2023-09-10 Line 1 rec:w due:2023-09-17 -2023-09-10 Line 1 rec:2m due:2023-11-10 -2023-09-10 Line 1 rec:+1d due:2023-09-12 -2023-09-10 Line 1 rec:7w due:2023-10-29 +2023-09-12 Line 1 rec:1d due:2023-09-13 +2023-09-12 Line 1 rec:w due:2023-09-19 +2023-09-12 Line 1 rec:2m due:2023-11-12 +2023-09-12 Line 1 rec:+1d due:2023-09-14 +2023-09-12 Line 1 rec:7w due:2023-10-31 2023-07-21 Line 1 rec:+1b due:2023-07-24 \ No newline at end of file diff --git a/src/__tests__/__mock__/test.txt b/src/__tests__/__mock__/test.txt index bdb5212b..afc7a955 100644 --- a/src/__tests__/__mock__/test.txt +++ b/src/__tests__/__mock__/test.txt @@ -1,5 +1,5 @@ Line 1 Edited line New line -2023-09-10 New line with creation date +2023-09-12 New line with creation date New line with relative threshold date t:June 3rd, 2005 \ No newline at end of file diff --git a/src/main/config.ts b/src/main/config.ts index af355789..31d5a4ea 100644 --- a/src/main/config.ts +++ b/src/main/config.ts @@ -39,7 +39,8 @@ const defaultConfigData = { dueDateInTheFuture: true, colorTheme: 'system', shouldUseDarkColors: false, - notificationsAllowed: false, + notificationsAllowed: true, + showFileTabs: true, }; const userDataDirectory = path.join(app.getPath('userData'), 'userData' + app.getVersion()); diff --git a/src/renderer/App.scss b/src/renderer/App.scss index 296d7a83..e44824b5 100644 --- a/src/renderer/App.scss +++ b/src/renderer/App.scss @@ -19,11 +19,6 @@ body { height: 100vh; display: flex; flex-direction: column; - header { - display: flex; - flex-direction: row; - background: #ebebeb; - } } button.showNavigation { width: 2.5em; diff --git a/src/renderer/App.tsx b/src/renderer/App.tsx index c8a30d22..fb08bea3 100644 --- a/src/renderer/App.tsx +++ b/src/renderer/App.tsx @@ -39,6 +39,7 @@ const App = () => { const [isNavigationHidden, setIsNavigationHidden] = useState(store.get('isNavigationHidden') || false); const [colorTheme, setColorTheme] = useState(store.get('colorTheme') || 'system'); const [shouldUseDarkColors, setShouldUseDarkColors] = useState(store.get('shouldUseDarkColors') || false); + const [showFileTabs, setShowFileTabs] = useState(store.get('showFileTabs')); const responseHandler = function(response) { if (response instanceof Error) { @@ -141,7 +142,7 @@ const App = () => { }, []); return ( - +
{ setIsNavigationHidden={setIsNavigationHidden} colorTheme={colorTheme} setColorTheme={setColorTheme} + showFileTabs={showFileTabs} + setShowFileTabs={setShowFileTabs} /> { />
{files?.length > 0 && ( -
- {isSearchOpen ? null : } + <> + {!isSearchOpen && showFileTabs ? : null} {headers?.availableObjects > 0 ? <> { /> : null } -
+ )} { +const NavigationComponent = ({ isDrawerOpen, setIsDrawerOpen, drawerParameter, setDrawerParameter, setDialogOpen, files, headers, isNavigationHidden, setIsNavigationHidden, colorTheme, setColorTheme, showFileTabs, setShowFileTabs }) => { const [isSettingsOpen, setIsSettingsOpen] = useState(false); const openSettings = () => { @@ -68,7 +68,14 @@ const NavigationComponent = ({ isDrawerOpen, setIsDrawerOpen, drawerParameter, s - + diff --git a/src/renderer/Search.scss b/src/renderer/Search.scss index fd2f2573..ed4c0148 100644 --- a/src/renderer/Search.scss +++ b/src/renderer/Search.scss @@ -1,6 +1,8 @@ @import "Variables.scss"; -#Search { +#Search { + height: 2.5em; + min-height: 2.5em; display: flex; flex: 1; .MuiTextField-root { diff --git a/src/renderer/Settings.js b/src/renderer/Settings.js index b0097ab9..9a10e9dc 100644 --- a/src/renderer/Settings.js +++ b/src/renderer/Settings.js @@ -4,7 +4,7 @@ import './Settings.scss'; const store = window.electron.store; -const Settings = ({ isOpen, onClose, colorTheme, setColorTheme }) => { +const Settings = ({ isOpen, onClose, colorTheme, setColorTheme, showFileTabs, setShowFileTabs }) => { const [appendCreationDate, setAppendCreationDate] = useState(store.get('appendCreationDate')); const [convertRelativeToAbsoluteDates, setConvertRelativeToAbsoluteDates] = useState(store.get('convertRelativeToAbsoluteDates')); const [notificationsAllowed, setNotificationsAllowed] = useState(store.get('notificationsAllowed')); @@ -28,6 +28,10 @@ const Settings = ({ isOpen, onClose, colorTheme, setColorTheme }) => { store.set(name, event.target.value); setColorTheme(event.target.value); break; + case 'showFileTabs': + store.set(name, checked); + setShowFileTabs(checked); + break; default: break; } @@ -56,6 +60,10 @@ const Settings = ({ isOpen, onClose, colorTheme, setColorTheme }) => { control={} label="Send notification when due date is today or tomorrow" /> + } + label="Show file tabs" + /> Theme