Update FLO_webWallet_mainnet.html

This commit is contained in:
sairaj mote 2019-10-22 15:36:07 +05:30 committed by GitHub
parent 708e0ce4b1
commit 9d1e46d6ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<title>FLO web wallet</title>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
@ -54,6 +54,7 @@ button {
cursor: pointer;
-webkit-transition: all 0.2s ease;
transition: all 0.2s ease;
font-size: 0.8em;
}
button:hover {
@ -279,7 +280,7 @@ button:focus, input:focus, textarea:focus {
display: -ms-flexbox;
display: flex;
width: 80vw;
padding: 1em;
padding: 1em 1.5em;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
background: var(--body-color);
@ -292,13 +293,13 @@ button:focus, input:focus, textarea:focus {
#overlay #popup .input {
width: 100% !important;
margin: 2em 1em !important;
margin: 2em 0.5em !important;
}
#overlay #popup button {
width: 6em !important;
border: none;
margin: 0 1em !important;
width: auto;
margin: 0 0.5em;
}
#overlay #popup h4 {
@ -356,7 +357,7 @@ button:focus, input:focus, textarea:focus {
display: grid;
left: 0;
position: absolute;
top: 64px;
top: 0;
right: 0;
bottom: 54px;
}
@ -564,20 +565,68 @@ input[type=number]::-webkit-outer-spin-button {
display: grid;
top: 0;
bottom: 0;
width: 100%;
left: 0;
right: 0;
-ms-flex-line-pack: start;
align-content: flex-start;
z-index: 3;
z-index: 2;
}
#dispMsg #title-bar {
position: absolute;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
width: 100%;
height: auto;
-ms-flex-line-pack: center;
align-content: center;
background: var(--body-color);
border-bottom: 1px solid var(--sec-color);
}
#dispMsg #title-bar svg {
display: flexbox;
height: 2em;
width: 2em;
padding: 0.4em;
margin: 0.5em;
fill: var(--bw) !important;
cursor: pointer;
-ms-flex-item-align: center;
align-self: center;
overflow: visible;
}
#dispMsg #title-bar span {
padding: 0.5em;
-ms-flex-item-align: center;
-ms-grid-row-align: center;
align-self: center;
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1;
text-overflow: ellipsis;
font-weight: bold;
line-height: 1.5em;
}
#dispMsg #title-bar h5 {
margin: 0;
font-weight: normal;
}
#dispMsg #title-bar h3 {
margin: 0;
}
#dispMsg trans-container {
position: absolute;
overflow-y: auto;
width: 100%;
right: 0;
left: 0;
padding: 0.5em 0;
top: 64px;
top: 65px;
bottom: 0;
display: -webkit-box;
display: -ms-flexbox;
@ -595,10 +644,9 @@ input[type=number]::-webkit-outer-spin-button {
display: flex;
position: relative;
width: 100%;
padding: 0 1em;
margin: 0.5em 1em;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
margin: 0.25em 0;
border-radius: 0.25em;
background: var(--body-color);
}
@ -620,20 +668,23 @@ input[type=number]::-webkit-outer-spin-button {
align-self: center;
width: 100%;
line-height: 1.4em;
padding: 1em 0;
padding: 1em;
}
#dispMsg trans-container transaction-card div:nth-of-type(1) {
word-break: break-all;
opacity: 0.8;
font-size: 0.9em;
border-bottom: 1px solid var(--sec-color);
padding-bottom: 0.5em;
}
#dispMsg trans-container transaction-card div:nth-of-type(2) {
overflow-wrap: break-word;
word-wrap: break-word;
word-break: break-all;
-webkit-hyphens: auto;
-ms-hyphens: auto;
hyphens: auto;
padding-top: 0.5em;
}
#dispMsg trans-container transaction-card div:nth-of-type(3) {
@ -737,7 +788,7 @@ loading svg .st1 {
align-content: center;
-webkit-transform: translateY(2em);
transform: translateY(2em);
padding: 1em;
padding: 1em 1.5em;
background: var(--body-color);
border-radius: 0.25em;
-webkit-transition: all 0.2s ease;
@ -747,7 +798,7 @@ loading svg .st1 {
}
#edit-container #edit .input {
margin: 1em;
margin: 1em 0.5em;
width: 100% !important;
}
@ -807,7 +858,7 @@ loading svg .st1 {
align-content: center;
-webkit-transform: translateY(2em);
transform: translateY(2em);
padding: 1em;
padding: 1em 1.5em;
background: var(--body-color);
border-radius: 0.25em;
-webkit-transition: all 0.2s ease;
@ -817,7 +868,7 @@ loading svg .st1 {
}
#add-container #add .input {
margin: 1em;
margin: 1em 0.5em;
width: 100% !important;
}
@ -916,63 +967,25 @@ loading svg .st1 {
background: var(--sec-color);
}
.title-bar {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
width: 100%;
top: 0;
left: 0;
right: 0;
height: auto;
position: fixed;
-ms-flex-line-pack: center;
align-content: center;
background: var(--body-color);
}
.title-bar svg {
display: flexbox;
width: 2em;
height: 1.2em;
fill: var(--bw) !important;
cursor: pointer;
margin: 0.5em;
-ms-flex-item-align: center;
align-self: center;
}
.title-bar span {
padding: 0.5em;
-ms-flex-item-align: center;
-ms-grid-row-align: center;
align-self: center;
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1;
text-overflow: ellipsis;
font-weight: bold;
line-height: 1.5em;
}
.title-bar h5 {
margin: 0;
font-weight: normal;
}
.title-bar h3 {
margin: 0;
}
#settings-page section {
width: 100%;
border-bottom: 1px solid var(--sec-color);
display: -ms-grid;
display: grid;
padding-bottom: 1em;
}
#settings-page section:last-of-type {
border: none;
}
#settings-page h3, #settings-page h4 {
display: flexbox;
width: 100%;
margin-top: 0.5em;
}
#settings-page h5 {
margin: 0;
}
#settings-page div {
@ -993,7 +1006,6 @@ loading svg .st1 {
#settings-page .row span {
font-size: 0.8em;
opacity: 0.8;
}
.slide-up {
@ -1213,13 +1225,6 @@ input:checked + .slider:before {
}
@media screen and (min-width: 768px) {
.title-bar {
position: absolute;
background: transparent;
}
.title-bar svg:last-of-type {
margin-right: 1em;
}
.innerPage {
position: absolute;
overflow-y: auto;
@ -1239,6 +1244,11 @@ input:checked + .slider:before {
-ms-flex-line-pack: center;
align-content: center;
}
#settings-page #deleteDB button {
margin-left: 0 !important;
margin-right: auto !important;
width: auto;
}
#monitor-list monitor {
-ms-flex-item-align: auto;
align-self: auto;
@ -1264,7 +1274,7 @@ input:checked + .slider:before {
opacity: 0.6;
}
#add, #edit {
width: 360px !important;
width: 400px !important;
}
::-webkit-scrollbar {
width: 8px;
@ -1387,8 +1397,6 @@ input:checked + .slider:before {
}
#main-card .right {
left: 64px;
position: absolute;
top: 64px;
right: 0;
bottom: 0;
}
@ -1434,16 +1442,61 @@ input:checked + .slider:before {
}
}
@media all and (device-width: 768px) and (device-height: 1024px) and (orientation: portrait) {
#main-card {
width: 80% !important;
height: 60vh !important;
}
monitor svg {
opacity: 1 !important;
}
}
@media all and (device-width: 1024px) and (device-height: 768px) and (orientation: landscape) {
#main-card {
width: 80% !important;
height: 70vh !important;
}
monitor svg {
opacity: 1 !important;
}
}
@media screen and (max-width: 380px) {
button {
font-size: 0.8em;
}
}
@media screen and (max-width: 360px) {
transaction-card div {
word-break: break-all;
}
* {
body {
font-size: 12px !important;
}
#bottom-nav {
height: 48px;
}
trans-container {
top: 48px !important;
}
.label-active {
-webkit-transform: translateY(-0.6em) !important;
transform: translateY(-0.6em) !important;
font-size: 0.7em !important;
padding: 0 0.4em;
opacity: 1 !important;
background: var(--body-color);
}
#header {
height: 4em;
}
.right {
bottom: 48px;
}
}
/*# sourceMappingURL=main.css.map */
</style>
/*# sourceMappingURL=main.css.map */</style>
</head>
<body onload="onLoadStartUp()">
<script>
@ -1471,43 +1524,7 @@ input:checked + .slider:before {
</svg>
</loading>
<div id="overlay2"></div>
<header id="header">
<svg id="rLogo" data-name="Layer 1" viewBox="0 0 90.54 106.33"><path d="M213.69,379.42c-2.44-8.24-9.85-14.47-27.39-23.05-7.05-3.45-11.76-6.25-14-8.28a19.9,19.9,0,0,1-4.17-5.55,13.71,13.71,0,0,1,0-7.52c1.25-3.6,2.64-5.22,12.92-15.1,6.18-5.94,9.31-10.31,11.1-15.52.74-2.13.84-7.62.19-9.39-2.29-6.17-7.09-11.4-15.13-16.5-3-1.88-4.3-2.13-4.33-.81a8.89,8.89,0,0,1-1,2.41l-1,1.82-2.8-1.94c-1.54-1.06-3.38-2.24-4.1-2.61-1.3-.67-2.41-.6-2.4.15a28.66,28.66,0,0,1-2,4.42c0,.08-.44-.12-.88-.43-6.08-4.37-8.74-5.55-8.74-3.89,0,.67-1.78,4.19-4,7.89-6.46,10.85-13.06,16.23-19.89,16.23-3,0-2.93-.07-2,3.36.72,2.83,1.1,3.07,3.62,2.3a17.45,17.45,0,0,0,5.81-2.87,3.8,3.8,0,0,1,1.65-.86,7.11,7.11,0,0,1,.72,2.09,4.18,4.18,0,0,0,.94,2.12c.8.31,5.1-1.34,7.52-2.88l2.28-1.45.46,1.83c.62,2.44,1,2.72,3.27,2.15,3.91-1,7.74-3.74,11.53-8.2l2-2.35-.22,2.11c-.57,5.41-4.3,11.36-11.26,18-1.83,1.74-4.75,4.52-6.48,6.18-10.67,10.19-10,18.58,2,26.54a152,152,0,0,0,15.28,8c.95.43,3.33,1.73,5.29,2.89,11,6.52,16.45,13,16.45,19.72a8.43,8.43,0,0,0,.24,2.57h0c.3.3.11.33,3-.47a9.12,9.12,0,0,0,2.76-1.08c.36-.59-.57-3.66-1.84-6.07s-5.62-7-8.91-9.43a117,117,0,0,0-17-9.67c-8.53-4.18-11.83-6.22-14.68-9.07-2.61-2.61-3.89-5.31-3.91-8.21,0-4.59,2.33-8.6,8.29-14.07,9.44-8.65,13-13,15.52-18.76a12,12,0,0,0,1.38-6.72c0-3.15-.11-3.8-1.06-6l-1.06-2.44,1-1.62c.54-.89,1.21-2.08,1.5-2.64l.52-1,1.45,2.14A15.25,15.25,0,0,1,174,303.69c-.17.39-.39,1-.5,1.33a35.75,35.75,0,0,1-2.21,3.67c-2,3-5.22,6.44-13.4,14.23-5.69,5.42-7.58,8.57-7.82,13.05-.19,3.74.68,5.91,3.69,9.16,3.16,3.41,6.89,5.77,17.45,11,12.1,6,17.33,9.61,21.29,14.55a15.81,15.81,0,0,1,3.95,9.3,11.65,11.65,0,0,0,.46,3,3.29,3.29,0,0,0,1.45-.16l2.75-.72,1.54-.4-.21-1.53c-.7-5.1-5.38-10.81-13.1-15.95-4.39-2.93-5.84-3.72-17.34-9.39-5.65-2.79-9.17-5.07-11.78-7.64-4.26-4.2-5.14-8.77-2.66-13.92,1.36-2.83,2.75-4.36,12.5-13.79,8-7.68,11.4-13.72,11.42-20.06,0-5.11-2.3-9.89-6.93-14.26a27.24,27.24,0,0,1-2.14-2.18c-.25-.39,1.45-3.89,1.88-3.89,1.22,0,7.84,6.33,9.67,9.24a13.73,13.73,0,0,1,2.55,8.93c0,3.94-.58,5.92-2.88,9.85s-4.19,6-14.19,15.53a31.4,31.4,0,0,0-6.89,8.66,12.7,12.7,0,0,0-.13,10c1.89,4,7.42,8.47,15.45,12.41,12.49,6.14,15.07,7.57,19.35,10.75,7.17,5.32,10.63,10.51,10.63,16a6.54,6.54,0,0,0,.29,2.54c.41.26,4.81-.79,5.53-1.32C214.2,381.29,214.2,381.13,213.69,379.42Zm-69.9-79.22h0a12.33,12.33,0,0,1-4.84,1.49l-2.13.15,2.25-2.78a81.13,81.13,0,0,0,10-16c.93-1.84,1.81-3.48,2-3.64.36-.4,2.56,1,5.08,3.36l2.1,1.91-1.88,2.8C151.72,294.36,148,298.1,143.79,300.2Zm19-5.92a32.32,32.32,0,0,1-8.56,6.46h0a17.93,17.93,0,0,1-3.88.93l-1.92.18,2.15-2.61a70.33,70.33,0,0,0,7-10.37c.73-1.36,1.39-2.53,1.45-2.61.34-.4,1.66,1.41,3,4.09l1.48,3Zm5.31-7.37a8.75,8.75,0,0,1-1.5,2.12,34,34,0,0,1-3-3l-2.78-3,.64-1.49c1.13-2.62,1.29-2.67,3.4-1a29.3,29.3,0,0,1,4.52,4.1A24.48,24.48,0,0,1,168.09,286.91Z" transform="translate(-123.52 -276.87)"/>
</svg><span>RanchiMall</span>
<span style="margin-left: auto;padding: 1em;">
<svg x="0px" y="0px"
width="100px" height="64px" viewBox="0 0 107.65 47.07" style="enable-background:new 0 0 107.65 47.07;"
xml:space="preserve">
<defs>
</defs>
<g>
<path class="flo-logo" d="M34.2,32.4c0,0,3.75-0.18,7.41-3.86c2.96-2.98,3.65-6.66,3.99-8.52c-11.04-0.63-12.36,0.99-13.71,1.68
c-1.19,0.61-5.33,4.55-5.33,4.55s3.06-3.13,3.2-9.94c0.09-4.54-1.02-7.39-2.72-10.64C25.29,2.33,22.79,0,22.79,0l0.01,4.97
c0,0,4.35,2.84,4.35,11.84c0,6.52-4.35,11.02-4.35,11.02s-4.35-4.5-4.35-11.02c0-9.01,4.35-11.84,4.35-11.84L22.79,0
c0,0-2.48,2.33-4.23,5.67c-1.7,3.25-2.81,6.1-2.72,10.64c0.13,6.81,3.2,9.94,3.2,9.94s-4.14-3.95-5.33-4.55
c-1.35-0.69-2.67-2.31-13.71-1.68c0.34,1.86,1.03,5.54,3.99,8.52c3.66,3.68,7.41,3.86,7.41,3.86s-5.05-2.03-7.15-9.45
c0,0,5.76-0.7,9.63,1.87c2.52,1.67,4.86,4.26,6.79,6.01c0,0-2.58-0.04-6.81,1.88c-2.54,1.15-3.92,2.84-4.44,4.38
c-0.36,1.06-0.2,2.27-0.2,2.27s3.31,0.31,5.94,0c1.99-0.23,3.42-2.16,3.42-2.16s-2,0.78-3.95,0.78c-2.06,0-2.67-0.66-2.67-0.66
c0.98-3.64,8.68-5.19,8.68-5.19s-1.34,2.6-1.42,6.5c-0.1,4.79,3.57,8.52,3.57,8.45c0,0.07,3.67-3.66,3.57-8.45
c-0.08-3.9-1.42-6.5-1.42-6.5s7.71,1.55,8.68,5.19c0,0-0.61,0.66-2.67,0.66c-1.95,0-3.95-0.78-3.95-0.78s1.43,1.93,3.42,2.16
c2.63,0.31,5.94,0,5.94,0s0.16-1.21-0.2-2.27c-0.52-1.54-1.9-3.23-4.44-4.38c-4.23-1.92-6.81-1.88-6.81-1.88
c1.93-1.76,4.27-4.34,6.79-6.01c3.87-2.57,9.63-1.87,9.63-1.87C39.26,30.38,34.2,32.4,34.2,32.4z M22.8,43.06
c-0.95-1.37-1.47-2.13-1.47-4.26c0-2.4,1.12-4.61,1.47-5.14c0.35,0.52,1.47,2.74,1.47,5.14C24.27,40.92,23.75,41.69,22.8,43.06z"/>
<g>
<polygon class="flo-logo" points="73.53,36.36 73.53,20.01 70.53,20.01 70.53,36.36 70.53,39.35 84,39.35 84,36.36 "/>
<g>
<rect x="52.75" y="20.01" class="flo-logo" width="13.47" height="2.93"/>
<polygon class="flo-logo" points="63.74,28.36 55.74,28.36 52.75,28.36 52.75,31.35 52.75,39.35 55.74,39.35 55.74,31.35 63.74,31.35
"/>
</g>
<path class="flo-logo" d="M97.99,20.01c-5.34,0-9.67,4.33-9.67,9.67s4.33,9.67,9.67,9.67s9.67-4.33,9.67-9.67S103.33,20.01,97.99,20.01
z M97.99,35.85c-3.41,0-6.17-2.76-6.17-6.17c0-3.41,2.76-6.17,6.17-6.17c3.41,0,6.17,2.76,6.17,6.17
C104.15,33.09,101.39,35.85,97.99,35.85z"/>
</g>
</g>
</svg>
</span>
</header>
<div id="bottom-nav">
<div id="indicator"></div>
<div class="icons" id="menu">
@ -1612,13 +1629,18 @@ input:checked + .slider:before {
</div>
</div>
<div id="dispMsg" class="hide innerPage">
<div class='title-bar'>
<svg style="padding: 0.4em; height: 2em; width: 2em" onclick="showPage('getDataBtn', 'getData')" viewBox="0 0 16 16">
<path id="Union_2" data-name="Union 2" d="M7.778-3700.736l-7.071-7.071a1,1,0,0,1-.293-.707,1,1,0,0,1,.293-.707l7.071-7.071a1,1,0,0,1,1.414,0,1,1,0,0,1,0,1.414l-5.364,5.364H16.072a1,1,0,0,1,1,1,1,1,0,0,1-1,1H3.828l5.364,5.364a1,1,0,0,1,0,1.414,1,1,0,0,1-.707.293A1,1,0,0,1,7.778-3700.736Z" transform="translate(-0.414 3716.586)"/>
<div id='title-bar'>
<svg onclick="showPage('getDataBtn', 'getData')" viewBox="0 0 16 16">
<path d="M14.9,6.5h-11L8.4,2c0.4-0.4,0.4-1.2,0-1.6C8-0.1,7.2-0.1,6.8,0.3L0.3,6.8C0.2,6.9,0.1,7,0.1,7.2C0,7.5,0,7.8,0.1,8
c0.1,0.1,0.1,0.3,0.2,0.4l6.5,6.5c0.4,0.4,1.2,0.4,1.6,0c0.4-0.4,0.4-1.2,0-1.6L3.9,8.8h11c0.6,0,1.1-0.5,1.1-1.1
C16,7,15.5,6.5,14.9,6.5z"/>
</svg>
<span><h3 id="addressLabel"></h3><h5 id="fullAddress"></h5></span>
<svg onclick="refreshdata()" width="19.9px" height="21.5px" viewBox="0 0 19.9 21.5" style="enable-background:new 0 0 19.9 21.5;" xml:space="preserve">
<path d="M17.9,12.8c-0.7,4.1-4.5,7.2-8.9,6.6c-3.6-0.4-6.5-3.4-6.9-7C1.5,7.6,5.3,3.5,10,3.5c2.3,0,4.3,1,5.8,2.5h-4.3c-0.6,0-1,0.4-1,1s0.4,1,1,1h6c0.6,0,1-0.4,1-1V1c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1v2.9c-2-1.8-4.8-2.7-7.7-2.3c-4.5,0.6-8.2,4.3-8.7,8.8c-0.6,6,4.1,11.1,9.9,11.1c5,0,9.1-3.6,9.8-8.3c0.1-0.6-0.4-1.2-1-1.2h0C18.4,12,18,12.3,17.9,12.8z"/>
<svg onclick="refreshdata()" viewBox="0 0 16 16" style="enable-background:new 0 0 19.9 21.5;" xml:space="preserve">
<path d="M10,6h4.7c0.4,0,0.7-0.3,0.7-0.7V0.7C15.3,0.3,15,0,14.6,0c-0.1,0-0.9,0.7-1.9,1.6c-2.2-1.7-5.3-2.2-8.5-0.8
C2.8,1.5,1.6,2.7,0.9,4.3C-1.9,10.2,2.4,16,8,16c3.2,0,5.9-1.9,7.2-4.6c0.3-0.7-0.2-1.4-0.9-1.4c-0.4,0-0.7,0.2-0.9,0.5
c-1.3,2.8-4.7,4.4-8.1,2.9c-1.2-0.5-2.2-1.5-2.7-2.7C0.6,6.3,3.8,2,8,2c1.2,0,2.4,0.4,3.3,1c-1.1,1.1-2,2.1-2,2.3
C9.3,5.7,9.6,6,10,6z"/>
</svg>
</div>
<trans-container id="transactions-container">
@ -1688,7 +1710,15 @@ input:checked + .slider:before {
</label>
</div>
</section>
<h5 style="text-align: center;opacity: 0.6;position: absolute;bottom: 0;left: 0;right: 0;">Version 2.5<br>Powered by FLO</h5>
<section id="deleteDB">
<h4>Clear all local data</h4>
<h5 style="opacity: 0.8;color: var(--accent-color);">This will delete all local Web Wallet data, please proceed cautiously! </h5>
<button class="primaryButton" onclick="deleteDB()">Clear data</button>
</section>
<section>
<h4>About</h4>
<h5>Version 2.5</h5><br><h5>Powered by FLO</h5>
</section>
</div>
</div>
</div>
@ -1894,12 +1924,10 @@ input:checked + .slider:before {
document.getElementById(recentPage).click();
function showPage(element, page){
let allPages = document.querySelectorAll('.page');
let allTabs = document.querySelectorAll('.tabs');
let allInnerPages = document.querySelectorAll('.innerPage');
let pageBtn = document.getElementById(element);
let allPages = document.querySelectorAll('.page'),
allTabs = document.querySelectorAll('.tabs'),
allInnerPages = document.querySelectorAll('.innerPage');
bottomNav.classList.remove('hide');
document.getElementById('header').classList.remove('hide');
allPages.forEach(function(pages){
pages.classList.add('hide');
});
@ -1909,10 +1937,11 @@ input:checked + .slider:before {
allInnerPages.forEach(function(Ipage){
Ipage.classList.add('hide');
});
let pageBtn = document.getElementById(element);
pageBtn.classList.add('activeButton');
if(window.innerWidth < 768){
let indiWidth = 16;
if(window.innerWidth < 360)
if(window.innerWidth < 361)
indiWidth = 12;
let leftDistance = pageBtn.offsetLeft - indiWidth,
width = pageBtn.getBoundingClientRect().width;
@ -1941,22 +1970,33 @@ input:checked + .slider:before {
window.addEventListener('resize', () => {
clearTimeout(resizeComplete);
resizeComplete = setTimeout(() => {
document.getElementById(recentPage).click();
setElements();
}, 200);
});
function setElements(){
let pageBtn = document.getElementById(recentPage),
indicator = document.getElementById('indicator'),
addNewAddress = document.getElementById('addNewAddress');
if(window.innerWidth < 768){
bottomNav.classList.remove('reveal');
document.getElementById('overlay2').classList.remove('show');
document.getElementById('addNewAddress').setAttribute('style' ,`bottom: 54px; right: 0`);
addNewAddress.setAttribute('style' ,`bottom: 54px; right: 0`);
let indiWidth = 16;
if(window.innerWidth < 361)
indiWidth = 12;
let leftDistance = pageBtn.offsetLeft - indiWidth,
width = pageBtn.getBoundingClientRect().width;
indicator.setAttribute('style', 'transform: translateX('+(leftDistance+(width/2))+'px');
}
else{
let mainCard = document.getElementById('main-card').getBoundingClientRect(),
bottom = ((window.innerHeight - mainCard.height)/2) + 16,
right = ((window.innerWidth - mainCard.width)/2) + 16;
document.getElementById('addNewAddress').setAttribute('style' ,`bottom: ${bottom}px; right: ${right}px`);
bottom = ((window.innerHeight - mainCard.height)/2) + 16,
right = ((window.innerWidth - mainCard.width)/2) + 16;
addNewAddress.setAttribute('style' ,`bottom: ${bottom}px; right: ${right}px`);
let topDistance = pageBtn.offsetTop - 16,
height = pageBtn.getBoundingClientRect().height;
indicator.setAttribute('style', 'transform: translateY('+(topDistance+(height/2))+'px');
}
}
@ -1970,7 +2010,6 @@ input:checked + .slider:before {
Ipage.classList.add('hide');
});
bottomNav.classList.add('hide');
document.getElementById('header').classList.add('hide');
let x = document.getElementById(page);
x.classList.remove('hide');
x.classList.add('fade');
@ -2091,17 +2130,19 @@ input:checked + .slider:before {
function createAddressCards(address, label){
let parentConatainer = document.getElementById('monitor-list'),
monitorCard = document.createElement('monitor');
monitorCard.innerHTML= `<div>${label}</div>
<div>${address}</div>
<div onclick="clickedAddress(this.parentNode)"></div>
<svg class='edit-options' onclick="showEdit(this.parentNode)" viewBox="0 0 4 16" style="enable-background:new 0 0 4 16;" xml:space="preserve">
<g>
<circle cx="2" cy="2" r="2"/>
<circle cx="2" cy="14" r="2"/>
<circle cx="2" cy="8" r="2"/>
</g>
</svg>`;
parentConatainer.appendChild(monitorCard);
if(parentConatainer.innerHTML === `<h3 style="text-align: center;width: 100%;">Add a FLO address to start monitoring</h3>`)
parentConatainer.innerHTML = '';
monitorCard.innerHTML= `<div>${label}</div>
<div>${address}</div>
<div onclick="clickedAddress(this.parentNode)"></div>
<svg class='edit-options' onclick="showEdit(this.parentNode)" viewBox="0 0 4 16" style="enable-background:new 0 0 4 16;" xml:space="preserve">
<g>
<circle cx="2" cy="2" r="2"/>
<circle cx="2" cy="14" r="2"/>
<circle cx="2" cy="8" r="2"/>
</g>
</svg>`;
parentConatainer.appendChild(monitorCard);
}
function showEdit(parent){
@ -2170,6 +2211,15 @@ input:checked + .slider:before {
document.getElementById('receiver').value;
//floWebWallet.sendTransaction();
}
function deleteDB(){
compactIDB.deleteDB().then((message) => {
document.getElementById('monitor-list').innerHTML= `<h3 style="text-align: center;width: 100%;">Add a FLO address to start monitoring</h3>`;
alert(message)
}).catch((error) => {
alert(error)
})
}
</script>
<script>