Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/modals updated view #412

Merged
merged 6 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8,017 changes: 0 additions & 8,017 deletions build/assets/index-ced90478.js

This file was deleted.

7 changes: 3 additions & 4 deletions build/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,14 @@
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>Second Brain</title>
<script type="module" crossorigin src="/assets/index-ced90478.js"></script>
<link rel="stylesheet" href="/assets/index-516c5c0e.css">
<script type="module" crossorigin src="/assets/index-afdcb0cc.js"></script>
<link rel="stylesheet" href="/assets/index-516c5c0e.css" />
</head>
<body style="background: #000">
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!-- Add entry point 👇 -->



<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
Expand Down
10 changes: 10 additions & 0 deletions public/svg-icons/FilterOffIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 6 additions & 5 deletions src/components/App/MainToolbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ export const MainToolbar = () => {
const [setSecondarySidebarActiveTab] = useAppStore((s) => [s.setSecondarySidebarActiveTab])

const { open, setAddNodeModalData } = useModal('addNode')
const { open: openSourcesModal } = useModal('sourcesTable')

const handleOpenSidebar = (tab: SecondarySidebarActiveTab) => {
setSecondarySidebarActiveTab(tab)
}

const handleOpenModal = (data: AddNodeModalData) => {
const handleOpenAddingModal = (data: AddNodeModalData) => {
open()
setAddNodeModalData(data)
}
Expand All @@ -28,19 +29,19 @@ export const MainToolbar = () => {
<LogoButton onClick={() => handleOpenSidebar('about')}>
<img alt="Second brain" src="logo.svg" />
</LogoButton>
<ActionButton onClick={() => handleOpenModal('content')}>
<ActionButton onClick={() => handleOpenAddingModal('content')}>
<IconWrapper>
<AddContentIcon />
</IconWrapper>
<Text>Add Content</Text>
</ActionButton>
<ActionButton onClick={() => handleOpenModal('source')}>
<ActionButton onClick={() => handleOpenAddingModal('source')}>
<IconWrapper>
<AddSourceIcon />
</IconWrapper>
<Text>Add Source</Text>
</ActionButton>
<ActionButton id="cy-open-soure-table" onClick={() => handleOpenSidebar('sources')}>
<ActionButton id="cy-open-soure-table" onClick={openSourcesModal}>
<IconWrapper>
<SourcesTableIcon />
</IconWrapper>
Expand All @@ -52,7 +53,7 @@ export const MainToolbar = () => {
</IconWrapper>
<Text>Sentiment Data</Text>
</ActionButton>
{/* <ActionButton onClick={() => changeGraphType()}>
{/* <ActionButton onClick={() => openSourcesModal()}>
<IconWrapper>
<SettingsIcon />
</IconWrapper>
Expand Down
1 change: 1 addition & 0 deletions src/components/App/Providers/MuiButton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export const MuiButton = {
'&.MuiButton-sizeSmall': {
padding: '7px 16px',
fontSize: '11px',
lineHeight: '14px',
fontWeight: 500,
},
'&.MuiButton-sizeLarge': {
Expand Down
1 change: 1 addition & 0 deletions src/components/App/Providers/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const appTheme = createTheme({
typography: {
button: {
textTransform: 'none',
whiteSpace: 'nowrap',
},
},
breakpoints: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/App/SecondarySidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import styled from 'styled-components'
import { Flex } from '~/components/common/Flex'
import { SecondarySidebarActiveTab, useAppStore } from '~/stores/useAppStore'
import { colors } from '~/utils/colors'
import { SourcesView } from '../../SourcesTableModal/SourcesView'
import { About } from './About'
import { Sentiment } from './Sentiment'
import { SourcesView } from './SourcesView'

export const MENU_WIDTH = 600

Expand Down
2 changes: 2 additions & 0 deletions src/components/App/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { GraphData } from '~/types'
import { colors } from '~/utils/colors'
import { E2ETests } from '~/utils/tests'
import version from '~/utils/versionHelper'
import { SourcesTableModal } from '../SourcesTableModal'
import { Preloader } from '../Universe/Preloader'
import { ActionsToolbar } from './ActionsToolbar'
import { AppBar } from './AppBar'
Expand Down Expand Up @@ -156,6 +157,7 @@ export const App = () => {
<Toasts />

<BudgetExplanationModal />
<SourcesTableModal />
<Helper />
</Wrapper>
<E2ETests />
Expand Down
23 changes: 18 additions & 5 deletions src/components/Icons/AddContentIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
/* eslint-disable */
import React from 'react'
import React from 'react';

const AddContentIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
<svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<mask id="mask0_1259_25" maskUnits="userSpaceOnUse" x="0" y="0" width="24" height="24">
<svg
width="1em"
height="1em"
viewBox="0 0 24 24"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
>
<mask
id="mask0_1259_25"
maskUnits="userSpaceOnUse"
x="0"
y="0"
width="24"
height="24"
>
<rect width="1em" height="1em" fill="currentColor" />
</mask>
<g mask="url(#mask0_1259_25)">
Expand All @@ -13,6 +26,6 @@ const AddContentIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
/>
</g>
</svg>
)
);

export default AddContentIcon
export default AddContentIcon;
23 changes: 18 additions & 5 deletions src/components/Icons/AddSourceIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
/* eslint-disable */
import React from 'react'
import React from 'react';

const AddSourceIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
<svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<mask id="mask0_1259_27" maskUnits="userSpaceOnUse" x="0" y="0" width="24" height="24">
<svg
width="1em"
height="1em"
viewBox="0 0 24 24"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
>
<mask
id="mask0_1259_27"
maskUnits="userSpaceOnUse"
x="0"
y="0"
width="24"
height="24"
>
<rect width="1em" height="1em" fill="currentColor" />
</mask>
<g mask="url(#mask0_1259_27)">
Expand All @@ -13,6 +26,6 @@ const AddSourceIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
/>
</g>
</svg>
)
);

export default AddSourceIcon
export default AddSourceIcon;
23 changes: 18 additions & 5 deletions src/components/Icons/AudioIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
/* eslint-disable */
import React from 'react'
import React from 'react';

const AudioIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
<svg width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<svg
width="1em"
height="1em"
viewBox="0 0 16 16"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
>
<g id="Audio">
<mask id="mask0_1506_147" maskUnits="userSpaceOnUse" x="0" y="0" width="16" height="16">
<mask
id="mask0_1506_147"
maskUnits="userSpaceOnUse"
x="0"
y="0"
width="16"
height="16"
>
<rect id="Bounding box" width="1em" height="1em" fill="currentColor" />
</mask>
<g mask="url(#mask0_1506_147)">
Expand All @@ -16,6 +29,6 @@ const AudioIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
</g>
</g>
</svg>
)
);

export default AudioIcon
export default AudioIcon;
14 changes: 10 additions & 4 deletions src/components/Icons/BoostIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
/* eslint-disable */
import React from 'react'
import React from 'react';

const BoostIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
<svg width="1em" height="1em" viewBox="0 0 9 9" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<svg
width="1em"
height="1em"
viewBox="0 0 9 9"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
>
<path
id="Icon"
fill-rule="evenodd"
Expand All @@ -11,6 +17,6 @@ const BoostIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
fill="currentColor"
/>
</svg>
)
);

export default BoostIcon
export default BoostIcon;
23 changes: 18 additions & 5 deletions src/components/Icons/BrowseGalleryIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
/* eslint-disable */
import React from 'react'
import React from 'react';

const BrowseGalleryIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
<svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<svg
width="1em"
height="1em"
viewBox="0 0 24 24"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
>
<g id="browse_gallery">
<mask id="mask0_1360_27257" maskUnits="userSpaceOnUse" x="0" y="0" width="24" height="24">
<mask
id="mask0_1360_27257"
maskUnits="userSpaceOnUse"
x="0"
y="0"
width="24"
height="24"
>
<rect id="Bounding box" width="1em" height="1em" fill="currentColor" />
</mask>
<g mask="url(#mask0_1360_27257)">
Expand All @@ -16,6 +29,6 @@ const BrowseGalleryIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
</g>
</g>
</svg>
)
);

export default BrowseGalleryIcon
export default BrowseGalleryIcon;
23 changes: 18 additions & 5 deletions src/components/Icons/BubbleChartIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
/* eslint-disable */
import React from 'react'
import React from 'react';

const BubbleChartIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
<svg width="1em" height="1em" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<svg
width="1em"
height="1em"
viewBox="0 0 20 20"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
>
<g id="bubble_chart">
<mask id="mask0_1551_42" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="20">
<mask
id="mask0_1551_42"
maskUnits="userSpaceOnUse"
x="0"
y="0"
width="20"
height="20"
>
<rect id="Bounding box" width="1em" height="1em" fill="currentColor" />
</mask>
<g mask="url(#mask0_1551_42)">
Expand All @@ -16,6 +29,6 @@ const BubbleChartIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
</g>
</g>
</svg>
)
);

export default BubbleChartIcon
export default BubbleChartIcon;
23 changes: 18 additions & 5 deletions src/components/Icons/CancelIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
/* eslint-disable */
import React from 'react'
import React from 'react';

const CancelIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
<svg width="1em" height="1em" viewBox="0 0 32 32" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<svg
width="1em"
height="1em"
viewBox="0 0 32 32"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
>
<g id="cancel">
<mask id="mask0_1264_3381" maskUnits="userSpaceOnUse" x="0" y="0" width="32" height="32">
<mask
id="mask0_1264_3381"
maskUnits="userSpaceOnUse"
x="0"
y="0"
width="32"
height="32"
>
<rect id="Bounding box" width="1em" height="1em" fill="currentColor" />
</mask>
<g mask="url(#mask0_1264_3381)">
Expand All @@ -16,6 +29,6 @@ const CancelIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
</g>
</g>
</svg>
)
);

export default CancelIcon
export default CancelIcon;
23 changes: 18 additions & 5 deletions src/components/Icons/ChevronLeftIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
/* eslint-disable */
import React from 'react'
import React from 'react';

const ChevronLeftIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
<svg width="1em" height="1em" viewBox="0 0 18 18" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<svg
width="1em"
height="1em"
viewBox="0 0 18 18"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
>
<g id="keyboard_arrow_left">
<mask id="mask0_1428_267" maskUnits="userSpaceOnUse" x="0" y="0" width="18" height="18">
<mask
id="mask0_1428_267"
maskUnits="userSpaceOnUse"
x="0"
y="0"
width="18"
height="18"
>
<path id="Bounding box" d="M0 0H18V18H0V0Z" fill="currentColor" />
</mask>
<g mask="url(#mask0_1428_267)">
Expand All @@ -16,6 +29,6 @@ const ChevronLeftIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
</g>
</g>
</svg>
)
);

export default ChevronLeftIcon
export default ChevronLeftIcon;
Loading