Add credits and settings pages
This commit is contained in:
parent
20dbd0a613
commit
d182f24e94
3461
licenses.txt
Normal file
3461
licenses.txt
Normal file
File diff suppressed because it is too large
Load Diff
@ -6,7 +6,13 @@
|
||||
|
||||
var platform_type = "";
|
||||
|
||||
var openBrowser = function (url) {
|
||||
|
||||
}
|
||||
|
||||
function initCordova() {
|
||||
platform_type = "cordova";
|
||||
|
||||
// Handle back button to close things
|
||||
document.addEventListener("backbutton", function (event) {
|
||||
router.navigate("/home");
|
||||
@ -19,12 +25,19 @@ function initCordova() {
|
||||
}
|
||||
}, false);
|
||||
|
||||
platform_type = "cordova";
|
||||
openBrowser = function(url) {
|
||||
cordova.InAppBrowser.open(url, '_blank', 'location=yes');
|
||||
}
|
||||
}
|
||||
|
||||
function initNW() {
|
||||
platform_type = "nw";
|
||||
// TODO: something clever with desktop integration
|
||||
|
||||
openBrowser = function(url) {
|
||||
nw.Window.open(url, {
|
||||
id: url
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function initPlatform() {
|
||||
|
@ -12,9 +12,9 @@ netsymsbizurl = "https://BIZID.netsyms.biz/notepost";
|
||||
$('#use-security-checkbox-li').click(function () {
|
||||
// Event fires before the checkbox is changed, so we need to do the opposite
|
||||
if ($("#use-security").prop("checked")) {
|
||||
$('#protocol-select').text("http://");
|
||||
} else {
|
||||
$('#protocol-select').text("https://");
|
||||
} else {
|
||||
$('#protocol-select').text("http://");
|
||||
}
|
||||
});
|
||||
|
||||
|
3586
www/pages/credits.html
Normal file
3586
www/pages/credits.html
Normal file
File diff suppressed because it is too large
Load Diff
36
www/pages/settings.html
Normal file
36
www/pages/settings.html
Normal file
@ -0,0 +1,36 @@
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<div class="page" data-name="prefs">
|
||||
|
||||
<div class="navbar">
|
||||
<div class="navbar-inner">
|
||||
<div class="left">
|
||||
<a href="#" class="link icon-only back">
|
||||
<i class="icon icon-back"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="title">Settings</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="page-content">
|
||||
<div class="list media-list">
|
||||
<ul>
|
||||
{{#each settings}}
|
||||
<li class="item-content" data-setting="{{setting}}" onclick="{{onclick}}">
|
||||
<div class="item-inner">
|
||||
<div class="item-title-row">
|
||||
<div class="item-title">{{title}}</div>
|
||||
</div>
|
||||
<div class="item-text">{{text}}</div>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
@ -39,6 +39,61 @@ var routes = [
|
||||
templateUrl: './pages/setup1.html',
|
||||
name: 'setup1'
|
||||
},
|
||||
{
|
||||
path: '/settings',
|
||||
name: 'prefs',
|
||||
async: function (routeTo, routeFrom, resolve, reject) {
|
||||
var username = localStorage.getItem("username");
|
||||
if (username == null) {
|
||||
username = "Not logged in";
|
||||
}
|
||||
var serverurl = localStorage.getItem("serverurl");
|
||||
if (serverurl == null) {
|
||||
serverurl = "None";
|
||||
}
|
||||
resolve({
|
||||
templateUrl: './pages/settings.html'
|
||||
}, {
|
||||
context: {
|
||||
settings: [{
|
||||
setting: "userinfo",
|
||||
title: '<i class="fa fa-user"></i> <span id="username">' + username + '</span>',
|
||||
text: '<i class="fa fa-server"></i> Server: <span id="url">' + serverurl + '</span>',
|
||||
onclick: ""
|
||||
},
|
||||
{
|
||||
setting: "account",
|
||||
title: "Sign in to a different account",
|
||||
onclick: "router.navigate('/setup/0')"
|
||||
},
|
||||
{
|
||||
setting: "opensource",
|
||||
title: "Open Source Information",
|
||||
text: "",
|
||||
onclick: "router.navigate('/credits')"
|
||||
},
|
||||
{
|
||||
setting: "versions",
|
||||
title: "NotePost app v0.1",
|
||||
text: "Copyright © 2018-2019 Netsyms Technologies. License: <span style=\"text-decoration: underline;\" onclick=\"openBrowser('https://source.netsyms.com/Apps/NotePostApp?pk_campaign=NotePostApp');\">Mozilla Public License 2.0</span>.",
|
||||
onclick: ""
|
||||
},
|
||||
{
|
||||
setting: "opensource",
|
||||
title: "Open Source Information",
|
||||
text: "",
|
||||
onclick: "router.navigate('/credits')"
|
||||
},
|
||||
{
|
||||
setting: "privacy",
|
||||
title: "Privacy Policy",
|
||||
text: "",
|
||||
onclick: "openBrowser('https://netsyms.com/legal?pk_campaign=NotePostApp')"
|
||||
}]
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/credits',
|
||||
url: './pages/credits.html',
|
||||
|
Loading…
x
Reference in New Issue
Block a user