Skip to content

Commit 09c1456

Browse files
authored
Merge pull request #47 from nerdic-coder/2.0
2.0
2 parents 1026341 + 52462da commit 09c1456

File tree

112 files changed

+218844
-22574
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+218844
-22574
lines changed

.babelrc

Lines changed: 0 additions & 9 deletions
This file was deleted.

.editorconfig

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
# EditorConfig is awesome: https://EditorConfig.org
1+
# http://editorconfig.org
22

3-
# top-most EditorConfig file
43
root = true
54

6-
# Unix-style newlines with a newline ending every file
75
[*]
8-
end_of_line = lf
9-
insert_final_newline = true
10-
indent_size = 2
116
charset = utf-8
127
indent_style = space
8+
indent_size = 2
9+
end_of_line = lf
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
13+
[*.md]
14+
insert_final_newline = false
15+
trim_trailing_whitespace = false

.eslintrc

Lines changed: 0 additions & 25 deletions
This file was deleted.

.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,30 @@ yarn-error.log*
2626

2727
android/.idea/
2828
reports/
29+
30+
dist/
31+
!www/favicon.ico
32+
www/
33+
34+
*~
35+
*.sw[mnpcod]
36+
*.log
37+
*.lock
38+
*.tmp
39+
*.tmp.*
40+
log.txt
41+
*.sublime-project
42+
*.sublime-workspace
43+
44+
.stencil/
45+
.idea/
46+
.vscode/
47+
.sass-cache/
48+
.versions/
49+
node_modules/
50+
$RECYCLE.BIN/
51+
52+
.DS_Store
53+
Thumbs.db
54+
UserInterfaceState.xcuserstate
55+
.env

.prettierignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
*.jpg
2+
*.xml
3+
*.svg
4+
*.png
5+
*_headers
6+
*_redirects
7+
*.ico
8+
*blockstack.js
9+
*components.d.ts
10+
*index.html

.prettierrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"singleQuote": true
3+
}

android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ android {
66
applicationId "com.nerdiccoder.blockphotos"
77
minSdkVersion 21
88
targetSdkVersion 27
9-
versionCode 3
10-
versionName "1.2"
9+
versionCode 4
10+
versionName "2.0"
1111
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1212
}
1313
buildTypes {

electron/main.js

Lines changed: 39 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ const isDev = require('electron-is-dev');
66
let BASE_URL = `file://${__dirname}/app/index.html`;
77
let SCHEME = 'blockphotosapp';
88
if (isDev) {
9-
BASE_URL = 'http://localhost:9876';
10-
9+
// BASE_URL = 'http://localhost:9876';
1110
}
1211

1312
protocol.registerStandardSchemes([SCHEME]);
@@ -26,29 +25,38 @@ if (!gotTheLock) {
2625
} else {
2726
app.on('second-instance', (event, commandLine) => {
2827
if (mainWindow && commandLine[1]) {
29-
if (mainWindow.isMinimized()) {
30-
mainWindow.restore();
31-
}
32-
33-
var request = commandLine[1].split(":");
34-
35-
if (request[1] && currentAuthResponse !== request[1]) {
36-
currentAuthResponse = request[1];
37-
38-
mainWindow.focus();
39-
mainWindow.loadURL(BASE_URL + '?authResponse=' + request[1]);
40-
return true;
41-
}
28+
if (mainWindow.isMinimized()) {
29+
mainWindow.restore();
30+
}
31+
32+
mainWindow.close();
33+
34+
mainWindow = new BrowserWindow({
35+
width: 500,
36+
height: 810,
37+
icon: path.join(__dirname, 'icons/png/64x64.png')
38+
});
39+
40+
var request = commandLine[1].split(':');
41+
42+
if (request[1] && currentAuthResponse !== request[1]) {
43+
currentAuthResponse = request[1];
44+
45+
mainWindow.focus();
46+
mainWindow.loadURL(BASE_URL + '?authResponse=' + request[1]);
47+
return true;
48+
}
4249
}
43-
dialog.showMessageBox({
44-
message: "Authentication failed, please try again!",
45-
buttons: ["OK"]
50+
dialog.showMessageBox({
51+
message: 'Authentication failed, please try again!',
52+
buttons: ['OK']
4653
});
4754
});
4855
}
4956

5057
// Handle creating/removing shortcuts on Windows when installing/uninstalling.
51-
if (require('electron-squirrel-startup')) { // eslint-disable-line global-require
58+
if (require('electron-squirrel-startup')) {
59+
// eslint-disable-line global-require
5260
app.quit();
5361
}
5462

@@ -81,45 +89,45 @@ const createWindow = () => {
8189
app.on('ready', createWindow);
8290

8391
// Quit when all windows are closed.
84-
app.on('window-all-closed', function () {
92+
app.on('window-all-closed', function() {
8593
// On OS X it is common for applications and their menu bar
8694
// to stay active until the user quits explicitly with Cmd + Q
8795
if (process.platform !== 'darwin') {
8896
app.quit();
8997
}
90-
})
98+
});
9199

92-
app.on('activate', function () {
100+
app.on('activate', function() {
93101
// On OS X it's common to re-create a window in the app when the
94102
// dock icon is clicked and there are no other windows open.
95103
if (mainWindow === null) {
96104
createWindow();
97105
}
98-
})
106+
});
99107

100-
app.on('open-url', function (event, url) {
108+
app.on('open-url', function(event, url) {
101109
// On OS X it's common to re-create a window in the app when the
102110
// dock icon is clicked and there are no other windows open.
103111
if (mainWindow) {
104112
if (mainWindow.isMinimized()) {
105113
mainWindow.restore();
106114
}
107-
108-
var request = url.split(":");
115+
116+
var request = url.split(':');
109117

110118
if (request[1] && currentAuthResponse !== request[1]) {
111119
currentAuthResponse = request[1];
112-
120+
113121
mainWindow.focus();
114122
mainWindow.loadURL(BASE_URL + '?authResponse=' + request[1]);
115123
return;
116124
}
117125
}
118-
dialog.showMessageBox({
119-
message: "Authentication failed, please try again!",
120-
buttons: ["OK"]
126+
dialog.showMessageBox({
127+
message: 'Authentication failed, please try again!',
128+
buttons: ['OK']
121129
});
122-
})
130+
});
123131

124132
// In this file you can include the rest of your app's specific main process
125133
// code. You can also put them in separate files and require them here.

0 commit comments

Comments
 (0)