feat: update logo (#401)

* style: update logo

* feat: use both desktop and dashboard logo

* test: remove App.test

* build: fix depcheck
This commit is contained in:
Cafe137 authored and GitHub committed 2022-06-20 12:06:08 +02:00
1 parent 127d44fd7a
commit 36fc4bfe98
5 files changed
+17 -25

No files matched your search

+1
View File
@@ -1,5 +1,6 @@
{ {
"ignores": [ "ignores": [
"@testing-library/react",
"@types/*", "@types/*",
"@commitlint/config-conventional", "@commitlint/config-conventional",
"@babel/*", "@babel/*",
-23
View File
@@ -1,23 +0,0 @@
import { render } from '@testing-library/react'
import App from './App'
// Mocks methods that are not implemented in JSDOM
// see https://jestjs.io/docs/manual-mocks#mocking-methods-which-are-not-implemented-in-jsdom
Object.defineProperty(window, 'matchMedia', {
writable: true,
value: jest.fn().mockImplementation(query => ({
matches: false,
media: query,
onchange: null,
addListener: jest.fn(), // deprecated
removeListener: jest.fn(), // deprecated
addEventListener: jest.fn(),
removeEventListener: jest.fn(),
dispatchEvent: jest.fn(),
})),
})
// TODO: this is not a good test and should be removed. Keeping it in to make sure the whole app renders (to be used in CI)
test('should render the app', () => {
render(<App />)
})
File renamed without changes.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

+11
View File
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="150px" height="31px" viewBox="0 0 150 31" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Swarm Dashboard logo Copy 7</title>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Swarm-Dashboard-logo-Copy-7" transform="translate(0.000000, 0.500000)">
<rect id="bouding-box" x="0" y="0" width="150" height="30"></rect>
<g id="DESKTOP" transform="translate(142.934301, 11.030000)"></g>
<path d="M89.0093009,11.03 L91.9343009,11.03 C93.2043009,11.03 94.1568009,11.47 94.7918009,12.35 C95.4268009,13.23 95.7443009,14.535 95.7443009,16.265 C95.7443009,17.995 95.4268009,19.3 94.7918009,20.18 C94.1568009,21.06 93.2043009,21.5 91.9343009,21.5 L89.0093009,21.5 L89.0093009,11.03 Z M91.8743009,20.405 C92.6943009,20.405 93.3218009,20.115 93.7568009,19.535 C94.1918009,18.955 94.4093009,18.135 94.4093009,17.075 L94.4093009,15.455 C94.4093009,14.395 94.1918009,13.575 93.7568009,12.995 C93.3218009,12.415 92.6943009,12.125 91.8743009,12.125 L90.2693009,12.125 L90.2693009,20.405 L91.8743009,20.405 Z M97.9343009,21.5 L97.9343009,11.03 L104.384301,11.03 L104.384301,12.125 L99.1943009,12.125 L99.1943009,15.65 L104.204301,15.65 L104.204301,16.745 L99.1943009,16.745 L99.1943009,20.405 L104.384301,20.405 L104.384301,21.5 L97.9343009,21.5 Z M110.054301,21.68 C109.164301,21.68 108.414301,21.5175 107.804301,21.1925 C107.194301,20.8675 106.679301,20.415 106.259301,19.835 L107.174301,19.085 C107.584301,19.605 108.019301,19.9875 108.479301,20.2325 C108.939301,20.4775 109.479301,20.6 110.099301,20.6 C110.849301,20.6 111.426801,20.425 111.831801,20.075 C112.236801,19.725 112.439301,19.235 112.439301,18.605 C112.439301,18.085 112.289301,17.685 111.989301,17.405 C111.689301,17.125 111.189301,16.925 110.489301,16.805 L109.319301,16.61 C108.359301,16.45 107.669301,16.1175 107.249301,15.6125 C106.829301,15.1075 106.619301,14.49 106.619301,13.76 C106.619301,12.82 106.929301,12.1 107.549301,11.6 C108.169301,11.1 109.024301,10.85 110.114301,10.85 C110.924301,10.85 111.621801,10.9875 112.206801,11.2625 C112.791801,11.5375 113.264301,11.935 113.624301,12.455 L112.739301,13.22 C112.419301,12.8 112.051801,12.48 111.636801,12.26 C111.221801,12.04 110.709301,11.93 110.099301,11.93 C109.389301,11.93 108.844301,12.0825 108.464301,12.3875 C108.084301,12.6925 107.894301,13.14 107.894301,13.73 C107.894301,14.22 108.041801,14.61 108.336801,14.9 C108.631801,15.19 109.139301,15.395 109.859301,15.515 L110.984301,15.71 C111.954301,15.88 112.651801,16.215 113.076801,16.715 C113.501801,17.215 113.714301,17.835 113.714301,18.575 C113.714301,19.215 113.571801,19.7675 113.286801,20.2325 C113.001801,20.6975 112.584301,21.055 112.034301,21.305 C111.484301,21.555 110.824301,21.68 110.054301,21.68 Z M118.619301,16.37 L117.119301,18.14 L117.119301,21.5 L115.859301,21.5 L115.859301,11.03 L117.119301,11.03 L117.119301,16.49 L117.164301,16.49 L118.544301,14.75 L121.634301,11.03 L123.149301,11.03 L119.474301,15.44 L123.254301,21.5 L121.784301,21.5 L118.619301,16.37 Z M128.714301,12.125 L128.714301,21.5 L127.454301,21.5 L127.454301,12.125 L123.959301,12.125 L123.959301,11.03 L132.209301,11.03 L132.209301,12.125 L128.714301,12.125 Z M137.084301,21.68 C135.834301,21.68 134.911801,21.2175 134.316801,20.2925 C133.721801,19.3675 133.424301,18.025 133.424301,16.265 C133.424301,14.505 133.721801,13.1625 134.316801,12.2375 C134.911801,11.3125 135.834301,10.85 137.084301,10.85 C138.334301,10.85 139.256801,11.3125 139.851801,12.2375 C140.446801,13.1625 140.744301,14.505 140.744301,16.265 C140.744301,18.025 140.446801,19.3675 139.851801,20.2925 C139.256801,21.2175 138.334301,21.68 137.084301,21.68 Z M137.084301,20.585 C137.884301,20.585 138.471801,20.2825 138.846801,19.6775 C139.221801,19.0725 139.409301,18.22 139.409301,17.12 L139.409301,15.41 C139.409301,14.31 139.221801,13.4575 138.846801,12.8525 C138.471801,12.2475 137.884301,11.945 137.084301,11.945 C136.284301,11.945 135.696801,12.2475 135.321801,12.8525 C134.946801,13.4575 134.759301,14.31 134.759301,15.41 L134.759301,17.12 C134.759301,18.22 134.946801,19.0725 135.321801,19.6775 C135.696801,20.2825 136.284301,20.585 137.084301,20.585 Z M142.934301,21.5 L142.934301,11.03 L146.744301,11.03 C147.704301,11.03 148.441801,11.295 148.956801,11.825 C149.471801,12.355 149.729301,13.095 149.729301,14.045 C149.729301,14.995 149.471801,15.735 148.956801,16.265 C148.441801,16.795 147.704301,17.06 146.744301,17.06 L144.194301,17.06 L144.194301,21.5 L142.934301,21.5 Z M144.194301,15.965 L146.714301,15.965 C147.244301,15.965 147.656801,15.8325 147.951801,15.5675 C148.246801,15.3025 148.394301,14.925 148.394301,14.435 L148.394301,13.655 C148.394301,13.165 148.246801,12.7875 147.951801,12.5225 C147.656801,12.2575 147.244301,12.125 146.714301,12.125 L144.194301,12.125 L144.194301,15.965 Z M46.6161218,11.3030413 L45.3492761,20.1247496 L45.3237798,20.1247496 L44.2146922,11.3030413 L41.0579357,11.3030413 L39.9440676,20.1247496 L39.9201648,20.1247496 L38.6533191,11.3030413 L36.7267574,11.3030413 L38.2995584,21.5174832 L41.4483473,21.5174832 L42.6116145,12.7133036 L42.6355172,12.7133036 L43.7860362,21.5206702 L46.9380122,21.5206702 L48.544277,11.3094154 L46.6224959,11.3094154 C46.6224959,11.3094154 46.6161218,11.2807321 46.6161218,11.3030413 M80.1040339,11.0127026 C79.1495174,10.9728647 78.2619286,11.4987252 77.8380532,12.3544436 C77.7089783,11.9863413 77.4779184,11.6612639 77.1735567,11.4174558 C76.8006738,11.1369969 76.34Line truncated
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

+5 -2
View File
@@ -5,8 +5,10 @@ import { OpenInNewSharp } from '@material-ui/icons'
import { ReactElement, useContext } from 'react' import { ReactElement, useContext } from 'react'
import { BookOpen, Briefcase, DollarSign, FileText, Home, Settings } from 'react-feather' import { BookOpen, Briefcase, DollarSign, FileText, Home, Settings } from 'react-feather'
import { Link } from 'react-router-dom' import { Link } from 'react-router-dom'
import Logo from '../assets/logo.svg' import DashboardLogo from '../assets/dashboard-logo.svg'
import DesktopLogo from '../assets/desktop-logo.svg'
import { config } from '../config' import { config } from '../config'
import { useIsBeeDesktop } from '../hooks/apiHooks'
import { Context } from '../providers/Bee' import { Context } from '../providers/Bee'
import { ROUTES } from '../routes' import { ROUTES } from '../routes'
import SideBarItem from './SideBarItem' import SideBarItem from './SideBarItem'
@@ -96,13 +98,14 @@ const useStyles = makeStyles((theme: Theme) =>
export default function SideBar(): ReactElement { export default function SideBar(): ReactElement {
const classes = useStyles() const classes = useStyles()
const { nodeInfo } = useContext(Context) const { nodeInfo } = useContext(Context)
const { isBeeDesktop } = useIsBeeDesktop()
return ( return (
<Drawer className={classes.drawer} variant="permanent" anchor="left" classes={{ paper: classes.drawerPaper }}> <Drawer className={classes.drawer} variant="permanent" anchor="left" classes={{ paper: classes.drawerPaper }}>
<Grid container direction="column" justifyContent="space-between" className={classes.root}> <Grid container direction="column" justifyContent="space-between" className={classes.root}>
<Grid className={classes.logo}> <Grid className={classes.logo}>
<Link to={ROUTES.INFO}> <Link to={ROUTES.INFO}>
<img alt="swarm" src={Logo} /> <img alt="swarm" src={isBeeDesktop ? DesktopLogo : DashboardLogo} />
</Link> </Link>
</Grid> </Grid>
<Grid> <Grid>