Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Commit

Permalink
More info panel fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex committed Nov 9, 2022
1 parent d4c4a76 commit f25be41
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions history-explorer-card.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/history-explorer-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "./deps/timeline.js";
import "./deps/md5.min.js"
import "./deps/FileSaver.js"

const Version = '1.0.33';
const Version = '1.0.34';

var isMobile = ( navigator.appVersion.indexOf("Mobi") > -1 ) || ( navigator.userAgent.indexOf("HomeAssistant") > -1 );

Expand Down Expand Up @@ -373,7 +373,7 @@ class HistoryCardState {

if( confirm(infoPanelEnabled ? i18n('ui.popup.disable_panel') : i18n('ui.popup.enable_panel')) ) {
infoPanelEnabled = !infoPanelEnabled;
this.writeInfoPanelConfig();
this.writeInfoPanelConfig(true);
location.reload();
}
}
Expand Down Expand Up @@ -2559,11 +2559,11 @@ class HistoryCardState {
}
}

writeInfoPanelConfig()
writeInfoPanelConfig(forceUpdate = false)
{
if( !infoPanelEnabled ) {
window.localStorage.removeItem('history-explorer-info-panel');
} else if( infoPanelEnabled && this.pconfig.infoPanelConfig ) {
} else if( infoPanelEnabled && (this.pconfig.infoPanelConfig || forceUpdate) ) {
let data = {};
data.enabled = true;
data.config = this.pconfig.infoPanelConfig;
Expand Down

0 comments on commit f25be41

Please sign in to comment.