Add refresh button when not on mobile (pull refresh is bad with a mouse)
This commit is contained in:
parent
3f055b44d2
commit
552ccf4ff7
@ -4,6 +4,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
var platform_type = "";
|
||||
|
||||
function initCordova() {
|
||||
// Handle back button to close things
|
||||
@ -17,9 +18,12 @@ function initCordova() {
|
||||
StatusBar.styleLightContent();
|
||||
}
|
||||
}, false);
|
||||
|
||||
platform_type = "cordova";
|
||||
}
|
||||
|
||||
function initNW() {
|
||||
platform_type = "nw";
|
||||
// TODO: something clever with desktop integration
|
||||
}
|
||||
|
||||
|
@ -8,8 +8,13 @@
|
||||
<div class="title">NotePost</div>
|
||||
|
||||
<div class="right">
|
||||
{{#if showrefreshbtn}}
|
||||
<a href="#" class="link icon-only" onclick="app.ptr.refresh()">
|
||||
<i class="material-icons">refresh</i>
|
||||
</a>
|
||||
{{/if}}
|
||||
<a href="/settings" class="link icon-only">
|
||||
<i class="fas fa-cog"></i>
|
||||
<i class="material-icons">settings</i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -22,7 +22,8 @@ var routes = [
|
||||
reloadCurrent: (routeFrom.name == "home")
|
||||
}, {
|
||||
context: {
|
||||
notecards: notecards
|
||||
notecards: notecards,
|
||||
showrefreshbtn: (platform_type != "cordova")
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user