You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
108 lines
3.9 KiB
JavaScript
108 lines
3.9 KiB
JavaScript
/*
|
|
* 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/.
|
|
*/
|
|
|
|
|
|
var routes = [
|
|
{
|
|
path: '/home',
|
|
templateUrl: './pages/home.html',
|
|
name: 'home',
|
|
async: function (routeTo, routeFrom, resolve, reject) {
|
|
var giver = localStorage.getItem("accttype") == "giver";
|
|
var receiver = localStorage.getItem("accttype") == "receiver";
|
|
resolve({
|
|
templateUrl: './pages/home.html'
|
|
}, {
|
|
context: {
|
|
giver: giver,
|
|
receiver: receiver
|
|
}
|
|
});
|
|
}
|
|
},
|
|
{
|
|
path: '/setup/0',
|
|
url: './pages/setup0.html',
|
|
name: 'setup0'
|
|
},
|
|
{
|
|
path: '/setup/1/:acctType',
|
|
templateUrl: './pages/setup1.html',
|
|
name: 'setup1'
|
|
},
|
|
{
|
|
path: '/sendmoney/:publicID',
|
|
templateUrl: './pages/sendmoney.html',
|
|
name: 'sendmoney',
|
|
on: {
|
|
pageAfterIn: function () {
|
|
loadSendMoneyPage();
|
|
}
|
|
}
|
|
},
|
|
{
|
|
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: "editor",
|
|
title: "Use alternative editor",
|
|
text: "Turn on if you're having issues editing notes.",
|
|
toggle: true,
|
|
checked: localStorage.getItem("alternateeditor") == "true",
|
|
onclick: ""
|
|
},
|
|
{
|
|
setting: "versions",
|
|
title: "NotePost app v1.2.0",
|
|
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',
|
|
name: 'credits'
|
|
}
|
|
]; |