Skip to content

Commit 758ce68

Browse files
committed
Merging oslabs-beta staging to feature
2 parents f7be121 + 8505b24 commit 758ce68

36 files changed

+1342
-522
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Created by https://www.gitignore.io/api/node,linux,macos,windows,visualstudio,yarn
22
yarn.lock
33
package-lock.json
4+
.prettierrc.json
45
### Linux ###
56
*~
67

electron-builder.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ linux:
77
target:
88
- AppImage
99
- deb
10-
maintainer: spincycle01@yahoo.com
10+
maintainer: sean.sadykoff@gmail.com
1111
mac:
1212
category: public.app-category.developer-tools
1313
target: dmg
@@ -29,4 +29,4 @@ dmg:
2929
'y': 150
3030
type: link
3131
path: /Applications
32-
electronVersion: 2.0.7
32+
electronVersion: 3.0.0

main.js

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,16 @@ function openFile() {
4141
mainWindow.webContents.send('new-file', file);
4242
}
4343

44+
//functions to replace the default behavior of undo and redo
45+
function undo() {
46+
mainWindow.webContents.send('undo');
47+
}
48+
49+
function redo() {
50+
mainWindow.webContents.send('redo');
51+
}
52+
53+
4454
function toggleTutorial() {
4555
mainWindow.webContents.send('tutorial_clicked');
4656
}
@@ -107,8 +117,20 @@ const createWindow = () => {
107117
{
108118
label: 'Edit',
109119
submenu: [
110-
{ role: 'undo' },
111-
{ role: 'redo' },
120+
{
121+
label: 'Undo',
122+
accelerator: process.platform === 'darwin' ? 'Cmd+Z' : 'Ctrl+Z', //these hotkeys are a tad bit glitchy
123+
click() {
124+
undo();
125+
}
126+
},
127+
{
128+
label: 'Redo',
129+
accelerator: process.platform === 'darwin' ? 'Cmd+Shift+Z' : 'Ctrl+Shift+Z',
130+
click() {
131+
redo();
132+
}
133+
},
112134
{ type: 'separator' },
113135
{ role: 'cut' },
114136
{ role: 'copy' },
@@ -216,7 +238,9 @@ const createWindow = () => {
216238
});
217239

218240
// dev tools opened on every browser creation
219-
mainWindow.webContents.openDevTools();
241+
mainWindow.webContents.once('dom-ready', () => {
242+
mainWindow.webContents.openDevTools();
243+
});
220244
};
221245

222246
// This method will be called when Electron has finished

package.json

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"AppImage",
3131
"deb"
3232
],
33-
"maintainer": "spincycle01@yahoo.com"
33+
"maintainer": "sean.sadykoff@gmail.com"
3434
},
3535
"mac": {
3636
"category": "public.app-category.developer-tools",
@@ -90,8 +90,8 @@
9090
]
9191
},
9292
"dependencies": {
93-
"@material-ui/core": "^3.9.3",
94-
"@material-ui/icons": "^2.0.0",
93+
"@material-ui/core": "^4.2.1",
94+
"@material-ui/icons": "^4.0.1",
9595
"@material-ui/styles": "^4.9.0",
9696
"@types/prettier": "^1.19.0",
9797
"@types/react": "^16.8.14",
@@ -103,12 +103,14 @@
103103
"classnames": "^2.2.6",
104104
"cli-spinner": "^0.2.8",
105105
"commander": "^2.17.1",
106+
"concurrently": "^5.1.0",
106107
"d3": "^5.9.2",
107108
"electron-reload": "^1.4.0",
108109
"enzyme": "^3.4.1",
109110
"konva": "^4.1.6",
110111
"localforage": "^1.7.2",
111112
"lodash.throttle": "^4.1.1",
113+
"material-table": "^1.25.2",
112114
"prettier": "^1.19.1",
113115
"prop-types": "^15.6.2",
114116
"react": "^16.13.0",
@@ -122,10 +124,12 @@
122124
"redux": "^4.0.0",
123125
"redux-devtools-extension": "^2.13.5",
124126
"redux-logger": "^3.0.6",
125-
"redux-thunk": "^2.3.0"
127+
"redux-thunk": "^2.3.0",
128+
"redux-undo": "^1.0.1"
126129
},
127130
"devDependencies": {
128131
"@babel/preset-typescript": "^7.3.3",
132+
"@material-ui/styles": "^4.9.6",
129133
"awesome-typescript-loader": "^5.2.1",
130134
"babel-core": "^6.26.3",
131135
"babel-eslint": "^8.2.6",
@@ -134,11 +138,12 @@
134138
"babel-preset-react": "^6.24.1",
135139
"babel-preset-stage-0": "^6.24.1",
136140
"clean-webpack-plugin": "^0.1.19",
141+
"concurrently": "^5.1.0",
137142
"copy-webpack-plugin": "^4.5.2",
138-
"cross-env": "^5.2.0",
143+
"cross-env": "^5.2.1",
139144
"css-loader": "^0.28.11",
140145
"electron": "^2.0.7",
141-
"electron-builder": "^20.28.1",
146+
"electron-builder": "^20.44.4",
142147
"electron-devtools-installer": "^2.2.4",
143148
"electron-installer-dmg": "^2.0.0",
144149
"enzyme-adapter-react-16": "^1.2.0",
@@ -160,5 +165,11 @@
160165
"typescript": "^3.4.4",
161166
"webpack": "^4.42.0",
162167
"webpack-cli": "^3.3.11"
163-
}
168+
},
169+
"browserslist": [
170+
">0.2%",
171+
"not dead",
172+
"not ie <= 11",
173+
"not op_mini all"
174+
]
164175
}

src/actionTypes/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,5 @@ export const DELETE_IMAGE: string = 'DELETE_IMAGE';
3232
export const TOGGLE_STATE: string = 'TOGGLE_STATE';
3333
export const TOGGLE_CLASS: string = 'TOGGLE_CLASS';
3434
export const CHANGE_TUTORIAL: string = 'CHANGE_TUTORIAL';
35+
export const UNDO: string = 'UNDO';
36+
export const REDO: string = 'REDO';

0 commit comments

Comments
 (0)