Skip to content

Commit dcc3a78

Browse files
committed
1.0.6 version fix img not found
1 parent b6662c1 commit dcc3a78

File tree

4 files changed

+20
-13
lines changed

4 files changed

+20
-13
lines changed

assets/icons/mac/icon.icns

144 KB
Binary file not shown.

index.html

+9-9
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" />
77
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css" />
88
</head>
9-
<body style="background: white;">
10-
<div class="container" id="app" style="margin-top: 5rem;">
11-
<div class="progress" style="display: none;">
9+
<body style="background: white">
10+
<div class="container" id="app" style="margin-top: 5rem">
11+
<div class="progress" style="display: none">
1212
<div class="indeterminate"></div>
1313
</div>
1414
<div id="loginPage">
15-
<div class="card-panel red lighten-1" id="message" style="display: none;"><h6>Message</h6></div>
15+
<div class="card-panel red lighten-1" id="message" style="display: none"><h6>Message</h6></div>
1616
<form>
1717
<div>
1818
<label>Enter Mi Home login</label>
@@ -22,7 +22,7 @@
2222
<label>Enter Mi Home password</label>
2323
<input type="password" id="password" autofocus />
2424
</div>
25-
<div class="input-field col s12" style="margin-top: 20px;">
25+
<div class="input-field col s12" style="margin-top: 20px">
2626
<select id="serversList">
2727
<option value="cn" selected>China</option>
2828
<option value="ru">Russia</option>
@@ -36,17 +36,17 @@
3636
<button class="waves-effect waves-light btn" type="submit" id="signButton">Sign in</button>
3737
</form>
3838
</div>
39-
<div id="devicesPage" style="display: none;" class="row">
40-
<div style="display: flex; flex-direction: column; margin: 10px;">
39+
<div id="devicesPage" style="display: none" class="row">
40+
<div style="display: flex; flex-direction: column; margin: 10px">
4141
<button class="waves-effect waves-light btn" id="refreshButton">Refresh devices list</button>
4242
</div>
4343
<div id="devicesList" class="devicesList col s12 m12 l12 xl12"></div>
4444
</div>
4545
<div id="setVacuumVoicePack" class="modal">
46-
<div class="modal-content" style="height: 500px;">
46+
<div class="modal-content" style="height: 500px">
4747
<h4>Modal Header</h4>
4848

49-
<div class="input-field col s12" style="padding-top: 10px;">
49+
<div class="input-field col s12" style="padding-top: 10px">
5050
<select id="setVacuumVoicePackSelect">
5151
<option value="" disabled selected>Choose voice</option>
5252
<option value="5021">озвучка Винни Пух</option>

main.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ function createWindow() {
88
mainWindow = new BrowserWindow({
99
width: 800,
1010
height: 600,
11+
minWidth: 800,
12+
minHeight: 600,
1113
webPreferences: {
1214
nodeIntegration: true,
1315
devTools: true,
@@ -49,7 +51,12 @@ ipcMain.on("getDevices", async (e, item) => {
4951
for (let j = 0; j < devices.length; j++) {
5052
const device = devices[j];
5153
device["region"] = country;
52-
device.deviceImage = deviceImagesAndModels.find((d) => d.model == device.model).img;
54+
55+
if (deviceImagesAndModels.find((d) => d.model == device.model)) {
56+
device.deviceImage = deviceImagesAndModels.find((d) => d.model == device.model).img;
57+
} else {
58+
device.deviceImage = "";
59+
}
5360
devicesWithRegion.push(device);
5461
}
5562

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "getMiHomeDevicesToken",
3-
"version": "1.0.5",
3+
"version": "1.0.6",
44
"description": "Get Mi Home devices token",
55
"main": "main.js",
66
"scripts": {
@@ -24,7 +24,7 @@
2424
"build": {
2525
"productName": "Get Mi Home devices token",
2626
"appId": "maxmudjon.MiHomeToken",
27-
"copyright": "Copyright © 2021 ${author}",
27+
"copyright": "Copyright © 2022 ${author}",
2828
"win": {
2929
"target": [
3030
"portable"
@@ -54,7 +54,7 @@
5454
]
5555
},
5656
"portable": {
57-
"artifactName": "get_token.exe"
57+
"artifactName": "Get token.exe"
5858
},
5959
"directories": {
6060
"output": "electron/output",

0 commit comments

Comments
 (0)