mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-11-09 10:13:55 +00:00
Delete ND_ATMs/source/ui directory
This commit is contained in:
1 parent
d5d3b85d1a
commit
f9c2940e15
5 files changed
-401
No files matched your search
Binary file not shown.
|
Before Width: | Height: | Size: 21 KiB |
@@ -1,40 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<script src="https://use.fontawesome.com/releases/v5.15.4/js/all.js" data-auto-a11y="true"></script>
|
||||
<script src="js/jquery-3.6.0.min.js" type="text/javascript"></script>
|
||||
<script src="js/listener.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<section id="overlay">
|
||||
<div id="info">
|
||||
<img src="img/mazebank.png" id="logo">
|
||||
<p id="date"></p>
|
||||
<p id="time"></p>
|
||||
<hr id="redline">
|
||||
<hr id="redbox">
|
||||
<p id="welcome">Welcome back</p>
|
||||
<h1 id="playername">John Doe</h1>
|
||||
</div>
|
||||
<form id="atm">
|
||||
<p id="balance"></p>
|
||||
<input id="enteredAmount" class="input" type="number" placeholder="AMOUNT" min="10" max="2500">
|
||||
<button id="withdrawButton" class="input"><i class="fas fa-coins"></i> WITHDRAW</button>
|
||||
<button id="depositButton" class="input"><i class="fas fa-credit-card"></i> DEPOSIT</button>
|
||||
</form>
|
||||
<div id="loader"></div>
|
||||
<div id="confirmationScreen">
|
||||
<p id="confirmText">Are you sure you'd like to perform this action</p>
|
||||
<button id="confirmButton" type="submit" form="atm" class="input"><i class="fas fa-check-circle"></i> CONFIRM</button>
|
||||
<button id="cancelButton" type="reset" form="atm" class="input"><i class="fas fa-times-circle"></i> CANCEL</button>
|
||||
</div>
|
||||
<div id="successScreen">
|
||||
<p id="confirmText">Success!</p>
|
||||
<button id="mainMenuButton" type="reset" form="atm" class="input"><i class="fas fa-chevron-circle-left"></i> BACK TO MAIN MENU</button>
|
||||
</div>
|
||||
<button id="closeButton" type="reset" form="atm" class="input"><i class="fas fa-sign-out-alt"></i> EXIT</button>
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */
|
||||
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:y}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,S="sizzle"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),j=function(e,t){return e===t&&(l=!0),0},D={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",B=new RegExp(M+"+","g"),$=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^Line truncated
|
||||
@@ -1,148 +0,0 @@
|
||||
$(function() {
|
||||
let deposit = false
|
||||
let withdraw = false
|
||||
|
||||
function display(bool) {
|
||||
if (bool) {
|
||||
$("#overlay").show();
|
||||
} else {
|
||||
$("#overlay").hide();
|
||||
}
|
||||
}
|
||||
function atmDisplay(bool) {
|
||||
if (bool) {
|
||||
$("#atm").show();
|
||||
$("#loader").hide();
|
||||
$("#confirmationScreen").hide();
|
||||
$("#successScreen").hide()
|
||||
} else {
|
||||
$("#atm").hide();
|
||||
}
|
||||
}
|
||||
function loader(bool) {
|
||||
if (bool) {
|
||||
$("#loader").show();
|
||||
$("#atm").hide();
|
||||
$("#confirmationScreen").hide();
|
||||
$("#successScreen").hide()
|
||||
} else {
|
||||
$("#loader").hide();
|
||||
}
|
||||
}
|
||||
function confirmationScreen(bool) {
|
||||
if (bool) {
|
||||
$("#confirmationScreen").show();
|
||||
$("#atm").hide();
|
||||
$("#loader").hide();
|
||||
$("#successScreen").hide()
|
||||
} else {
|
||||
$("#confirmationScreen").hide();
|
||||
}
|
||||
}
|
||||
function successScreen(bool) {
|
||||
if (bool) {
|
||||
$("#successScreen").show()
|
||||
$("#confirmationScreen").hide();
|
||||
$("#atm").hide();
|
||||
$("#loader").hide();
|
||||
} else {
|
||||
$("#successScreen").hide()
|
||||
}
|
||||
}
|
||||
display(false)
|
||||
atmDisplay(true)
|
||||
loader(false)
|
||||
confirmationScreen(false)
|
||||
successScreen(false)
|
||||
|
||||
const options = {year: 'numeric', month: 'long', day: 'numeric'};
|
||||
const today = new Date();
|
||||
|
||||
window.addEventListener("message", function(event) {
|
||||
const item = event.data;
|
||||
if (item.status) {
|
||||
display(true)
|
||||
$("#playername").text(item.playerName)
|
||||
$("#balance").text(item.balance)
|
||||
$("#date").text(`${item.date}, ${today.toLocaleDateString("en-US", options)}`)
|
||||
$("#time").text(item.time)
|
||||
} else {
|
||||
display(false)
|
||||
}
|
||||
})
|
||||
|
||||
$("#withdrawButton").click(function() {
|
||||
withdraw = true
|
||||
$.post("https://ND_ATMs/sound", JSON.stringify({}));
|
||||
atmDisplay(false)
|
||||
loader(true)
|
||||
setTimeout(() => {
|
||||
loader(false)
|
||||
confirmationScreen(true)
|
||||
}, 400);
|
||||
return false
|
||||
})
|
||||
|
||||
$("#depositButton").click(function() {
|
||||
deposit = true
|
||||
$.post("https://ND_ATMs/sound", JSON.stringify({}));
|
||||
atmDisplay(false)
|
||||
loader(true)
|
||||
setTimeout(() => {
|
||||
loader(false)
|
||||
confirmationScreen(true)
|
||||
}, 400);
|
||||
return false
|
||||
})
|
||||
|
||||
$("#cancelButton").click(function() {
|
||||
withdraw = false
|
||||
deposit = false
|
||||
$.post("https://ND_ATMs/sound", JSON.stringify({}));
|
||||
confirmationScreen(false)
|
||||
loader(true)
|
||||
setTimeout(() => {
|
||||
loader(false)
|
||||
atmDisplay(true)
|
||||
}, 300);
|
||||
return false
|
||||
})
|
||||
|
||||
$("#atm").submit(function() {
|
||||
$.post("https://ND_ATMs/sound", JSON.stringify({}));
|
||||
confirmationScreen(false)
|
||||
loader(true)
|
||||
setTimeout(() => {
|
||||
loader(false)
|
||||
if (withdraw) {
|
||||
$.post("https://ND_ATMs/withdraw", JSON.stringify({
|
||||
amount: $("#enteredAmount").val()
|
||||
}));
|
||||
} else if (deposit) {
|
||||
$.post("https://ND_ATMs/deposit", JSON.stringify({
|
||||
amount: $("#enteredAmount").val()
|
||||
}));
|
||||
}
|
||||
withdraw = false
|
||||
deposit = false
|
||||
successScreen(true)
|
||||
}, 2500);
|
||||
return false
|
||||
})
|
||||
|
||||
$("#mainMenuButton").click(function() {
|
||||
$.post("https://ND_ATMs/sound", JSON.stringify({}));
|
||||
successScreen(false)
|
||||
loader(true)
|
||||
setTimeout(() => {
|
||||
loader(false)
|
||||
atmDisplay(true)
|
||||
}, 300);
|
||||
return false
|
||||
})
|
||||
|
||||
$("#closeButton").click(function() {
|
||||
$.post("https://ND_ATMs/close", JSON.stringify({}));
|
||||
return
|
||||
})
|
||||
});
|
||||
@@ -1,211 +0,0 @@
|
||||
body {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
#overlay {
|
||||
position: absolute;
|
||||
height: 60vh;
|
||||
width: 50vw;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
margin: auto;
|
||||
border-radius: 10px;
|
||||
background-image: linear-gradient(rgb(255, 255, 255), rgb(199, 199, 199));
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
#logo {
|
||||
position: absolute;
|
||||
width: 300px;
|
||||
top: 2vh;
|
||||
left: 6vw;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
#date {
|
||||
position: absolute;
|
||||
top: 3.5vh;
|
||||
right: 6vw;
|
||||
color: black;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#time {
|
||||
position: absolute;
|
||||
font-weight: 500;
|
||||
top: -1.5vh;
|
||||
right: 6vw;
|
||||
color: black;
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
#balance {
|
||||
position: absolute;
|
||||
top: 23vh;
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;;
|
||||
font-weight: 500;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
color: black;
|
||||
font-size: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#confirmText {
|
||||
position: absolute;
|
||||
top: 26vh;
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;;
|
||||
font-weight: 500;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
color: black;
|
||||
font-size: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#redline {
|
||||
position: absolute;
|
||||
height: 1vh;
|
||||
width: 80%;
|
||||
top: 9vh;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
background-color: red;
|
||||
border-radius: 5px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#redbox {
|
||||
position: absolute;
|
||||
height: 5vh;
|
||||
width: 80%;
|
||||
top: 11vh;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
background-color: red;
|
||||
background-image: linear-gradient(rgb(204, 2, 2), rgb(255, 0, 0));
|
||||
border-radius: 5px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#playername {
|
||||
position: absolute;
|
||||
top: 13vh;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
color: white;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#welcome {
|
||||
position: absolute;
|
||||
top: 11.5vh;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
color: white;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.input {
|
||||
height: 4vh;
|
||||
width: 7.3vw;
|
||||
background-color: rgb(255, 0, 0);
|
||||
font-weight: 1000;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
margin: auto;
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;;
|
||||
transition: 50ms;
|
||||
}
|
||||
|
||||
.input:hover {
|
||||
transition: 50ms;
|
||||
background-color: rgb(214, 2, 2);
|
||||
}
|
||||
|
||||
#enteredAmount {
|
||||
position: absolute;
|
||||
width: 15.8vw;
|
||||
top: 28vh;
|
||||
left: 0;
|
||||
right: 0;
|
||||
color: black;
|
||||
background-color: white;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#withdrawButton {
|
||||
position: absolute;
|
||||
top: 36.5vh;
|
||||
left: 17vw;
|
||||
}
|
||||
|
||||
#depositButton {
|
||||
position: absolute;
|
||||
top: 36.5vh;
|
||||
right: 17vw;
|
||||
}
|
||||
|
||||
#mainMenuButton {
|
||||
position: absolute;
|
||||
width: 10vw;
|
||||
top: 34vh;
|
||||
right: 0;
|
||||
left: 0;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
#closeButton {
|
||||
position: absolute;
|
||||
height: 4.8vh;
|
||||
width: 80%;
|
||||
top: 50vh;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
#confirmButton{
|
||||
position: absolute;
|
||||
top: 33vh;
|
||||
left: 17vw;
|
||||
}
|
||||
|
||||
#cancelButton {
|
||||
position: absolute;
|
||||
top: 33vh;
|
||||
right: 17vw;
|
||||
}
|
||||
|
||||
#confirmationScreen {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#loader {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
border: 16px solid #d1d1d1;
|
||||
border-radius: 50%;
|
||||
border-top: 16px solid red;
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
animation: spin 1s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% { transform: rotate(0deg); }
|
||||
100% { transform: rotate(360deg); }
|
||||
}
|
||||
Reference in new issue
Block a user