mirror of
https://github.com/balena-io/etcher.git
synced 2025-04-24 23:37:18 +00:00
commit
dc6ad72b2d
2
Makefile
2
Makefile
@ -152,7 +152,7 @@ lint-ts:
|
||||
resin-lint --fix --typescript typings lib tests scripts/clean-shrinkwrap.ts webpack.config.ts
|
||||
|
||||
lint-sass:
|
||||
sass-lint lib/gui/scss
|
||||
sass-lint -v lib/gui/app/scss/**/*.scss lib/gui/app/scss/*.scss
|
||||
|
||||
lint-cpp:
|
||||
cpplint --recursive src
|
||||
|
@ -42,7 +42,7 @@ installers for all supported operating systems.
|
||||
2. Trust Bintray.com's GPG key:
|
||||
|
||||
```sh
|
||||
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 379CE192D401AB61
|
||||
sudo apt-key adv --keyserver hkps://keyserver.ubuntu.com:443 --recv-keys 379CE192D401AB61
|
||||
```
|
||||
|
||||
3. Update and install:
|
||||
|
@ -41,90 +41,90 @@ $fa-font-path: "../../../node_modules/@fortawesome/fontawesome-free-webfonts/web
|
||||
@import "../../../../node_modules/@fortawesome/fontawesome-free-webfonts/scss/fa-solid";
|
||||
|
||||
@font-face {
|
||||
font-family: 'Nunito';
|
||||
src: url('Nunito-Regular.eot');
|
||||
src: url('./fonts/Nunito-Regular.eot?#iefix') format('embedded-opentype'),
|
||||
url('./fonts/Nunito-Regular.woff2') format('woff2'),
|
||||
url('./fonts/Nunito-Regular.woff') format('woff'),
|
||||
url('./fonts/Nunito-Regular.ttf') format('truetype');
|
||||
font-family: "Nunito";
|
||||
src: url("Nunito-Regular.eot");
|
||||
src: url("./fonts/Nunito-Regular.eot?#iefix") format("embedded-opentype"),
|
||||
url("./fonts/Nunito-Regular.woff2") format("woff2"),
|
||||
url("./fonts/Nunito-Regular.woff") format("woff"),
|
||||
url("./fonts/Nunito-Regular.ttf") format("truetype");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-display: block;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Nunito';
|
||||
src: url('Nunito-Bold.eot');
|
||||
src: url('./fonts/Nunito-Bold.eot?#iefix') format('embedded-opentype'),
|
||||
url('./fonts/Nunito-Bold.woff2') format('woff2'),
|
||||
url('./fonts/Nunito-Bold.woff') format('woff'),
|
||||
url('./fonts/Nunito-Bold.ttf') format('truetype');
|
||||
font-family: "Nunito";
|
||||
src: url("Nunito-Bold.eot");
|
||||
src: url("./fonts/Nunito-Bold.eot?#iefix") format("embedded-opentype"),
|
||||
url("./fonts/Nunito-Bold.woff2") format("woff2"),
|
||||
url("./fonts/Nunito-Bold.woff") format("woff"),
|
||||
url("./fonts/Nunito-Bold.ttf") format("truetype");
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
font-display: block;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Nunito';
|
||||
src: url('Nunito-Light.eot');
|
||||
src: url('./fonts/Nunito-Light.eot?#iefix') format('embedded-opentype'),
|
||||
url('./fonts/Nunito-Light.woff2') format('woff2'),
|
||||
url('./fonts/Nunito-Light.woff') format('woff'),
|
||||
url('./fonts/Nunito-Light.ttf') format('truetype');
|
||||
font-family: "Nunito";
|
||||
src: url("Nunito-Light.eot");
|
||||
src: url("./fonts/Nunito-Light.eot?#iefix") format("embedded-opentype"),
|
||||
url("./fonts/Nunito-Light.woff2") format("woff2"),
|
||||
url("./fonts/Nunito-Light.woff") format("woff"),
|
||||
url("./fonts/Nunito-Light.ttf") format("truetype");
|
||||
font-weight: 300;
|
||||
font-style: normal;
|
||||
font-display: block;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'CircularStd';
|
||||
src: url('./fonts/CircularStd-Bold.eot');
|
||||
src: url('./fonts/CircularStd-Bold.eot?#iefix') format('embedded-opentype'),
|
||||
url('./fonts/CircularStd-Bold.woff2') format('woff2'),
|
||||
url('./fonts/CircularStd-Bold.woff') format('woff'),
|
||||
url('./fonts/CircularStd-Bold.ttf') format('truetype');
|
||||
font-family: "CircularStd";
|
||||
src: url("./fonts/CircularStd-Bold.eot");
|
||||
src: url("./fonts/CircularStd-Bold.eot?#iefix") format("embedded-opentype"),
|
||||
url("./fonts/CircularStd-Bold.woff2") format("woff2"),
|
||||
url("./fonts/CircularStd-Bold.woff") format("woff"),
|
||||
url("./fonts/CircularStd-Bold.ttf") format("truetype");
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
font-display: block;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'CircularStd';
|
||||
src: url('./fonts/CircularStd-Book.eot');
|
||||
src: url('./fonts/CircularStd-Book.eot?#iefix') format('embedded-opentype'),
|
||||
url('./fonts/CircularStd-Book.woff2') format('woff2'),
|
||||
url('./fonts/CircularStd-Book.woff') format('woff'),
|
||||
url('./fonts/CircularStd-Book.ttf') format('truetype');
|
||||
font-family: "CircularStd";
|
||||
src: url("./fonts/CircularStd-Book.eot");
|
||||
src: url("./fonts/CircularStd-Book.eot?#iefix") format("embedded-opentype"),
|
||||
url("./fonts/CircularStd-Book.woff2") format("woff2"),
|
||||
url("./fonts/CircularStd-Book.woff") format("woff"),
|
||||
url("./fonts/CircularStd-Book.ttf") format("truetype");
|
||||
font-weight: 500;
|
||||
font-style: normal;
|
||||
font-display: block;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'CircularStd';
|
||||
src: url('./fonts/CircularStd-Medium.eot');
|
||||
src: url('./fonts/CircularStd-Medium.eot?#iefix') format('embedded-opentype'),
|
||||
url('./fonts/CircularStd-Medium.woff2') format('woff2'),
|
||||
url('./fonts/CircularStd-Medium.woff') format('woff'),
|
||||
url('./fonts/CircularStd-Medium.ttf') format('truetype');
|
||||
font-family: "CircularStd";
|
||||
src: url("./fonts/CircularStd-Medium.eot");
|
||||
src: url("./fonts/CircularStd-Medium.eot?#iefix") format("embedded-opentype"),
|
||||
url("./fonts/CircularStd-Medium.woff2") format("woff2"),
|
||||
url("./fonts/CircularStd-Medium.woff") format("woff"),
|
||||
url("./fonts/CircularStd-Medium.ttf") format("truetype");
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
font-display: block;
|
||||
}
|
||||
|
||||
.circular {
|
||||
font-family: 'CircularStd';
|
||||
font-family: "CircularStd";
|
||||
font-weight: 500;
|
||||
}
|
||||
.nunito {
|
||||
font-family: 'Nunito';
|
||||
font-family: "Nunito";
|
||||
}
|
||||
|
||||
body {
|
||||
letter-spacing: 0.5px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
font-family: 'CircularStd';
|
||||
font-family: "CircularStd";
|
||||
|
||||
> header {
|
||||
flex: 0 0 auto;
|
||||
|
@ -9674,7 +9674,7 @@ readers do not read off random characters that represent icons */
|
||||
font-weight: 900; }
|
||||
|
||||
@font-face {
|
||||
font-family: 'Nunito';
|
||||
font-family: "Nunito";
|
||||
src: url("Nunito-Regular.eot");
|
||||
src: url("./fonts/Nunito-Regular.eot?#iefix") format("embedded-opentype"), url("./fonts/Nunito-Regular.woff2") format("woff2"), url("./fonts/Nunito-Regular.woff") format("woff"), url("./fonts/Nunito-Regular.ttf") format("truetype");
|
||||
font-weight: normal;
|
||||
@ -9682,7 +9682,7 @@ readers do not read off random characters that represent icons */
|
||||
font-display: block; }
|
||||
|
||||
@font-face {
|
||||
font-family: 'Nunito';
|
||||
font-family: "Nunito";
|
||||
src: url("Nunito-Bold.eot");
|
||||
src: url("./fonts/Nunito-Bold.eot?#iefix") format("embedded-opentype"), url("./fonts/Nunito-Bold.woff2") format("woff2"), url("./fonts/Nunito-Bold.woff") format("woff"), url("./fonts/Nunito-Bold.ttf") format("truetype");
|
||||
font-weight: bold;
|
||||
@ -9690,7 +9690,7 @@ readers do not read off random characters that represent icons */
|
||||
font-display: block; }
|
||||
|
||||
@font-face {
|
||||
font-family: 'Nunito';
|
||||
font-family: "Nunito";
|
||||
src: url("Nunito-Light.eot");
|
||||
src: url("./fonts/Nunito-Light.eot?#iefix") format("embedded-opentype"), url("./fonts/Nunito-Light.woff2") format("woff2"), url("./fonts/Nunito-Light.woff") format("woff"), url("./fonts/Nunito-Light.ttf") format("truetype");
|
||||
font-weight: 300;
|
||||
@ -9698,7 +9698,7 @@ readers do not read off random characters that represent icons */
|
||||
font-display: block; }
|
||||
|
||||
@font-face {
|
||||
font-family: 'CircularStd';
|
||||
font-family: "CircularStd";
|
||||
src: url("./fonts/CircularStd-Bold.eot");
|
||||
src: url("./fonts/CircularStd-Bold.eot?#iefix") format("embedded-opentype"), url("./fonts/CircularStd-Bold.woff2") format("woff2"), url("./fonts/CircularStd-Bold.woff") format("woff"), url("./fonts/CircularStd-Bold.ttf") format("truetype");
|
||||
font-weight: bold;
|
||||
@ -9706,7 +9706,7 @@ readers do not read off random characters that represent icons */
|
||||
font-display: block; }
|
||||
|
||||
@font-face {
|
||||
font-family: 'CircularStd';
|
||||
font-family: "CircularStd";
|
||||
src: url("./fonts/CircularStd-Book.eot");
|
||||
src: url("./fonts/CircularStd-Book.eot?#iefix") format("embedded-opentype"), url("./fonts/CircularStd-Book.woff2") format("woff2"), url("./fonts/CircularStd-Book.woff") format("woff"), url("./fonts/CircularStd-Book.ttf") format("truetype");
|
||||
font-weight: 500;
|
||||
@ -9714,7 +9714,7 @@ readers do not read off random characters that represent icons */
|
||||
font-display: block; }
|
||||
|
||||
@font-face {
|
||||
font-family: 'CircularStd';
|
||||
font-family: "CircularStd";
|
||||
src: url("./fonts/CircularStd-Medium.eot");
|
||||
src: url("./fonts/CircularStd-Medium.eot?#iefix") format("embedded-opentype"), url("./fonts/CircularStd-Medium.woff2") format("woff2"), url("./fonts/CircularStd-Medium.woff") format("woff"), url("./fonts/CircularStd-Medium.ttf") format("truetype");
|
||||
font-weight: 400;
|
||||
@ -9722,17 +9722,17 @@ readers do not read off random characters that represent icons */
|
||||
font-display: block; }
|
||||
|
||||
.circular {
|
||||
font-family: 'CircularStd';
|
||||
font-family: "CircularStd";
|
||||
font-weight: 500; }
|
||||
|
||||
.nunito {
|
||||
font-family: 'Nunito'; }
|
||||
font-family: "Nunito"; }
|
||||
|
||||
body {
|
||||
letter-spacing: 0.5px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
font-family: 'CircularStd'; }
|
||||
font-family: "CircularStd"; }
|
||||
body > header {
|
||||
flex: 0 0 auto; }
|
||||
body > main {
|
||||
|
@ -58,9 +58,16 @@ async function checkForUpdates(interval: number) {
|
||||
|
||||
function createMainWindow() {
|
||||
const fullscreen = Boolean(settings.get('fullscreen'));
|
||||
const defaultWidth = 800;
|
||||
const defaultHeight = 480;
|
||||
let width = defaultWidth;
|
||||
let height = defaultHeight;
|
||||
if (fullscreen) {
|
||||
({ width, height } = electron.screen.getPrimaryDisplay().bounds);
|
||||
}
|
||||
const mainWindow = new electron.BrowserWindow({
|
||||
width: parseInt(settings.get('width'), 10) || 800,
|
||||
height: parseInt(settings.get('height'), 10) || 480,
|
||||
width,
|
||||
height,
|
||||
frame: !fullscreen,
|
||||
useContentSize: false,
|
||||
show: false,
|
||||
@ -77,10 +84,12 @@ function createMainWindow() {
|
||||
backgroundThrottling: false,
|
||||
nodeIntegration: true,
|
||||
webviewTag: true,
|
||||
zoomFactor: width / defaultWidth,
|
||||
},
|
||||
});
|
||||
|
||||
buildWindowMenu(mainWindow);
|
||||
mainWindow.setFullScreen(true);
|
||||
|
||||
// Prevent flash of white when starting the application
|
||||
mainWindow.on('ready-to-show', () => {
|
||||
@ -95,15 +104,9 @@ function createMainWindow() {
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
const dir = __dirname.split(path.sep).pop();
|
||||
|
||||
if (dir === 'generated') {
|
||||
mainWindow.loadURL(
|
||||
`file://${path.join(__dirname, '..', 'lib', 'gui', 'app', 'index.html')}`,
|
||||
);
|
||||
} else {
|
||||
mainWindow.loadURL(`file://${path.join(__dirname, 'app', 'index.html')}`);
|
||||
}
|
||||
mainWindow.loadURL(
|
||||
`file://${path.join(__dirname, '..', 'lib', 'gui', 'app', 'index.html')}`,
|
||||
);
|
||||
|
||||
const page = mainWindow.webContents;
|
||||
|
||||
|
33
npm-shrinkwrap.json
generated
33
npm-shrinkwrap.json
generated
@ -219,9 +219,9 @@
|
||||
}
|
||||
},
|
||||
"@electron/get": {
|
||||
"version": "1.7.2",
|
||||
"resolved": "https://registry.npmjs.org/@electron/get/-/get-1.7.2.tgz",
|
||||
"integrity": "sha512-LSE4LZGMjGS9TloDx0yO44D2UTbaeKRk+QjlhWLiQlikV6J4spgDCjb6z4YIcqmPAwNzlNCnWF4dubytwI+ATA==",
|
||||
"version": "1.9.0",
|
||||
"resolved": "https://registry.npmjs.org/@electron/get/-/get-1.9.0.tgz",
|
||||
"integrity": "sha512-OBIKtF6ttIJotDXe4KJMUyTBO4xMii+mFjlA8R4CORuD4HvCUaCK3lPjhdTRCvuEv6gzWNbAvd9DNBv0v780lw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"debug": "^4.1.1",
|
||||
@ -230,6 +230,7 @@
|
||||
"global-agent": "^2.0.2",
|
||||
"global-tunnel-ng": "^2.7.1",
|
||||
"got": "^9.6.0",
|
||||
"progress": "^2.0.3",
|
||||
"sanitize-filename": "^1.6.2",
|
||||
"sumchecker": "^3.0.1"
|
||||
},
|
||||
@ -1901,9 +1902,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"boolean": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/boolean/-/boolean-3.0.0.tgz",
|
||||
"integrity": "sha512-OElxJ1lUSinuoUnkpOgLmxp0DC4ytEhODEL6QJU0NpxE/mI4rUSh8h1P1Wkvfi3xQEBcxXR2gBIPNYNuaFcAbQ==",
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/boolean/-/boolean-3.0.1.tgz",
|
||||
"integrity": "sha512-HRZPIjPcbwAVQvOTxR4YE3o8Xs98NqbbL1iEZDCz7CL8ql0Lt5iOyJFxfnAB0oFs8Oh02F/lLlg30Mexv46LjA==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
@ -4349,9 +4350,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"electron": {
|
||||
"version": "7.1.11",
|
||||
"resolved": "https://registry.npmjs.org/electron/-/electron-7.1.11.tgz",
|
||||
"integrity": "sha512-YDXfnovKY+8iZ5ISQh1kRqYIRKbpOSxGXCx2WVxPFPutEQ7Q/Xzr3h4GePEY25/NXMytMfhKaAZAYjtWUm3r9Q==",
|
||||
"version": "7.1.14",
|
||||
"resolved": "https://registry.npmjs.org/electron/-/electron-7.1.14.tgz",
|
||||
"integrity": "sha512-y9Nbja4rl+5fPVw9e/lFudwRax3a+jenzS7WXzUkjF7GI8YFxNH2eH9K9PZFNuSwc/OOCja2ul70+D44tKTQEw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@electron/get": "^1.0.1",
|
||||
@ -6355,9 +6356,9 @@
|
||||
"optional": true
|
||||
},
|
||||
"semver": {
|
||||
"version": "7.1.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.1.2.tgz",
|
||||
"integrity": "sha512-BJs9T/H8sEVHbeigqzIEo57Iu/3DG6c4QoqTfbQB3BPA4zgzAomh/Fk9E7QtjWQ8mx2dgA9YCfSF4y9k9bHNpQ==",
|
||||
"version": "7.1.3",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.1.3.tgz",
|
||||
"integrity": "sha512-ekM0zfiA9SCBlsKa2X1hxyxiI4L3B6EbVJkkdgQXnSEEaHlGdvyodMruTiulSRWMMB4NeIuYNMC9rTKTz97GxA==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
}
|
||||
@ -10344,6 +10345,12 @@
|
||||
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
|
||||
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
|
||||
},
|
||||
"progress": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
|
||||
"integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
|
||||
"dev": true
|
||||
},
|
||||
"progress-stream": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/progress-stream/-/progress-stream-1.2.0.tgz",
|
||||
@ -14462,4 +14469,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -101,7 +101,7 @@
|
||||
"@types/webpack-node-externals": "^1.7.0",
|
||||
"chai": "^4.2.0",
|
||||
"chalk": "^1.1.3",
|
||||
"electron": "7.1.11",
|
||||
"electron": "7.1.14",
|
||||
"electron-builder": "^22.1.0",
|
||||
"electron-mocha": "^8.2.0",
|
||||
"electron-notarize": "^0.1.1",
|
||||
|
Loading…
x
Reference in New Issue
Block a user