Skip to content

Commit a4567fc

Browse files
authored
Update app menu (#138)
1 parent 22c4f2d commit a4567fc

File tree

6 files changed

+27
-13
lines changed

6 files changed

+27
-13
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018 Rick Clark
3+
Copyright (c) 2021 Rick Clark
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

public/electronHelpers/menuTemplate.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,14 @@ module.exports = [
4949
{ role: 'resetzoom' },
5050
],
5151
},
52+
{
53+
label: 'Developer',
54+
submenu: [
55+
{
56+
label: 'Toggle dev tools',
57+
role: 'toggleDevTools',
58+
accelerator: 'Alt+CmdOrCtrl+I',
59+
},
60+
],
61+
},
5262
];

src/components/Layout/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,12 @@ export function Layout({ data, error, location }) {
3434
);
3535
};
3636

37-
return <div className={style.layout}>{renderContent()}</div>;
37+
return (
38+
<div className={style.layout}>
39+
<div className={style.dragArea} />
40+
{renderContent()}
41+
</div>
42+
);
3843
}
3944

4045
Layout.propTypes = {

src/components/Layout/style.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,13 @@
1010
.routeContainer {
1111
padding: var(--spacing-3);
1212
}
13+
14+
.dragArea {
15+
position: fixed;
16+
height: 2rem;
17+
width: 100%;
18+
top: 0;
19+
left: 0;
20+
-webkit-user-select: none;
21+
-webkit-app-region: drag;
22+
}

src/components/Nav/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import styles from './styles.css';
99
export default function Nav({ currentPath, currentUser }) {
1010
return (
1111
<div className={styles.header} id="header">
12-
<div className={styles.draggable} />
1312
<div className={styles.links}>
1413
<div className={styles.linkContainer}>
1514
<Link

src/components/Nav/styles.css

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,6 @@
1313
height: 5.5rem;
1414
}
1515

16-
.draggable {
17-
position: absolute;
18-
top: 0;
19-
left: 0;
20-
height: 2rem;
21-
width: 100%;
22-
-webkit-user-select: none;
23-
-webkit-app-region: drag;
24-
}
25-
2616
.links {
2717
display: inline-flex;
2818
flex-basis: 100%;

0 commit comments

Comments
 (0)