Skip to content

Commit 41e02cd

Browse files
committed
Keep the loading modal constant when toggling door using Blynk
1 parent 2a1822e commit 41e02cd

4 files changed

Lines changed: 10 additions & 5 deletions

File tree

src/js/utils.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,18 +292,23 @@ angular.module( "opengarage.utils", [] )
292292
var promise;
293293

294294
if ( $rootScope.activeController && $rootScope.activeController.auth ) {
295+
$rootScope.$broadcast( "loading:show" );
295296
promise = $http( {
296297
method: "POST",
297298
url: "https://opensprinkler.com/wp-admin/admin-ajax.php",
298299
headers: { "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8" },
299-
data: "action=blynkCloud&path=" + encodeURIComponent( $rootScope.activeController.auth + "/update/V1?value=1" )
300+
data: "action=blynkCloud&path=" + encodeURIComponent( $rootScope.activeController.auth + "/update/V1?value=1" ),
301+
suppressLoader: true
300302
} ).then( function() {
301303
setTimeout( function() {
302304
$http( {
303305
method: "POST",
304306
url: "https://opensprinkler.com/wp-admin/admin-ajax.php",
305307
headers: { "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8" },
306-
data: "action=blynkCloud&path=" + encodeURIComponent( $rootScope.activeController.auth + "/update/V1?value=0" )
308+
data: "action=blynkCloud&path=" + encodeURIComponent( $rootScope.activeController.auth + "/update/V1?value=0" ),
309+
suppressLoader: true
310+
} ).then( function() {
311+
$rootScope.$broadcast( "loading:hide" );
307312
} );
308313
}, 1000 );
309314
} );

www/cache.manifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ index.html
2929
NETWORK:
3030
*
3131

32-
# hash: 47ea636aa5c69d13860f120f76378c6bde2859acaab2c93f0464cece23364087
32+
# hash: bfb07b911187da1769e582a6d854f3b05ec17f57a3bef76fe4d7a1b40596f646

www/js/app.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

www/js/app.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)