修改手机版页面

This commit is contained in:
cebgcontract 2022-09-27 18:38:28 +08:00
parent b5242b9bb0
commit b2ee4bc88d
18 changed files with 7263 additions and 1064 deletions

View File

@ -3,6 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<link rel="icon" type="image/x-icon" href="./img/favicon.ico" />
<meta name="renderer" content="webkit" />
<meta
name="viewport"

View File

@ -3,6 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<link rel="icon" type="image/x-icon" href="./img/favicon.ico" />
<meta name="renderer" content="webkit" />
<meta
name="viewport"

View File

@ -19,7 +19,9 @@ $(function () {
})
$('#header_logoutbtn').click(function () {
chain.logout()
chain.logout().then(() => {
toggleLoginBtn()
})
})
jcchain.EventBus.$on(jcchain.SHOW_CHAIN_MODAL, function () {
console.log('show chain modal')

View File

@ -3,6 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<link rel="icon" type="image/x-icon" href="./img/favicon.ico" />
<meta name="renderer" content="webkit" />
<meta
name="viewport"

View File

@ -3,6 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<link rel="icon" type="image/x-icon" href="./img/favicon.ico" />
<meta name="renderer" content="webkit" />
<meta
name="viewport"

View File

@ -3,6 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<link rel="icon" type="image/x-icon" href="./img/favicon.ico" />
<meta name="renderer" content="webkit" />
<meta
name="viewport"

View File

@ -3,6 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<link rel="icon" type="image/x-icon" href="./img/favicon.ico" />
<meta name="renderer" content="webkit" />
<meta
name="viewport"

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -71,6 +71,12 @@ body {
margin-top: 12px;
margin-right: 30px;
}
.logout{
color: white;
line-height: 24px;
font-weight: bold;
display: none;
}
.header-lh {
position: absolute;

114
src/mobile/css/modal.css Normal file
View File

@ -0,0 +1,114 @@
.chain-modal {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: auto;
margin: 0;
z-index: 10;
display: none;
}
.chain-modal .modal-bg {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: auto;
margin: 0;
background-color: #000000a3;
}
.chain-modal .modal-content {
width: 500px;
max-height: 400px;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: auto;
display: flex;
flex-direction: column;
}
.chain-modal .modal-content.mobile {
width: 100vw;
}
.chain-modal .modal-content .modal-title {
background-color: white;
color: black;
border-radius: 12px 12px 0 0;
padding: 15px 20px;
border-bottom: 1px solid rgba(195, 195, 195, 0.14);
}
.chain-modal .modal-content .chain-modal-card {
background-color: white;
transition: background-color 0.2s ease-in-out 0s;
display: flex;
flex-direction: column;
-webkit-box-pack: center;
justify-content: center;
-webkit-box-align: center;
align-items: center;
padding: 24px 16px;
text-align: center;
cursor: pointer;
}
.chain-modal .modal-content .chain-modal-card:first-child {
border-radius: 12px 12px 0 0;
}
.chain-modal .modal-content .chain-modal-card:not(:first-child) {
border-top: 1px solid rgba(195, 195, 195, 0.14);
}
.chain-modal .modal-content .chain-modal-card:last-child {
border-radius: 0 0 12px 12px;
}
.chain-modal .modal-content .chain-modal-card .icon {
width: 45px;
height: 45px;
display: flex;
border-radius: 50%;
overflow: visible;
box-shadow: none;
-webkit-box-pack: center;
justify-content: center;
-webkit-box-align: center;
align-items: center;
}
.chain-modal .modal-content .chain-modal-card .icon img {
width: 100%;
height: 100%;
}
.chain-modal .modal-content .chain-modal-card .icon .icon-svg {
width: 100%;
height: 100%;
fill: currentColor;
color: unset;
stroke: none;
}
.chain-modal .modal-content .chain-modal-card .name {
width: 100%;
font-size: 24px;
font-weight: 700;
margin-top: 0.5em;
color: #0c0c0d;
}
.chain-modal .modal-content .chain-modal-card .desc {
width: 100%;
font-size: 18px;
margin: 0.333em 0px;
color: #a9a9bc;
}

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

File diff suppressed because one or more lines are too long

38
src/mobile/js/chain.js Normal file
View File

@ -0,0 +1,38 @@
$(function () {
var chain = new jcchain.JCChain()
var toggleLoginBtn = function () {
if (chain.logined) {
$('#header_loginbtn').hide()
$('#header_logoutbtn').show()
} else {
$('#header_loginbtn').show()
$('#header_logoutbtn').hide()
}
}
toggleLoginBtn()
var logSuccess = function () {
console.log('login success')
toggleLoginBtn()
}
$('#header_loginbtn').click(function () {
chain.login().then(logSuccess.bind(this))
})
$('#header_logoutbtn').click(function () {
chain.logout().then(() => {
toggleLoginBtn()
})
})
jcchain.EventBus.$on(jcchain.SHOW_CHAIN_MODAL, function () {
console.log('show chain modal')
$('#wallet_modal').show()
})
$('#metamask_card').click(function () {
chain.selectWalletAndLogin(1).then(logSuccess.bind(this))
$('#wallet_modal').hide()
})
$('#wc_card').click(function () {
chain.selectWalletAndLogin(2).then(logSuccess.bind(this))
$('#wallet_modal').hide()
})
})

5312
src/mobile/js/jcchain.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long