Skip to content

Commit

Permalink
Update app menu (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
rkclark authored Sep 23, 2021
1 parent 22c4f2d commit a4567fc
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 13 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 Rick Clark
Copyright (c) 2021 Rick Clark

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
10 changes: 10 additions & 0 deletions public/electronHelpers/menuTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,14 @@ module.exports = [
{ role: 'resetzoom' },
],
},
{
label: 'Developer',
submenu: [
{
label: 'Toggle dev tools',
role: 'toggleDevTools',
accelerator: 'Alt+CmdOrCtrl+I',
},
],
},
];
7 changes: 6 additions & 1 deletion src/components/Layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ export function Layout({ data, error, location }) {
);
};

return <div className={style.layout}>{renderContent()}</div>;
return (
<div className={style.layout}>
<div className={style.dragArea} />
{renderContent()}
</div>
);
}

Layout.propTypes = {
Expand Down
10 changes: 10 additions & 0 deletions src/components/Layout/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,13 @@
.routeContainer {
padding: var(--spacing-3);
}

.dragArea {
position: fixed;
height: 2rem;
width: 100%;
top: 0;
left: 0;
-webkit-user-select: none;
-webkit-app-region: drag;
}
1 change: 0 additions & 1 deletion src/components/Nav/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import styles from './styles.css';
export default function Nav({ currentPath, currentUser }) {
return (
<div className={styles.header} id="header">
<div className={styles.draggable} />
<div className={styles.links}>
<div className={styles.linkContainer}>
<Link
Expand Down
10 changes: 0 additions & 10 deletions src/components/Nav/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,6 @@
height: 5.5rem;
}

.draggable {
position: absolute;
top: 0;
left: 0;
height: 2rem;
width: 100%;
-webkit-user-select: none;
-webkit-app-region: drag;
}

.links {
display: inline-flex;
flex-basis: 100%;
Expand Down

0 comments on commit a4567fc

Please sign in to comment.