feat: Add a setting to reload the page (#1132)

* Add reload setting

The iOS PWA version does not allow you to reload the page - even with killing
the app. This is useful for reloading new versions of the app (as well as
solving bad transient state issues).

* make href use #
pull/1134/head
sgenoud 2019-04-09 04:23:16 +02:00 zatwierdzone przez Nolan Lawson
rodzic 1dec3b55f9
commit e202dd3444
2 zmienionych plików z 10 dodań i 1 usunięć

Wyświetl plik

@ -1,4 +1,4 @@
<a {href} rel="prefetch" aria-label={ariaLabel || label} class="settings-list-button {className ? className : ''}">
<a {href} on:click="fire('click', event)" rel="prefetch" aria-label={ariaLabel || label} class="settings-list-button {className ? className : ''}">
<span>
{label}
</span>

Wyświetl plik

@ -11,6 +11,9 @@
<SettingsListRow>
<SettingsListButton href="/settings/hotkeys" label="Hotkeys"/>
</SettingsListRow>
<SettingsListRow>
<SettingsListButton href="#" on:click="reload(event)" label="Reload"/>
</SettingsListRow>
<SettingsListRow>
<SettingsListButton href="/settings/about" label="About Pinafore"/>
</SettingsListRow>
@ -29,6 +32,12 @@
SettingsList,
SettingsListRow,
SettingsListButton
},
methods: {
reload (event) {
event.preventDefault()
document.location.reload(true)
}
}
}
</script>