Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
T
tangled
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eriksson monteiro
tangled
Commits
6fecb8ec
Commit
6fecb8ec
authored
May 15, 2021
by
Eriksson Monteiro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update millix bar
parent
af785a09
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
3838 additions
and
50 deletions
+3838
-50
chrome/browser/browser_resources.grd
chrome/browser/browser_resources.grd
+2
-0
chrome/browser/resources/millix/millix_bar.css
chrome/browser/resources/millix/millix_bar.css
+90
-45
chrome/browser/resources/millix/millix_bar.html
chrome/browser/resources/millix/millix_bar.html
+7
-2
chrome/browser/resources/millix/millix_bar.js
chrome/browser/resources/millix/millix_bar.js
+4
-3
chrome/browser/resources/millix/vendor/jquery.js
chrome/browser/resources/millix/vendor/jquery.js
+2
-0
chrome/browser/resources/millix/vendor/jquery.nicescroll.js
chrome/browser/resources/millix/vendor/jquery.nicescroll.js
+3729
-0
chrome/browser/ui/webui/millix/millix_bar.cc
chrome/browser/ui/webui/millix/millix_bar.cc
+4
-0
No files found.
chrome/browser/browser_resources.grd
View file @
6fecb8ec
...
...
@@ -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"
/>
...
...
chrome/browser/resources/millix/millix_bar.css
View file @
6fecb8ec
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
chrome/browser/resources/millix/millix_bar.html
View file @
6fecb8ec
...
...
@@ -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"
>
...
...
chrome/browser/resources/millix/millix_bar.js
View file @
6fecb8ec
...
...
@@ -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
'
);
...
...
chrome/browser/resources/millix/vendor/jquery.js
0 → 100644
View file @
6fecb8ec
This diff is collapsed.
Click to expand it.
chrome/browser/resources/millix/vendor/jquery.nicescroll.js
0 → 100644
View file @
6fecb8ec
This source diff could not be displayed because it is too large. You can
view the blob
instead.
chrome/browser/ui/webui/millix/millix_bar.cc
View file @
6fecb8ec
...
...
@@ -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';"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment