-
-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove electron-store from platform worker
- Loading branch information
1 parent
62bb56f
commit cf4b6c1
Showing
8 changed files
with
105 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import path from 'path' | ||
import Application from '../background' | ||
import { createWindow } from '../helpers' | ||
|
||
export default class AuthWindow { | ||
private _app:Application | ||
public window | ||
|
||
constructor(app:Application) { | ||
this._app = app | ||
|
||
this.window = createWindow('main', { | ||
width: 400, | ||
height: 600, | ||
title: 'Greenlight - Authentication', | ||
backgroundColor: 'rgb(26, 27, 30)', | ||
webPreferences: { | ||
preload: path.join(__dirname, 'preload.js'), | ||
}, | ||
}) | ||
|
||
// if (this._app.isProduction) { | ||
// this.window.loadURL('app://./boot') | ||
// } else { | ||
// const port = process.argv[2] | ||
// this.window.loadURL(`http://localhost:${port}/boot`) | ||
// this.window.webContents.openDevTools({ | ||
// mode: 'bottom' | ||
// }) | ||
// } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import MainWindow from './main' | ||
import AuthWindow from './auth' | ||
|
||
export default { | ||
MainWindow | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import path from 'path' | ||
import Application from '../background' | ||
import { createWindow } from '../helpers' | ||
|
||
export default class MainWindow { | ||
private _app:Application | ||
public window | ||
|
||
constructor(app:Application) { | ||
this._app = app | ||
|
||
this.window = createWindow('main', { | ||
width: 1280, | ||
height: (this._app.isProduction) ? 800 : 1200, | ||
title: 'Greenlight', | ||
backgroundColor: 'rgb(26, 27, 30)', | ||
webPreferences: { | ||
preload: path.join(__dirname, 'preload.js'), | ||
}, | ||
}) | ||
|
||
if (this._app.isProduction) { | ||
this.window.loadURL('app://./boot') | ||
} else { | ||
const port = process.argv[2] | ||
this.window.loadURL(`http://localhost:${port}/boot`) | ||
this.window.webContents.openDevTools({ | ||
mode: 'bottom' | ||
}) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2857,7 +2857,7 @@ electron-serve@^1.3.0: | |
resolved "https://registry.yarnpkg.com/electron-serve/-/electron-serve-1.3.0.tgz#94f7fbdc398d1f187f0ebeb4630b2d03acb83d59" | ||
integrity sha512-OEC/48ZBJxR6XNSZtCl4cKPyQ1lvsu8yp8GdCplMWwGS1eEyMcEmzML5BRs/io/RLDnpgyf+7rSL+X6ICifRIg== | ||
|
||
electron-store@^8.0.1, electron-store@^8.2.0: | ||
electron-store@^8.2.0: | ||
version "8.2.0" | ||
resolved "https://registry.yarnpkg.com/electron-store/-/electron-store-8.2.0.tgz#114e6e453e8bb746ab4ccb542424d8c881ad2ca1" | ||
integrity sha512-ukLL5Bevdil6oieAOXz3CMy+OgaItMiVBg701MNlG6W5RaC0AHN7rvlqTCmeb6O7jP0Qa1KKYTE0xV0xbhF4Hw== | ||
|
@@ -2879,15 +2879,6 @@ [email protected]: | |
"@types/node" "^20.9.0" | ||
extract-zip "^2.0.1" | ||
|
||
[email protected]: | ||
version "32.1.2" | ||
resolved "https://registry.yarnpkg.com/electron/-/electron-32.1.2.tgz#84d1efd95d41224e58a6a9bbd1db4ba80154fc02" | ||
integrity sha512-CXe6doFzhmh1U7daOvUzmF6Cj8hssdYWMeEPRnRO6rB9/bbwMlWctcQ7P8NJXhLQ88/vYUJQrJvlJPh8qM0BRQ== | ||
dependencies: | ||
"@electron/get" "^2.0.0" | ||
"@types/node" "^20.9.0" | ||
extract-zip "^2.0.1" | ||
|
||
emoji-regex@^8.0.0: | ||
version "8.0.0" | ||
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" | ||
|