Browse Source

Add credits and settings pages

tags/v1.1.0
Skylar Ittner 9 months ago
parent
commit
d182f24e94
6 changed files with 7155 additions and 4 deletions
  1. 3461
    0
      licenses.txt
  2. 15
    2
      www/js/platform.js
  3. 2
    2
      www/js/setup1.js
  4. 3586
    0
      www/pages/credits.html
  5. 36
    0
      www/pages/settings.html
  6. 55
    0
      www/routes.js

+ 3461
- 0
licenses.txt
File diff suppressed because it is too large
View File


+ 15
- 2
www/js/platform.js View File

@@ -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() {

+ 2
- 2
www/js/setup1.js View File

@@ -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
- 0
www/pages/credits.html
File diff suppressed because it is too large
View File


+ 36
- 0
www/pages/settings.html View 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>

+ 55
- 0
www/routes.js View File

@@ -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 &copy; 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…
Cancel
Save