diff --git a/assets/icons/apppasswordicon.svg b/assets/icons/apppasswordicon.svg new file mode 100644 index 0000000..d74a6e7 --- /dev/null +++ b/assets/icons/apppasswordicon.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/components/Dashboard/Management/AppPasswords.jsx b/src/components/Dashboard/Management/AppPasswords.jsx new file mode 100644 index 0000000..b9d31ef --- /dev/null +++ b/src/components/Dashboard/Management/AppPasswords.jsx @@ -0,0 +1,99 @@ +import { useRef, useState } from 'react' +import { Button, Flex, Space, Modal, Dropdown } from 'antd' +import NewAppPassword from './AppPasswords/NewAppPassword' +import useColumnVisibility from '../hooks/useColumnVisibility' +import ColumnViewButton from '../common/ColumnViewButton' +import ObjectTable from '../common/ObjectTable' +import PlusIcon from '../../Icons/PlusIcon' +import ReloadIcon from '../../Icons/ReloadIcon' +import ListIcon from '../../Icons/ListIcon' +import GridIcon from '../../Icons/GridIcon' +import useViewMode from '../hooks/useViewMode' +import ExportListButton from '../common/ExportListButton' + +const AppPasswords = () => { + const [newAppPasswordOpen, setNewAppPasswordOpen] = useState(false) + const tableRef = useRef() + + const [viewMode, setViewMode] = useViewMode('appPassword') + const [columnVisibility, setColumnVisibility] = + useColumnVisibility('appPassword') + + const actionItems = { + items: [ + { + label: 'New App Password', + key: 'newAppPassword', + icon: + }, + { type: 'divider' }, + { + label: 'Reload List', + key: 'reloadList', + icon: + } + ], + onClick: ({ key }) => { + if (key === 'reloadList') { + tableRef.current?.reload() + } else if (key === 'newAppPassword') { + setNewAppPasswordOpen(true) + } + } + } + + return ( + <> + + + + + + + + + + +