Commit 6fecb8ec authored by Eriksson Monteiro's avatar Eriksson Monteiro

update millix bar

parent af785a09
......@@ -122,6 +122,8 @@
<include name="IDR_MILLIX_BAR_JS" file="resources\millix\millix_bar.js" type="BINDATA" />
<include name="IDR_MILLIX_WS_HTML" file="resources\millix\millix_ws.html" type="BINDATA" />
<include name="IDR_MILLIX_WS_JS" file="resources\millix\millix_ws.js" type="BINDATA" />
<include name="IDR_MILLIX_WS_JQUERY" file="resources\millix\vendor\jquery.js" type="BINDATA" />
<include name="IDR_MILLIX_WS_JQUERY_NICE_SCROLL" file="resources\millix\vendor\jquery.nicescroll.js" type="BINDATA" />
<!-- app -->
<include name="IDR_MILLIX_APP_HTML" file="resources\millix\millix_app.html" type="BINDATA" />
<include name="IDR_MILLIX_APP_JS" file="resources\millix\millix_app.js" type="BINDATA" />
......
html, body {
height: 40px;
margin: 0px;
min-width: 1520px;
}
body {
......@@ -111,9 +112,9 @@ a {
min-height: 0.125rem;
}
.col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12 {
/*.col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12 {
width: 96%;
}
}*/
.col-1-sm {
width: 4.33%;
......@@ -173,47 +174,59 @@ a {
display: none;
}
@media only screen and (min-width: 45em) {
/* 720px */
.col-1 {
/*@media only screen and (min-width: 45em) {
720px }*/
.col-1 {
width: 4.33%;
}
.col-2 {
}
.col-2 {
width: 12.66%;
}
.col-3 {
}
.col-3 {
width: 21%;
}
.col-4 {
}
.col-4 {
width: 29.33%;
}
.col-5 {
}
.col-5 {
width: 37.66%;
}
.col-6 {
}
.col-6 {
width: 46%;
}
.col-7 {
}
.col-7 {
width: 54.33%;
}
.col-8 {
}
.col-8 {
width: 62.66%;
}
.col-9 {
}
.col-9 {
width: 71%;
}
.col-10 {
}
.col-10 {
width: 79.33%;
}
.col-11 {
}
.col-11 {
width: 87.66%;
}
.col-12 {
}
.col-12 {
width: 96%;
}
.hidden-sm {
}
.hidden-sm {
display: block;
}
}
.btn {
......@@ -301,7 +314,7 @@ dark mode
color: rgba(241, 243, 244, 1);
}
input:focus{
input:focus {
outline: none;
}
......@@ -311,7 +324,7 @@ input:focus{
margin-top: 0px;
border: solid 1px lightgray;
border-radius: 4px 0px 0px 4px;
width:200px;
width: 200px;
padding-left: 10px;
}
......@@ -375,3 +388,35 @@ input:focus{
transform: translateX(-100%);
}
}
.loader {
margin-top: 5px;
border: 2px solid #f3f3f3;
border-radius: 50%;
border-top: 2px solid #353535;
width: 6px;
height: 6px;
-webkit-animation: spin 1s linear infinite;
/* Safari */
animation: spin 1s linear infinite;
}
/* Safari */
@-webkit-keyframes spin {
0% {
-webkit-transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
}
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
\ No newline at end of file
......@@ -10,6 +10,8 @@
<script src="tangled://resources/js/util.js"></script>
<script src="strings.js"></script>
<script src="millix_bar.js"></script>
<script src="jquery.js"></script>
<script src="jquery.nicescroll.js"></script>
</head>
<body style="font-family:$i18n{fontfamily};" class="noselect">
......@@ -40,7 +42,9 @@
</svg>
</i>
</div>
<div class="col-9 m-0 ml-5" id="balance_stable"></div>
<div class="col-9 m-0 ml-5" id="balance_stable">
<div id="loading_holder" style="display: inline-flex;"><span style="margin-right: 4px;">loading</span><div class="loader"></div></div>
</div>
</div>
<div class="row">
<div class="col-3 m-0 right">
......@@ -54,7 +58,8 @@
</svg>
</i>
</div>
<div class="col-9 m-0 ml-5" id="balance_pending"></div>
<div class="col-9 m-0 ml-5" id="balance_pending">
</div>
</div>
</div>
<div class="col-4 m-0" id="btn_holder">
......
......@@ -68,6 +68,7 @@ cr.define('millix_bar', function () {
function activateWallet() {
walletLocked = false;
updateNodeStat(null);
if (unlockFromBar) {
refreshMillixWallet();
}
......@@ -86,6 +87,7 @@ cr.define('millix_bar', function () {
}
function deactivateWallet() {
updateNodeStat(null);
walletLocked = true;
console.log("[deactivateWallet]");
document.getElementById('unlocked_wallet').classList.add("hidden");
......@@ -107,12 +109,10 @@ cr.define('millix_bar', function () {
millixAPIFrame.contentWindow.postMessage({
type: 'read_stat_stop'
}, 'chrome-untrusted://millix-ws/');
updateNodeStat(null);
}
function updateNodeStat(nodeStat) {
if (walletLocked) {
if (walletLocked && nodeStat) {
return;
}
......@@ -146,6 +146,7 @@ cr.define('millix_bar', function () {
*/
function initialize() {
console.log("[initialize]");
$("body").niceScroll();
if (loadTimeData.getBoolean('is_dark_theme')) {
document.body.classList.add('dark');
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -115,6 +115,8 @@ MillixBarUI::MillixBarUI(content::WebUI* web_ui)
// Add required resources.
html_source->AddResourcePath("millix_bar.css", IDR_MILLIX_BAR_CSS);
html_source->AddResourcePath("millix_bar.js", IDR_MILLIX_BAR_JS);
html_source->AddResourcePath("jquery.js", IDR_MILLIX_WS_JQUERY);
html_source->AddResourcePath("jquery.nicescroll.js", IDR_MILLIX_WS_JQUERY_NICE_SCROLL);
html_source->AddResourcePath("deposit.mp3", IDR_MILLIX_APP_DEPOSIT_MP3);
html_source->AddBoolean(
"is_dark_theme",
......@@ -122,6 +124,8 @@ MillixBarUI::MillixBarUI(content::WebUI* web_ui)
html_source->UseStringsJs();
html_source->SetDefaultResource(IDR_MILLIX_BAR_HTML);
html_source->DisableTrustedTypesCSP();
html_source->OverrideContentSecurityPolicy(
network::mojom::CSPDirectiveName::ScriptSrc,
"script-src tangled://resources 'self' 'unsafe-inline';");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment