Skip to content

Commit

Permalink
1.0.6 version fix img not found
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxmudjon committed May 13, 2022
1 parent b6662c1 commit dcc3a78
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 13 deletions.
Binary file modified assets/icons/mac/icon.icns
Binary file not shown.
18 changes: 9 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css" />
</head>
<body style="background: white;">
<div class="container" id="app" style="margin-top: 5rem;">
<div class="progress" style="display: none;">
<body style="background: white">
<div class="container" id="app" style="margin-top: 5rem">
<div class="progress" style="display: none">
<div class="indeterminate"></div>
</div>
<div id="loginPage">
<div class="card-panel red lighten-1" id="message" style="display: none;"><h6>Message</h6></div>
<div class="card-panel red lighten-1" id="message" style="display: none"><h6>Message</h6></div>
<form>
<div>
<label>Enter Mi Home login</label>
Expand All @@ -22,7 +22,7 @@
<label>Enter Mi Home password</label>
<input type="password" id="password" autofocus />
</div>
<div class="input-field col s12" style="margin-top: 20px;">
<div class="input-field col s12" style="margin-top: 20px">
<select id="serversList">
<option value="cn" selected>China</option>
<option value="ru">Russia</option>
Expand All @@ -36,17 +36,17 @@
<button class="waves-effect waves-light btn" type="submit" id="signButton">Sign in</button>
</form>
</div>
<div id="devicesPage" style="display: none;" class="row">
<div style="display: flex; flex-direction: column; margin: 10px;">
<div id="devicesPage" style="display: none" class="row">
<div style="display: flex; flex-direction: column; margin: 10px">
<button class="waves-effect waves-light btn" id="refreshButton">Refresh devices list</button>
</div>
<div id="devicesList" class="devicesList col s12 m12 l12 xl12"></div>
</div>
<div id="setVacuumVoicePack" class="modal">
<div class="modal-content" style="height: 500px;">
<div class="modal-content" style="height: 500px">
<h4>Modal Header</h4>

<div class="input-field col s12" style="padding-top: 10px;">
<div class="input-field col s12" style="padding-top: 10px">
<select id="setVacuumVoicePackSelect">
<option value="" disabled selected>Choose voice</option>
<option value="5021">озвучка Винни Пух</option>
Expand Down
9 changes: 8 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ function createWindow() {
mainWindow = new BrowserWindow({
width: 800,
height: 600,
minWidth: 800,
minHeight: 600,
webPreferences: {
nodeIntegration: true,
devTools: true,
Expand Down Expand Up @@ -49,7 +51,12 @@ ipcMain.on("getDevices", async (e, item) => {
for (let j = 0; j < devices.length; j++) {
const device = devices[j];
device["region"] = country;
device.deviceImage = deviceImagesAndModels.find((d) => d.model == device.model).img;

if (deviceImagesAndModels.find((d) => d.model == device.model)) {
device.deviceImage = deviceImagesAndModels.find((d) => d.model == device.model).img;
} else {
device.deviceImage = "";
}
devicesWithRegion.push(device);
}

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "getMiHomeDevicesToken",
"version": "1.0.5",
"version": "1.0.6",
"description": "Get Mi Home devices token",
"main": "main.js",
"scripts": {
Expand All @@ -24,7 +24,7 @@
"build": {
"productName": "Get Mi Home devices token",
"appId": "maxmudjon.MiHomeToken",
"copyright": "Copyright © 2021 ${author}",
"copyright": "Copyright © 2022 ${author}",
"win": {
"target": [
"portable"
Expand Down Expand Up @@ -54,7 +54,7 @@
]
},
"portable": {
"artifactName": "get_token.exe"
"artifactName": "Get token.exe"
},
"directories": {
"output": "electron/output",
Expand Down

0 comments on commit dcc3a78

Please sign in to comment.