mirror of
https://github.com/Expand-sys/ccashfrontend
synced 2026-03-22 12:37:13 +11:00
working for now but need to fix graph
This commit is contained in:
parent
17ca48c6dd
commit
88a0482e9a
6 changed files with 79 additions and 66 deletions
7
index.js
7
index.js
|
|
@ -238,7 +238,7 @@ fastify.post(
|
||||||
req.session.set("errors", "");
|
req.session.set("errors", "");
|
||||||
req.session.set("successes", "");
|
req.session.set("successes", "");
|
||||||
let result;
|
let result;
|
||||||
//result = await client.sendFunds(a_name, senderpass, name, amount);
|
let auth = req.session.get("b64");
|
||||||
try {
|
try {
|
||||||
result = await got.post(`${api}/user/transfer`, {
|
result = await got.post(`${api}/user/transfer`, {
|
||||||
headers: {
|
headers: {
|
||||||
|
|
@ -247,12 +247,11 @@ fastify.post(
|
||||||
},
|
},
|
||||||
json: {
|
json: {
|
||||||
name: name,
|
name: name,
|
||||||
amount: amount,
|
amount: parseInt(amount),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
req.session.set("errors", `${e.response.body}`);
|
req.session.set("errors", `${e}`);
|
||||||
console.log(e.response.body);
|
|
||||||
}
|
}
|
||||||
if (result) {
|
if (result) {
|
||||||
req.session.set("successes", "Transfer successful");
|
req.session.set("successes", "Transfer successful");
|
||||||
|
|
|
||||||
|
|
@ -82,10 +82,6 @@ p {
|
||||||
.text-white {
|
.text-white {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
.form-check-input {
|
|
||||||
margin-left: 0;
|
|
||||||
padding: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type="radio"]:checked ~ .reveal-if-active,
|
input[type="radio"]:checked ~ .reveal-if-active,
|
||||||
input[type="checkbox"]:checked ~ .reveal-if-active {
|
input[type="checkbox"]:checked ~ .reveal-if-active {
|
||||||
|
|
@ -123,7 +119,6 @@ $w: Min(10em, 100%);
|
||||||
}
|
}
|
||||||
.logo {
|
.logo {
|
||||||
align-content: center;
|
align-content: center;
|
||||||
width: 115px;
|
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
border-color: rgba(113, 63, 230, 1);
|
border-color: rgba(113, 63, 230, 1);
|
||||||
|
|
@ -136,3 +131,6 @@ $w: Min(10em, 100%);
|
||||||
rgba(38, 9, 108, 1) 100%
|
rgba(38, 9, 108, 1) 100%
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
#navbars {
|
||||||
|
flex-grow: 0;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -199,7 +199,7 @@ module.exports = function (fastify, opts, done) {
|
||||||
},
|
},
|
||||||
json: {
|
json: {
|
||||||
name: name,
|
name: name,
|
||||||
new_pass: new_pass,
|
pass: new_pass,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
|
||||||
|
|
@ -83,15 +83,29 @@ block content
|
||||||
0: {type: 'exponential', color: '#333', opacity: .5},
|
0: {type: 'exponential', color: '#333', opacity: .5},
|
||||||
1: {type: 'linear', color: '#111', opacity: .3}
|
1: {type: 'linear', color: '#111', opacity: .3}
|
||||||
},
|
},
|
||||||
width: 670,
|
width: 680,
|
||||||
height: 350,
|
height: 350,
|
||||||
};
|
};
|
||||||
|
function resize () {
|
||||||
var chart = new google.visualization.LineChart(document.getElementById('chart_div'));
|
var chart = new google.visualization.LineChart(document.getElementById('chart_div'));
|
||||||
|
|
||||||
chart.draw(data, options);
|
chart.draw(data, options);
|
||||||
window.onload = resize;
|
|
||||||
window.onresize = resize;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window.onload = resize;
|
||||||
|
window.onresize = resize;
|
||||||
|
|
||||||
|
}
|
||||||
|
script(type='text/javascript').
|
||||||
|
function resize () {
|
||||||
|
var chart = new google.visualization.LineChart(document.getElementById('chart_div'));
|
||||||
|
chart.draw(data, options);
|
||||||
|
}
|
||||||
|
var nav = document.querySelector('.nav-link');
|
||||||
|
nav.addEventListener('click', function(e) {
|
||||||
|
// Event delegation - make sure it was one of the tab nav items that was clicked
|
||||||
|
if (e.target) {
|
||||||
|
resize();
|
||||||
|
// Call the redraw function for the charts
|
||||||
|
}
|
||||||
|
});
|
||||||
br
|
br
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ doctype html
|
||||||
html
|
html
|
||||||
head
|
head
|
||||||
title CCashBank
|
title CCashBank
|
||||||
link(rel="stylesheet", href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css", integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z", crossorigin="anonymous")
|
link(rel="stylesheet", href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css", integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3", crossorigin="anonymous")
|
||||||
link(rel="preconnect" href="https://fonts.gstatic.com")
|
link(rel="preconnect" href="https://fonts.gstatic.com")
|
||||||
link(href="https://fonts.googleapis.com/css2?family=Lato&family=Montserrat&display=swap" rel="stylesheet")
|
link(href="https://fonts.googleapis.com/css2?family=Lato&family=Montserrat&display=swap" rel="stylesheet")
|
||||||
if random
|
if random
|
||||||
|
|
@ -27,8 +27,8 @@ html
|
||||||
button.navbar-toggler(type='button', data-toggle='collapse', data-target='#navbars', aria-controls='navbars', aria-expanded='false', aria-label='Toggle navigation')
|
button.navbar-toggler(type='button', data-toggle='collapse', data-target='#navbars', aria-controls='navbars', aria-expanded='false', aria-label='Toggle navigation')
|
||||||
span.navbar-toggler-icon
|
span.navbar-toggler-icon
|
||||||
#navbars.collapse.navbar-collapse
|
#navbars.collapse.navbar-collapse
|
||||||
|
.d-flex
|
||||||
ul.navbar-nav.mr-right.text-white
|
ul.navbar-nav.text-white
|
||||||
if user == undefined
|
if user == undefined
|
||||||
li.nav-item
|
li.nav-item
|
||||||
a.nav-link(href='/login').text-white Login
|
a.nav-link(href='/login').text-white Login
|
||||||
|
|
@ -60,4 +60,5 @@ html
|
||||||
script(src="https://code.jquery.com/jquery-3.6.0.slim.min.js" integrity="sha256-u7e5khyithlIdTpu22PHhENmPcRdFiHRjhAuHcs05RI="
|
script(src="https://code.jquery.com/jquery-3.6.0.slim.min.js" integrity="sha256-u7e5khyithlIdTpu22PHhENmPcRdFiHRjhAuHcs05RI="
|
||||||
crossorigin="anonymous")
|
crossorigin="anonymous")
|
||||||
script(src='/js/main.js')
|
script(src='/js/main.js')
|
||||||
script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js", integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV", crossorigin="anonymous")
|
script(src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.min.js", integrity="sha384-QJHtvGhmr9XOIpI6YVutG+2QOK9T+ZnN4kzFN1RtK3zEFEIsxhlmWl5/YESvpZ13", crossorigin="anonymous")
|
||||||
|
script(src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js", integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p", crossorigin="anonymous")
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,13 @@ block content
|
||||||
h1 Welcome to CCashBank Front End SETUP
|
h1 Welcome to CCashBank Front End SETUP
|
||||||
.card
|
.card
|
||||||
form(method='POST', action='/setup')
|
form(method='POST', action='/setup')
|
||||||
#form-group
|
|
||||||
label BANKAPIURL:
|
label BANKAPIURL:
|
||||||
input.form-control(name='url', type='url')
|
input.form-control(name='url', type='url')
|
||||||
label SSL enabled on front end? leave unchecked if unsure:
|
label SSL enabled on front end? leave unchecked if unsure:
|
||||||
input.form-control(name='secure', type='checkbox')
|
.form-check
|
||||||
|
input.form-check-input(name='secure', type='checkbox')
|
||||||
br
|
br
|
||||||
|
|
||||||
input.btn.btn-primary(type='submit',value='Submit')
|
input.btn.btn-primary(type='submit',value='Submit')
|
||||||
br
|
br
|
||||||
br
|
br
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue