Merge remote-tracking branch 'upstream/master' into feature/route-loader-keyboard-shortcut

This commit is contained in:
Marcus Jaschen 2021-03-25 08:00:26 +01:00
commit 0998e210e4
2 changed files with 34 additions and 32 deletions

View file

@ -61,7 +61,7 @@
aria-haspopup="true" aria-haspopup="true"
aria-expanded="false" aria-expanded="false"
data-i18n="[title]keyboard.generic-shortcut" data-i18n="[title]keyboard.generic-shortcut"
data-i18n-options="{ 'action': '$t(navbar.export-tooltip)', 'key': 'X' }" data-i18n-options='{ "action": "$t(navbar.export-tooltip)", "key": "X" }'
title="Export route" title="Export route"
> >
<span class="fa fa-lg fa-cloud-download" aria-hidden="true"> </span> <span class="fa fa-lg fa-cloud-download" aria-hidden="true"> </span>
@ -121,7 +121,7 @@
<div <div
class="nav-item" class="nav-item"
data-i18n="[title]keyboard.generic-shortcut" data-i18n="[title]keyboard.generic-shortcut"
data-i18n-options="{ 'action': '$t(about.tooltip)', 'key': 'H' }" data-i18n-options='{ "action": "$t(about.tooltip)", "key": "H" }'
title="Show more information about BRouter-Web" title="Show more information about BRouter-Web"
> >
<a class="nav-link" href="#" data-toggle="modal" data-target="#about" <a class="nav-link" href="#" data-toggle="modal" data-target="#about"
@ -824,11 +824,11 @@
href="#tab_layers_control" href="#tab_layers_control"
role="tab" role="tab"
data-i18n="[title]sidebar.tab-tooltip" data-i18n="[title]sidebar.tab-tooltip"
data-i18n-options="{ data-i18n-options='{
'action': '$t(sidebar.layers.tooltip)', "action": "$t(sidebar.layers.tooltip)",
'toggleKey': 'T', "toggleKey": "T",
'switchKey': '$t(keyboard.shift)+T' "switchKey": "$t(keyboard.shift)+T"
}" }'
title="Select layers" title="Select layers"
> >
<!-- <!--
@ -858,11 +858,11 @@
href="#tab_itinerary" href="#tab_itinerary"
role="tab" role="tab"
data-i18n="[title]sidebar.tab-tooltip" data-i18n="[title]sidebar.tab-tooltip"
data-i18n-options="{ data-i18n-options='{
'action': '$t(sidebar.itinerary.tooltip)', "action": "$t(sidebar.itinerary.tooltip)",
'toggleKey': 'T', "toggleKey": "T",
'switchKey': '$t(keyboard.shift)+T' "switchKey": "$t(keyboard.shift)+T"
}" }'
title="Show Itinerary" title="Show Itinerary"
><i class="fa fa-map-signs"></i ><i class="fa fa-map-signs"></i
></a> ></a>
@ -872,11 +872,11 @@
href="#tab_profile" href="#tab_profile"
role="tab" role="tab"
data-i18n="[title]sidebar.tab-tooltip" data-i18n="[title]sidebar.tab-tooltip"
data-i18n-options="{ data-i18n-options='{
'action': '$t(sidebar.customize-profile.tooltip)', "action": "$t(sidebar.customize-profile.tooltip)",
'toggleKey': 'T', "toggleKey": "T",
'switchKey': '$t(keyboard.shift)+T' "switchKey": "$t(keyboard.shift)+T"
}" }'
title="Customize profile" title="Customize profile"
><i class="fa fa-wrench"></i ><i class="fa fa-wrench"></i
></a> ></a>
@ -886,11 +886,11 @@
href="#tab_data" href="#tab_data"
role="tab" role="tab"
data-i18n="[title]sidebar.tab-tooltip" data-i18n="[title]sidebar.tab-tooltip"
data-i18n-options="{ data-i18n-options='{
'action': '$t(sidebar.data.tooltip)', "action": "$t(sidebar.data.tooltip)",
'toggleKey': 'T', "toggleKey": "T",
'switchKey': '$t(keyboard.shift)+T' "switchKey": "$t(keyboard.shift)+T"
}" }'
title="Show detailed route data table" title="Show detailed route data table"
><i class="fa fa-table"></i ><i class="fa fa-table"></i
></a> ></a>
@ -900,11 +900,11 @@
href="#tab_analysis" href="#tab_analysis"
role="tab" role="tab"
data-i18n="[title]sidebar.tab-tooltip" data-i18n="[title]sidebar.tab-tooltip"
data-i18n-options="{ data-i18n-options='{
'action': '$t(sidebar.analysis.tooltip)', "action": "$t(sidebar.analysis.tooltip)",
'toggleKey': 'T', "toggleKey": "T",
'switchKey': '$t(keyboard.shift)+T' "switchKey": "$t(keyboard.shift)+T"
}" }'
title="Analyse route" title="Analyse route"
><i class="fa fa-pie-chart"></i ><i class="fa fa-pie-chart"></i
></a> ></a>
@ -1220,7 +1220,7 @@
aria-expanded="false" aria-expanded="false"
aria-label="Toggle elevation chart" aria-label="Toggle elevation chart"
data-i18n="[title]keyboard.generic-shortcut" data-i18n="[title]keyboard.generic-shortcut"
data-i18n-options="{ 'action': '$t(footer.elevation-chart)', 'key': 'E' }" data-i18n-options='{ "action": "$t(footer.elevation-chart)", "key": "E" }'
title="Toggle elevation chart" title="Toggle elevation chart"
> >
<span class="fa fa-area-chart"></span> <span class="fa fa-area-chart"></span>

View file

@ -4,7 +4,9 @@ BR.WhatsNew = {
self.dismissableMessage = new BR.Message('whats_new_message', { self.dismissableMessage = new BR.Message('whats_new_message', {
onClosed: function () { onClosed: function () {
document.getElementsByClassName('version')[0].classList.remove('version-new'); document.getElementsByClassName('version')[0].classList.remove('version-new');
localStorage.setItem('changelogVersion', self.getLatestVersion()); if (BR.Util.localStorageAvailable()) {
localStorage.setItem('changelogVersion', self.getLatestVersion());
}
// next time popup is open, by default we will see everything // next time popup is open, by default we will see everything
self.prepare(false); self.prepare(false);
}, },
@ -12,7 +14,7 @@ BR.WhatsNew = {
$('#whatsnew').on('shown.bs.modal', function () { $('#whatsnew').on('shown.bs.modal', function () {
self.dismissableMessage.hide(); self.dismissableMessage.hide();
}); });
if (!self.getCurrentVersion()) { if (!self.getCurrentVersion() && BR.Util.localStorageAvailable()) {
localStorage.setItem('changelogVersion', self.getLatestVersion()); localStorage.setItem('changelogVersion', self.getLatestVersion());
} }
self.prepare(self.hasNewVersions()); self.prepare(self.hasNewVersions());
@ -28,12 +30,12 @@ BR.WhatsNew = {
}, },
getCurrentVersion: function () { getCurrentVersion: function () {
if (!BR.Util.localStorageAvailable()) return null;
return localStorage.getItem('changelogVersion'); return localStorage.getItem('changelogVersion');
}, },
hasNewVersions: function () { hasNewVersions: function () {
if (!BR.Util.localStorageAvailable()) return false;
return this.getCurrentVersion() && this.getCurrentVersion() < this.getLatestVersion(); return this.getCurrentVersion() && this.getCurrentVersion() < this.getLatestVersion();
}, },