Skip to content

Commit 071c875

Browse files
committed
Adding new settings modal and UI changes for Logs
1 parent 3e387af commit 071c875

14 files changed

Lines changed: 19319 additions & 157 deletions

File tree

package-lock.json

Lines changed: 18761 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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"@emotion/styled": "^11.11.0",
4646
"@headlessui/react": "^1.7.18",
4747
"@heroicons/react": "^2.1.1",
48+
"@hookform/resolvers": "^3.7.0",
4849
"@testing-library/jest-dom": "^5.17.0",
4950
"@testing-library/react": "^13.4.0",
5051
"@testing-library/user-event": "^13.5.0",
@@ -53,6 +54,7 @@
5354
"autoprefixer": "^10.4.18",
5455
"axios": "^1.5.1",
5556
"codemirror": "^6.0.1",
57+
"date-fns": "^3.6.0",
5658
"eslint-import-resolver-alias": "^1.1.2",
5759
"eslint-plugin-import": "^2.29.1",
5860
"immer": "^10.0.4",
@@ -65,6 +67,7 @@
6567
"react-custom-scrollbars": "^4.2.1",
6668
"react-dom": "^18.2.0",
6769
"react-edit-text": "^5.1.1",
70+
"react-hook-form": "^7.52.0",
6871
"react-icons": "^5.0.1",
6972
"react-json-view-lite": "^1.4.0",
7073
"react-perfect-scrollbar": "^1.5.8",
@@ -79,10 +82,12 @@
7982
"tailwindcss": "^3.4.1",
8083
"typescript": "4",
8184
"web-vitals": "^2.1.4",
85+
"zod": "^3.23.8",
8286
"zustand": "^4.5.2"
8387
},
8488
"devDependencies": {
8589
"@changesets/cli": "^2.27.1",
90+
"@tailwindcss/forms": "^0.5.7",
8691
"@tailwindcss/typography": "^0.5.10",
8792
"@types/node": "20.11.5",
8893
"daisyui": "^4.7.2",

pnpm-lock.yaml

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

src/components/molecules/flow/nodes/AuthNode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const AuthNode = ({ id, data }) => {
6262
leaveFrom='opacity-100'
6363
leaveTo='opacity-0'
6464
>
65-
<Listbox.Options className='absolute w-full py-1 mt-1 overflow-auto text-base bg-white max-h-60 focus:outline-none'>
65+
<Listbox.Options className='absolute z-10 w-full py-1 mt-1 overflow-auto text-base bg-white max-h-60 focus:outline-none'>
6666
<Listbox.Option
6767
className={({ active }) =>
6868
`relative cursor-default select-none py-2 pl-10 pr-4 hover:font-semibold ${

src/components/molecules/footers/MainFooter.js

Lines changed: 33 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,45 @@
1-
import React from 'react';
2-
import { ArrowLeftEndOnRectangleIcon, ArrowRightStartOnRectangleIcon } from '@heroicons/react/24/outline';
1+
import React, { useState } from 'react';
2+
import {
3+
ArrowLeftEndOnRectangleIcon,
4+
ArrowRightStartOnRectangleIcon,
5+
Cog8ToothIcon,
6+
} from '@heroicons/react/24/outline';
7+
38
import Tippy from '@tippyjs/react';
49
import useNavigationStore from 'stores/AppNavBarStore';
510
import useCollectionStore from 'stores/CollectionStore';
11+
import SettingsModal from '../modals/SettingsModal';
612

713
const MainFooter = () => {
814
const collections = useCollectionStore((state) => state.collections);
915
const isNavBarCollapsed = useNavigationStore((state) => state.collapseNavBar);
1016
const updateNavCollapseState = useNavigationStore((state) => state.setNavCollapseState);
17+
const [openSettingsModal, setOpenSettingsModal] = useState(false);
1118
return (
1219
<footer className='flex items-center justify-between px-4 py-3 text-xs'>
13-
<label className='swap swap-rotate cursor-pointer py-1'>
14-
<input
15-
type='checkbox'
16-
onClick={(event) => {
17-
if (collections.length) {
18-
// since default is false for isNavBarCollapsed
19-
updateNavCollapseState(!isNavBarCollapsed);
20-
} else {
21-
event.preventDefault();
22-
event.stopPropagation();
23-
}
24-
}}
25-
/>
26-
<ArrowRightStartOnRectangleIcon className='swap-on h-6 w-6' />
27-
<ArrowLeftEndOnRectangleIcon className='swap-off h-6 w-6' />
28-
</label>
20+
<div className='flex items-center justify-between gap-2'>
21+
<button onClick={() => setOpenSettingsModal(true)}>
22+
<Cog8ToothIcon className='w-6 h-6' />
23+
</button>
24+
<label className='py-1 cursor-pointer swap swap-rotate'>
25+
<input
26+
// Overriding styles as Daisy UI input and React Hook form's input were conflicting
27+
className='!focus:outline-none !focus:ring-0 !appearance-none !border-0 !bg-transparent !bg-none !outline-none'
28+
type='checkbox'
29+
onClick={(event) => {
30+
if (collections.length) {
31+
// since default is false for isNavBarCollapsed
32+
updateNavCollapseState(!isNavBarCollapsed);
33+
} else {
34+
event.preventDefault();
35+
event.stopPropagation();
36+
}
37+
}}
38+
/>
39+
<ArrowRightStartOnRectangleIcon className='w-6 h-6 swap-on' />
40+
<ArrowLeftEndOnRectangleIcon className='w-6 h-6 swap-off' />
41+
</label>
42+
</div>
2943
<div className='flex items-center justify-between gap-4 font-semibold'>
3044
<Tippy content='External Link' placement='top'>
3145
<a href='https://github.com/FlowTestAI/FlowTest' target='_blank' rel='noreferrer' className='link'>
@@ -62,6 +76,7 @@ const MainFooter = () => {
6276
</a>
6377
</Tippy>
6478
</div>
79+
<SettingsModal closeFn={() => setOpenSettingsModal(false)} open={openSettingsModal} />
6580
</footer>
6681
);
6782
};

0 commit comments

Comments
 (0)