Compare commits

...

8 Commits
v2.0 ... master

1
.gitignore vendored

@ -3,3 +3,4 @@ platforms
plugins
node_modules
/www/old/
build.json

@ -3,7 +3,7 @@ Netsyms Mobile
A mobile app for easy and secure access to the Netsyms Apps on the go.
https://netsyms.biz/apps/bizmobile
https://netsyms.biz/apps/netsymsmobile
Features
--------

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.netsyms.apps.Mobile" version="2.0" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="com.netsyms.apps.Mobile" version="2.0.3" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Netsyms</name>
<description>
Securely use the Netsyms Apps from your phone or tablet.
@ -33,7 +33,7 @@
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
<application android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" />
</edit-config>
<resource-file src="res/android/values/ic_launcher_background.xml" target="app/src/main/res/values/ic_launcher_background.xml" />
<resource-file src="res/android/drawable/ic_launcher_background.xml" target="app/src/main/res/drawable/ic_launcher_background.xml" />
<resource-file src="res/android/drawable/ic_launcher_foreground.xml" target="app/src/main/res/drawable/ic_launcher_foreground.xml" />
<resource-file src="res/android/mipmap-anydpi-v26/ic_launcher.xml" target="app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml" />
<resource-file src="res/android/mipmap-anydpi-v26/ic_launcher_round.xml" target="app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml" />

@ -46,7 +46,7 @@ made subject to such option by the copyright holder.
<!--
Generated file; DO NOT EDIT.
-->
<project name="BusinessMobile" basedir="..">
<project name="NetsymsMobile" basedir="..">
<property file="nbproject/configs/${config}.properties" />
<scriptdef name="checkVersion" language="javascript">

@ -1,8 +1,8 @@
auxiliary.org-netbeans-modules-cordova.cordova_5f_build_5f_script_5f_version=52
auxiliary.org-netbeans-modules-cordova.phonegap=false
file.reference.BusinessMobile-test=test
file.reference.BusinessMobile-www=www
file.reference.NetsymsMobile-test=test
file.reference.NetsymsMobile-www=www
files.encoding=UTF-8
project.licensePath=nbproject/mplheader.txt
site.root.folder=${file.reference.BusinessMobile-www}
test.folder=${file.reference.BusinessMobile-test}
site.root.folder=${file.reference.NetsymsMobile-www}
test.folder=${file.reference.NetsymsMobile-test}

@ -1,7 +1,7 @@
{
"name": "com.netsyms.apps.Mobile",
"displayName": "Netsyms Apps for Mobile",
"version": "2.0.0",
"version": "2.0.1",
"description": "Securely use the Netsyms Apps from your phone or tablet.",
"main": "index.html",
"author": "Netsyms Technologies",

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#2196F3</color>
</resources>

@ -1,6 +1,6 @@
<?xml version='1.0' encoding='utf-8'?>
<resources>
<string name="app_name">Business F7</string>
<string name="app_name">Netsyms</string>
<string name="launcher_name">@string/app_name</string>
<string name="activity_name">@string/launcher_name</string>
</resources>

@ -21,7 +21,7 @@
<script src="cordova.js"></script>
<script src="vendor/js/jquery-3.2.1.min.js"></script>
<script src="vendor/js/jquery-3.4.1.min.js"></script>
<script src="vendor/js/framework7.min.js"></script>
<script src="vendor/js/fontawesome/fontawesome.min.js"></script>
<script src="vendor/js/fontawesome/solid.min.js"></script>

@ -49,10 +49,14 @@ function recoveraccounts(callback) {
/**
* Switch to a different account.
* @param {int} account The selected account index from localStorage.getItem('accounts')
* @param {boolean} showmsg [HAS NO EFFECT] Whether to show the "switched accounts" alert dialog. Default True.
* @returns {undefined}
*/
function switchaccount(account) {
// If there isn't an accounts list yet, this shouldi take us back to the setup
function switchaccount(account, showmsg) {
if (typeof showmsg != 'boolean') {
showmsg = true;
}
// If there isn't an accounts list yet, this should take us back to the setup
if (!isconfigvalid()) {
restartApplication();
}
@ -69,7 +73,9 @@ function switchaccount(account) {
accountid = account;
restartApplication();
navigator.notification.alert("Successfully switched accounts.", null, "Switched", 'OK');
if (showmsg == true) {
//navigator.notification.alert("Successfully switched accounts.", null, "Switched", 'OK');
}
}
/**

@ -10,7 +10,8 @@ setuppassword = "";
setupsynckey = "";
setupsyncurl = "";
netsymscomurl = "https://account.netsyms.com/mobile/index.php";
netsymscomurl = "https://apps.netsyms.com/account/mobile/index.php";
netsymsbizurl = "https://BIZID.netsyms.biz/accounthub/mobile/index.php";
if (localStorage.getItem("firstrun") === null) {
$("#setuptitle").text("Setup");
@ -116,7 +117,7 @@ function personalsetup() {
if (result.status == "OK") {
var code = result.code;
var accid = addaccount(username, password, netsymscomurl, code);
switchaccount(accid);
switchaccount(accid, false);
localStorage.setItem("firstrun", "1");
navigator.notification.alert("Account connected!", null, "Success", 'Continue');
restartApplication();
@ -131,6 +132,39 @@ function personalsetup() {
});
}
function businesssetup() {
app.preloader.show();
var username = $("#personal_username").val();
var password = $("#personal_password").val();
var url = netsymsbizurl.replace("BIZID", $("#bizid").val());
$.post(url, {
username: username,
password: password,
key: "NOKEY",
desc: device.platform + " " + device.model + " " + device.serial,
action: "generatesynccode"
}, function (result) {
app.preloader.hide();
if (result.status == "OK") {
var code = result.code;
var accid = addaccount(username, password, url, code);
switchaccount(accid, false);
localStorage.setItem("firstrun", "1");
navigator.notification.alert("Account connected!", null, "Success", 'Continue');
restartApplication();
} else if (result.status == "ERROR") {
navigator.notification.alert(result.msg, null, "Error", 'Dismiss');
} else {
navigator.notification.alert("Something went wrong, please try again.", null, "Error", 'Dismiss');
}
}, "json").fail(function () {
app.preloader.hide();
navigator.notification.alert("Something went wrong, please try again.", null, "Error", 'Dismiss');
});
}
function scanCode() {
try {
cordova.plugins.barcodeScanner.scan(

@ -15,7 +15,7 @@ function savePassword() {
if (data.status === 'OK') {
setuppassword = $('#passbox').val();
var accid = addaccount(setupusername, setuppassword, setupsyncurl, setupsynckey);
switchaccount(accid);
switchaccount(accid, false);
localStorage.setItem("firstrun", "1");
navigator.notification.alert("Account connected!", null, "Success", 'Continue');
restartApplication();

@ -21,7 +21,7 @@
<ul id="accountlist">
{{#each accounts}}
<li class="swipeout accountlist-item" data-id="{{id}}">
<div class="item-content swipeout-content">
<div class="item-content swipeout-content" data-id="{{id}}">
<div class="item-media"><img src="img/accounticons/{{icon}}.svg" width="44"/></div>
<div class="item-inner">
<div class="item-title-row">

@ -27,7 +27,8 @@
<li>
<a href="#" class="item-link" onclick='router.navigate("/setup/1", {
context: {
personal: true
personal: true,
business: false
}
});'>
<div class="item-content">
@ -46,7 +47,12 @@
</a>
</li>
<li>
<a href="/setup/1" class="item-link">
<a href="#" class="item-link" onclick='router.navigate("/setup/1", {
context: {
personal: false,
business: true
}
});'>
<div class="item-content">
<div class="item-media">
<img src="img/accounticons/business.svg" width="44"/>

@ -19,10 +19,15 @@
<div class="page-content">
<div class="block">
{{#if personal}}
{{#js_if "this.personal == true || this.business == true"}}
<div class="card">
<div class="card-content card-content-padding">
{{#if personal}}
<p>Type your netsyms.com username and password.</p>
{{/if}}
{{#if business}}
<p>Type your netsyms.biz username, password, and business ID.</p>
{{/if}}
<div class="list no-hairlines">
<ul>
@ -45,18 +50,31 @@
</div>
</div>
</li>
{{#if business}}
<li class="item-content item-input">
<div class="item-inner">
<div class="item-title item-floating-label">Business ID (____.netsyms.biz)</div>
<div class="item-input-wrap">
<input type="text" id="bizid" placeholder="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
<span class="input-clear-button"></span>
</div>
</div>
</li>
{{/if}}
</ul>
</div>
<br />
<div class="button button-fill button-raised button-round" onclick="personalsetup()">
<div class="button button-fill button-raised button-round" onclick="{{#if personal}}personalsetup(){{else}}businesssetup(){{/if}}">
Continue
</div>
</div>
</div>
<p style="text-align: center; font-size: 120%;">- or -</p>
{{/if}}
{{/js_if}}
<div class="card">
<div class="card-content card-content-padding">

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save