mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
Remove translatebar notification. Hide compliemtns when dishwasher shows notification.
This commit is contained in:
parent
33d93086b8
commit
8d7eee2757
@ -8,6 +8,7 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var gitHash = '<?php echo trim(`git rev-parse HEAD`) ?>';
|
var gitHash = '<?php echo trim(`git rev-parse HEAD`) ?>';
|
||||||
</script>
|
</script>
|
||||||
|
<meta name="google" value="notranslate" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
11
js/main.js
11
js/main.js
@ -50,9 +50,11 @@ jQuery(document).ready(function($) {
|
|||||||
var socket = io.connect('http://rpi-development.local:8080');
|
var socket = io.connect('http://rpi-development.local:8080');
|
||||||
socket.on('dishwasher', function (dishwasherReady) {
|
socket.on('dishwasher', function (dishwasherReady) {
|
||||||
if (dishwasherReady) {
|
if (dishwasherReady) {
|
||||||
$('.dishwasher').fadeIn();
|
$('.dishwasher').fadeIn(2000);
|
||||||
|
$('.lower-third').fadeOut(2000);
|
||||||
} else {
|
} else {
|
||||||
$('.dishwasher').fadeOut();
|
$('.dishwasher').fadeOut(2000);
|
||||||
|
$('.lower-third').fadeIn(2000);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -180,6 +182,7 @@ jQuery(document).ready(function($) {
|
|||||||
|
|
||||||
(function updateCompliment()
|
(function updateCompliment()
|
||||||
{
|
{
|
||||||
|
|
||||||
var compliments = [
|
var compliments = [
|
||||||
'Hey, handsome!',
|
'Hey, handsome!',
|
||||||
'Hi, sexy!',
|
'Hi, sexy!',
|
||||||
@ -194,13 +197,15 @@ jQuery(document).ready(function($) {
|
|||||||
while (compliment == lastCompliment) {
|
while (compliment == lastCompliment) {
|
||||||
compliment = Math.floor(Math.random()*compliments.length);
|
compliment = Math.floor(Math.random()*compliments.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
$('.compliment').updateWithText(compliments[compliment], 4000);
|
$('.compliment').updateWithText(compliments[compliment], 4000);
|
||||||
|
|
||||||
lastCompliment = compliment;
|
lastCompliment = compliment;
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
updateCompliment();
|
updateCompliment(true);
|
||||||
}, 30000);
|
}, 30000);
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|
||||||
(function updateCurrentWeather()
|
(function updateCurrentWeather()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user