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.
238 lines
8.3 KiB
JavaScript
238 lines
8.3 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',
|
|
name: 'home',
|
|
async: function (routeTo, routeFrom, resolve, reject) {
|
|
resolve({
|
|
templateUrl: './pages/home.html'
|
|
}, {
|
|
context: {
|
|
pages: [
|
|
{
|
|
title: "Book Repair",
|
|
href: "/bookrepair",
|
|
icon: "fal fa-calendar-check"
|
|
},
|
|
{
|
|
title: "Live Chat",
|
|
href: "/chat",
|
|
icon: "fal fa-comments"
|
|
},
|
|
{
|
|
title: "Repair Status",
|
|
href: "/track",
|
|
icon: "fal fa-search"
|
|
},
|
|
{
|
|
title: "Pay Bill",
|
|
href: "/pay",
|
|
icon: "fal fa-file-invoice"
|
|
},
|
|
{
|
|
title: "Get Deals",
|
|
href: "/offers",
|
|
icon: "fal fa-badge-dollar"
|
|
},
|
|
{
|
|
title: "View Services",
|
|
href: "/services",
|
|
icon: "fal fa-magic"
|
|
},
|
|
]
|
|
}
|
|
});
|
|
}
|
|
},
|
|
{
|
|
path: '/track',
|
|
url: './pages/track.html',
|
|
name: 'track',
|
|
on: {
|
|
pageBeforeIn: function () {
|
|
addClientMachineSuggestions();
|
|
$("#deviceid").val("0");
|
|
app.input.validate("#deviceid");
|
|
$("#deviceid").val("");
|
|
}
|
|
}
|
|
},
|
|
{
|
|
path: '/linkaccount',
|
|
url: './pages/linkaccount.html',
|
|
name: 'linkaccount',
|
|
routes: [
|
|
{
|
|
path: "/new",
|
|
url: "./pages/linkaccount_new.html",
|
|
name: "linkaccount_new",
|
|
options: {
|
|
transition: 'f7-parallax'
|
|
}
|
|
},
|
|
{
|
|
path: "/existing",
|
|
url: "./pages/linkaccount_existing.html",
|
|
name: "linkaccount_existing",
|
|
options: {
|
|
transition: 'f7-parallax'
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: '/offers',
|
|
name: 'offers',
|
|
async: openOffersAsync,
|
|
on: {
|
|
pageAfterIn: function () {
|
|
JsBarcode(".offerbarcode").init();
|
|
}
|
|
}
|
|
},
|
|
{
|
|
path: '/track/:id',
|
|
name: 'trackresult',
|
|
async: trackOpenAsync
|
|
},
|
|
{
|
|
path: '/credits',
|
|
url: './pages/credits.html',
|
|
name: 'credits'
|
|
},
|
|
{
|
|
path: '/settings',
|
|
name: 'settings',
|
|
async: function (routeTo, routeFrom, resolve, reject) {
|
|
var settings = [];
|
|
if (!inStorage("client_uuid")) {
|
|
settings.push(
|
|
{
|
|
setting: "linkaccount",
|
|
title: "Link To Account",
|
|
text: "Connect to your Netsyms billing account to enable more features.",
|
|
onclick: "router.navigate('/linkaccount')",
|
|
link: true
|
|
}
|
|
);
|
|
} else {
|
|
settings.push(
|
|
{
|
|
setting: "linkaccount",
|
|
title: "Unlink Account",
|
|
text: "Disconnect this device from your Netsyms account.",
|
|
onclick: "unlinkAccount()",
|
|
link: true
|
|
}
|
|
);
|
|
}
|
|
settings.push(
|
|
{
|
|
setting: "display",
|
|
title: "Display and Appearance",
|
|
text: "",
|
|
onclick: "router.navigate('/settings/display')",
|
|
link: true
|
|
}
|
|
);
|
|
|
|
settings.push(
|
|
{
|
|
setting: "versions",
|
|
title: "Netsyms PC Repair app v" + app_version,
|
|
text: "Copyright © 2019-2020 Netsyms Technologies. Licensed under the Mozilla Public License 2.0.",
|
|
onclick: ""
|
|
},
|
|
{
|
|
setting: "opensource",
|
|
title: "Credits and open source info",
|
|
text: "",
|
|
onclick: "router.navigate('/credits')",
|
|
link: true
|
|
},
|
|
{
|
|
setting: "privacy",
|
|
title: "Privacy policy and legal",
|
|
text: "",
|
|
onclick: "openBrowser('https://netsyms.com/legal?pk_campaign=PCRepairApp')",
|
|
link: true
|
|
});
|
|
resolve({
|
|
templateUrl: './pages/settings.html'
|
|
}, {
|
|
context: {
|
|
page_title: "Settings",
|
|
settings: settings
|
|
}
|
|
});
|
|
},
|
|
routes: [
|
|
{
|
|
path: '/display',
|
|
name: 'settings',
|
|
async: function (routeTo, routeFrom, resolve, reject) {
|
|
var settings = [
|
|
{
|
|
setting: "apptheme",
|
|
title: "Color theme",
|
|
select: true,
|
|
options: [
|
|
{
|
|
value: "auto",
|
|
label: "Auto",
|
|
selected: getStorage("apptheme") == null || getStorage("apptheme") == "auto"
|
|
},
|
|
{
|
|
value: "dark",
|
|
label: "Dark",
|
|
selected: getStorage("apptheme") == "dark"
|
|
},
|
|
{
|
|
value: "light",
|
|
label: "Light",
|
|
selected: getStorage("apptheme") == "light"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
setting: "animation",
|
|
title: "Animations",
|
|
select: true,
|
|
options: [
|
|
{
|
|
value: "auto",
|
|
label: "On",
|
|
selected: getStorage("animation") == null || getStorage("animation") == "auto" || getStorage("animation") == "on"
|
|
},
|
|
// {
|
|
// value: "on",
|
|
// label: "On",
|
|
// selected: getStorage("animation") == "on"
|
|
// },
|
|
{
|
|
value: "off",
|
|
label: "Off",
|
|
selected: getStorage("animation") == "off"
|
|
}
|
|
]
|
|
}
|
|
];
|
|
resolve({
|
|
templateUrl: './pages/settings.html'
|
|
}, {
|
|
context: {
|
|
page_title: "Display Settings",
|
|
settings: settings
|
|
}
|
|
});
|
|
}
|
|
}
|
|
]
|
|
}
|
|
];
|