Skip to content

Commit

Permalink
insert logos into app, add static asset loader
Browse files Browse the repository at this point in the history
  • Loading branch information
aidenblinn committed Apr 12, 2022
1 parent 0319d1c commit 6f700d8
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/components/Launch.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
TextField,
} from '@mui/material';
import { ipcRenderer } from 'electron';
import Logo from '../assets/app-logo.png';

export default function Launch() {
const [brokers, setBrokers] = useState(1);
Expand Down Expand Up @@ -97,8 +98,7 @@ export default function Launch() {
return (
<center>
<div id="launch-header">
{/* logo placeholder */}
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/53/Wikimedia-logo.png/100px-Wikimedia-logo.png"></img>
<img src={Logo}></img>
</div>
<form style={{ padding: '0px 40px' }} onSubmit={handleSubmit}>
<h2>Cluster Broker Count</h2>
Expand Down Expand Up @@ -298,7 +298,7 @@ export default function Launch() {
<FormGroup sx={{ mb: 4 }}>
<FormControlLabel
control={<Checkbox name="log_info" />}
label="Alert me"
label="Email me about key cluster issues"
onChange={() => setEmailDisabled(!emailDisabled)}
/>
<TextField
Expand Down
8 changes: 3 additions & 5 deletions src/components/Sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
} from '@mui/material';
import { Equalizer, Home, Settings, TrendingUp } from '@mui/icons-material';
import { ipcRenderer } from 'electron';
import WhiteIcon from '../assets/white-icon.png';

export default function Sidebar() {
const handleShutdown = () => {
Expand All @@ -21,11 +22,8 @@ export default function Sidebar() {
return (
<Drawer id="sidebar" variant="permanent">
<center>
<img
id="main-logo"
src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/53/Wikimedia-logo.png/100px-Wikimedia-logo.png"
></img>
<h2>Kaffia</h2>
<img id="main-logo" src={WhiteIcon}></img>
<h2 style={{ marginTop: 0 }}>Kaffia</h2>
<Button sx={{ mb: 3 }} onClick={handleShutdown} variant="contained">
Stop Cluster
</Button>
Expand Down
12 changes: 8 additions & 4 deletions src/styles/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,25 @@ body::-webkit-scrollbar-thumb {
}

#launch-header {
height: 70px;
background-color: blue;
height: 90px;
background-color: white;
position: sticky;
z-index: 2;
top: 0;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}

#launch-header > img {
height: 70px;
}

#main-logo {
height: 100px;
width: 100px;
margin-top: 10px;
height: 150px;
width: 150px;
}

#loading {
Expand Down
6 changes: 6 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ module.exports = {
exclude: /node_modules/,
use: ['style-loader', 'css-loader', 'sass-loader'],
},
{
test: /\.(jpg|png|gif)$/,
use: {
loader: 'url-loader',
},
},
],
},
resolve: {
Expand Down

0 comments on commit 6f700d8

Please sign in to comment.