Browse Source

Add refresh button when not on mobile (pull refresh is bad with a mouse)

tags/v1.1.0
Skylar Ittner 9 months ago
parent
commit
552ccf4ff7
3 changed files with 12 additions and 2 deletions
  1. 4
    0
      www/js/platform.js
  2. 6
    1
      www/pages/home.html
  3. 2
    1
      www/routes.js

+ 4
- 0
www/js/platform.js View File

@@ -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
}


+ 6
- 1
www/pages/home.html View File

@@ -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>

+ 2
- 1
www/routes.js View File

@@ -22,7 +22,8 @@ var routes = [
reloadCurrent: (routeFrom.name == "home")
}, {
context: {
notecards: notecards
notecards: notecards,
showrefreshbtn: (platform_type != "cordova")
}
});
});

Loading…
Cancel
Save