Skip to content

Commit

Permalink
Merge pull request #48 from KSJaay/v0.5.4
Browse files Browse the repository at this point in the history
v0.5.4 - Cleaning up and moving to canvasjs
  • Loading branch information
KSJaay authored Aug 6, 2024
2 parents e251d97 + 2f1ae85 commit e6a6cdb
Show file tree
Hide file tree
Showing 66 changed files with 689 additions and 1,886 deletions.
9 changes: 3 additions & 6 deletions app/components/home/menu/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ import { observer } from 'mobx-react-lite';

// import local files
import Button from '../../ui/button';

// import icons
import FaPlus from '../../icons/faPlus';
import FaReload from '../../icons/faReload';
import { FaPlus, IoReload } from '../../icons';
import MenuLayoutDropdown from './layout';
import MenuStatusDropdown from './status';
import SearchBar from '../../ui/searchBar';
Expand All @@ -30,7 +27,7 @@ const HomeMenu = ({ handleReset, search, setSearch }) => {

<div className="home-menu-buttons">
<Button
iconLeft={<FaReload width={20} height={20} />}
iconLeft={<IoReload style={{ width: '20px', height: '20px' }} />}
onClick={handleReset}
/>

Expand All @@ -49,7 +46,7 @@ const HomeMenu = ({ handleReset, search, setSearch }) => {
false
)
}
iconLeft={<FaPlus width={20} height={20} />}
iconLeft={<FaPlus style={{ width: '20px', height: '20px' }} />}
color={'primary'}
>
New
Expand Down
19 changes: 9 additions & 10 deletions app/components/home/menu/layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,24 @@
import useDropdown from '../../../hooks/useDropdown';
import Dropdown from '../../ui/dropdown';
import Button from '../../ui/button';

// import icons
import BsTable from '../../icons/bsTable';
import IoGrid from '../../icons/ioGrid';
import PiListFill from '../../icons/piListFill';
import FiLayout from '../../icons/fiLayout';
import { BsTable, IoGrid, FaBars, FiLayout } from '../../icons';
import useLocalStorageContext from '../../../hooks/useLocalstorage';

const views = [
{
text: 'Cards',
id: 'cards',
icon: <IoGrid width={20} height={20} />,
icon: <IoGrid style={{ width: '20px', height: '20px' }} />,
},
{
text: 'List',
id: 'list',
icon: <BsTable width={20} height={20} />,
icon: <BsTable style={{ width: '20px', height: '20px' }} />,
},
{
text: 'Compact',
id: 'compact',
icon: <PiListFill width={20} height={20} />,
icon: <FaBars style={{ width: '20px', height: '20px' }} />,
},
];

Expand Down Expand Up @@ -56,7 +51,11 @@ const MenuLayoutDropdown = () => {
id="home-menu-layout"
>
<Dropdown.Trigger isOpen={dropdownIsOpen} toggleDropdown={toggleDropdown}>
<Button iconLeft={<FiLayout width={20} height={20} />}>Layout</Button>
<Button
iconLeft={<FiLayout style={{ width: '20px', height: '20px' }} />}
>
Layout
</Button>
</Dropdown.Trigger>
<Dropdown.List isOpen={dropdownIsOpen}>{dropdownItems}</Dropdown.List>
</Dropdown.Container>
Expand Down
2 changes: 1 addition & 1 deletion app/components/home/menu/mobile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const HomeMenuMobile = ({ handleReset }) => {
toggleDropdown={toggleDropdown}
style={{ height: '45px' }}
>
<FaEllipsisVertical height={30} width={30} />
<FaEllipsisVertical style={{ width: '30px', height: '30px' }} />
</Dropdown.Trigger>
<Dropdown.List isOpen={dropdownIsOpen}>
<Dropdown.Item
Expand Down
18 changes: 9 additions & 9 deletions app/components/home/menu/status.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,24 @@
import useDropdown from '../../../hooks/useDropdown';
import Dropdown from '../../ui/dropdown';
import Button from '../../ui/button';

// import icons
import HiStatusOffline from '../../icons/hiStatusOffline';
import HiStatusOnline from '../../icons/hiStatusOnline';
import PiListFill from '../../icons/piListFill';
import { HiStatusOffline, HiStatusOnline, FaBars } from '../../icons';
import useLocalStorageContext from '../../../hooks/useLocalstorage';

const statusOptions = [
{
text: 'All',
id: 'all',
icon: <PiListFill width={20} height={20} />,
icon: <FaBars style={{ width: '20px', height: '20px' }} />,
},
{
text: 'Up',
id: 'up',
icon: <HiStatusOnline width={20} height={20} />,
icon: <HiStatusOnline style={{ width: '20px', height: '20px' }} />,
},
{
text: 'Down',
id: 'down',
icon: <HiStatusOffline width={20} height={20} />,
icon: <HiStatusOffline style={{ width: '20px', height: '20px' }} />,
},
];

Expand Down Expand Up @@ -54,7 +50,11 @@ const MenuStatusDropdown = () => {
id="home-menu-status"
>
<Dropdown.Trigger isOpen={dropdownIsOpen} toggleDropdown={toggleDropdown}>
<Button iconLeft={<HiStatusOnline width={20} height={20} />}>
<Button
iconLeft={
<HiStatusOnline style={{ width: '20px', height: '20px' }} />
}
>
Status
</Button>
</Dropdown.Trigger>
Expand Down
8 changes: 3 additions & 5 deletions app/components/home/monitor/options.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ import { toast } from 'react-toastify';
import MonitorModal from '../../modal/monitor/delete';
import Dropdown from '../../ui/dropdown/index';
import useContextStore from '../../../context';
import { createGetRequest } from '../../../services/axios';

// import icons
import FaEllipsisVertical from '../../icons/faEllipsisVertical';
import useDropdown from '../../../hooks/useDropdown';
import { createGetRequest } from '../../../services/axios';
import MonitorConfigureModal from '../../modal/monitor/configure';
import { FaEllipsisVertical } from '../../icons';

const MonitorOptions = ({ monitorId }) => {
const {
Expand Down Expand Up @@ -77,7 +75,7 @@ const MonitorOptions = ({ monitorId }) => {
toggleDropdown={toggleDropdown}
>
<Dropdown.Trigger toggleDropdown={toggleDropdown} isOpen={dropdownIsOpen}>
<FaEllipsisVertical width={20} height={20} />
<FaEllipsisVertical style={{ width: '20px', height: '20px' }} />
</Dropdown.Trigger>
<Dropdown.List isOpen={dropdownIsOpen}>
<Dropdown.Item onClick={handleOpen}>Open</Dropdown.Item>
Expand Down
25 changes: 0 additions & 25 deletions app/components/icons/bsTable.jsx

This file was deleted.

25 changes: 0 additions & 25 deletions app/components/icons/faCheck.jsx

This file was deleted.

25 changes: 0 additions & 25 deletions app/components/icons/faChevronDown.jsx

This file was deleted.

25 changes: 0 additions & 25 deletions app/components/icons/faChevronLeft.jsx

This file was deleted.

25 changes: 0 additions & 25 deletions app/components/icons/faChevronRight.jsx

This file was deleted.

25 changes: 0 additions & 25 deletions app/components/icons/faChevronUp.jsx

This file was deleted.

30 changes: 0 additions & 30 deletions app/components/icons/faCircleCheck.jsx

This file was deleted.

25 changes: 0 additions & 25 deletions app/components/icons/faClose.jsx

This file was deleted.

25 changes: 0 additions & 25 deletions app/components/icons/faCog.jsx

This file was deleted.

Loading

0 comments on commit e6a6cdb

Please sign in to comment.