Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
ycc-website
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Website
ycc-website
Commits
45b2ed4d
Commit
45b2ed4d
authored
Feb 15, 2022
by
chenqikuai
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: mobile address template
parent
08e73969
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
383 additions
and
7 deletions
+383
-7
balanceBg-mobile.png
...ets/images/blockChainBrowser/address/balanceBg-mobile.png
+0
-0
zh.ts
src/assets/lang/zh.ts
+4
-0
m-tabs.vue
src/components/mobile/m-tabs.vue
+0
-1
m-vote-pack.vue
src/components/mobile/m-vote-pack.vue
+73
-0
Select.vue
src/components/pc/Select.vue
+27
-4
address.ts
src/mixin/address.ts
+17
-0
index.ts
src/router/index.ts
+1
-1
index.vue
...ws/mobile/address/components/m-address-overview/index.vue
+31
-0
m-address-balance-graph.vue
...components/m-address-overview/m-address-balance-graph.vue
+27
-0
m-address-blue-card.vue
...ess/components/m-address-overview/m-address-blue-card.vue
+59
-0
m-address-display.vue
...dress/components/m-address-overview/m-address-display.vue
+52
-0
m-four-params.vue
...e/address/components/m-address-overview/m-four-params.vue
+55
-0
index.vue
src/views/mobile/address/index.vue
+33
-0
index.vue
src/views/pc/address/index.vue
+0
-0
tailwind.config.js
tailwind.config.js
+2
-0
vue.config.js
vue.config.js
+2
-1
No files found.
src/assets/images/blockChainBrowser/address/balanceBg-mobile.png
0 → 100644
View file @
45b2ed4d
38.6 KB
src/assets/lang/zh.ts
View file @
45b2ed4d
...
@@ -35,11 +35,15 @@ export const lang = {
...
@@ -35,11 +35,15 @@ export const lang = {
placeholder
:
"请输入地址/交易哈希/区块高度"
,
placeholder
:
"请输入地址/交易哈希/区块高度"
,
address
:
{
address
:
{
address
:
"地址"
,
address
:
"地址"
,
freeze
:
"冻结"
,
balance
:
"地址可用余额"
,
balance
:
"地址可用余额"
,
pleaseSelect
:
"请选择"
,
pleaseSelect
:
"请选择"
,
totalReception
:
"总接收"
,
totalReception
:
"总接收"
,
totalSent
:
"总发送"
,
totalSent
:
"总发送"
,
totalValue
:
"总价值"
,
totalValue
:
"总价值"
,
accountBalance
:
"账户余额"
,
votingRecord
:
"投票记录"
,
packingRecord
:
"打包记录"
,
},
},
block
:
{
block
:
{
title
:
"全部区块"
,
title
:
"全部区块"
,
...
...
src/components/mobile/m-tabs.vue
View file @
45b2ed4d
...
@@ -25,7 +25,6 @@
...
@@ -25,7 +25,6 @@
import
Vue
,
{
PropType
}
from
'vue'
import
Vue
,
{
PropType
}
from
'vue'
export
default
Vue
.
extend
({
export
default
Vue
.
extend
({
props
:
{
props
:
{
title
:
String
,
focusedTab
:
String
,
focusedTab
:
String
,
setFocusedTab
:
Function
,
setFocusedTab
:
Function
,
tabList
:
Array
as
PropType
<
tabList
:
Array
as
PropType
<
...
...
src/components/mobile/m-vote-pack.vue
0 → 100644
View file @
45b2ed4d
<
template
>
<div
class=
"c-vote-pack flex items-center px-3.5"
>
<div
class=
"box text-center flex flex-col justify-center"
:class=
"[
type === 'vote' ? 'text-orange' : ' text-footer-color',
type === 'vote' ? ' bg-lightOrange' : ' bg-lightBlue3',
]"
>
<div>
<span
class=
"text-base font-bold"
>
{{
rewardAmount
}}
</span>
<span
class=
"text-xs"
>
YCC
</span>
</div>
<div>
{{
$t
(
'lang.block.blockReward'
)
}}
</div>
</div>
<div
class=
"flex-grow"
style=
"margin-left: 10px;"
>
<div
class=
"flex justify-between"
style=
"margin-bottom: 5px;"
>
<div
class=
"text-darkBlue text-sm font-bold"
>
102938
</div>
<div
class=
"text-text-color"
>
{{
2039480923
|
formatTime
}}
</div>
</div>
<div
style=
"margin-bottom: 5px;"
>
<span
class=
"text-text-color text-xs"
>
{{
$t
(
'lang.txDetail.txHash'
)
}}
:
</span>
<span
class=
"text-footer-color text-xs font-bold"
>
asdlfkjadlsfk
</span>
</div>
<div>
<span
class=
"text-text-color text-xs"
>
{{
$t
(
'lang.trade.sender'
)
}}
:
</span>
<span
class=
"text-footer-color text-xs font-bold"
>
asdlfkjadlsfk
</span>
</div>
</div>
</div>
</
template
>
<
script
lang=
"ts"
>
import
Vue
,
{
PropType
}
from
'vue'
export
default
Vue
.
extend
({
props
:
{
type
:
String
as
PropType
<
'vote'
|
'pack'
>
,
rewardAmount
:
Number
,
height
:
Number
,
txHash
:
String
,
sender
:
String
,
timeBlock
:
Number
,
},
})
</
script
>
<
style
lang=
"scss"
scoped
>
.c-vote-pack
{
height
:
90px
;
background
:
#ffffff
;
border-radius
:
2px
;
border-bottom
:
1px
solid
#f5f5ff
;
.box
{
width
:
90px
;
height
:
54px
;
border-radius
:
2px
;
}
}
</
style
>
src/components/pc/Select.vue
View file @
45b2ed4d
<
template
>
<
template
>
<div
class=
"relative c-select"
>
<div
class=
"relative c-select"
>
<div
<div
class=
"select flex items-center justify-between cursor-pointer"
class=
"select flex items-center justify-between cursor-pointer overflow-hidden"
:class=
"
{ 'select-small': size === 'small' }"
ref="select"
ref="select"
>
>
<div
class=
"selected-txt"
>
<div
class=
"selected-txt flex-grow overflow-hidden overflow-ellipsis"
:class=
"
{ 'selected-txt-small': size === 'small' }"
>
{{
{{
selectedOptionName
===
undefined
selectedOptionName
===
undefined
?
$t
(
'lang.address.pleaseSelect'
)
?
$t
(
'lang.address.pleaseSelect'
)
...
@@ -15,12 +19,14 @@
...
@@ -15,12 +19,14 @@
src=
"@/assets/images/blockChainBrowser/address/arrow-down.png"
src=
"@/assets/images/blockChainBrowser/address/arrow-down.png"
alt=
""
alt=
""
class=
"arrow transition-transform transform"
class=
"arrow transition-transform transform"
:class=
"
{ 'rotate-1
79
': open }"
:class=
"
{ 'rotate-1
80
': open }"
/>
/>
</div>
</div>
<div
<div
class=
"options absolute top-full transition-all mt-1"
class=
"options absolute top-full transition-all mt-1"
:class=
"
{}"
:class=
"
{
' right-0': optionPosition === 'right',
}"
v-show="open"
v-show="open"
>
>
<div
class=
"overflow-auto h-full"
style=
"max-height: 200px;"
>
<div
class=
"overflow-auto h-full"
style=
"max-height: 200px;"
>
...
@@ -50,6 +56,14 @@
...
@@ -50,6 +56,14 @@
import
Vue
,
{
PropType
}
from
'vue'
import
Vue
,
{
PropType
}
from
'vue'
export
default
Vue
.
extend
({
export
default
Vue
.
extend
({
props
:
{
props
:
{
size
:
{
type
:
String
as
PropType
<
'big'
|
'small'
>
,
default
:
'big'
,
},
optionPosition
:
{
type
:
String
as
PropType
<
'left'
|
'right'
>
,
default
:
'left'
,
},
searchPlaceholder
:
{
searchPlaceholder
:
{
type
:
String
,
type
:
String
,
},
},
...
@@ -116,6 +130,11 @@ export default Vue.extend({
...
@@ -116,6 +130,11 @@ export default Vue.extend({
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#ffffff
;
color
:
#ffffff
;
margin-left
:
10px
;
margin-left
:
10px
;
white-space
:
nowrap
;
}
.selected-txt-small
{
font-size
:
14px
;
margin-left
:
5px
;
}
}
.select
{
.select
{
width
:
100px
;
width
:
100px
;
...
@@ -128,6 +147,10 @@ export default Vue.extend({
...
@@ -128,6 +147,10 @@ export default Vue.extend({
margin
:
0
10px
;
margin
:
0
10px
;
}
}
}
}
.select-small
{
width
:
70px
;
height
:
30px
;
}
.options
{
.options
{
width
:
310px
;
width
:
310px
;
background
:
#ffffff
;
background
:
#ffffff
;
...
...
src/mixin/address.ts
View file @
45b2ed4d
...
@@ -4,9 +4,26 @@ export default Vue.extend({
...
@@ -4,9 +4,26 @@ export default Vue.extend({
data
()
{
data
()
{
return
{
return
{
value
:
""
,
value
:
""
,
focusedTab
:
"1"
,
};
};
},
},
computed
:
{
computed
:
{
tabList
()
{
return
[
{
name
:
this
.
$t
(
"lang.trade.txRecord"
),
value
:
"1"
,
},
{
name
:
this
.
$t
(
"lang.address.votingRecord"
),
value
:
"2"
,
},
{
name
:
this
.
$t
(
"lang.address.packingRecord"
),
value
:
"3"
,
},
];
},
},
},
methods
:
{
methods
:
{
setValue
(
v
:
string
)
{
setValue
(
v
:
string
)
{
...
...
src/router/index.ts
View file @
45b2ed4d
...
@@ -52,7 +52,7 @@ const routes: Array<RouteConfig> = [
...
@@ -52,7 +52,7 @@ const routes: Array<RouteConfig> = [
{
{
path
:
'/address'
,
path
:
'/address'
,
name
:
'个人地址'
,
name
:
'个人地址'
,
component
:
()
=>
import
(
`@/views/
${
file
}
/address.vue`
),
component
:
()
=>
import
(
`@/views/
${
file
}
/address
/index
.vue`
),
}
}
],
],
},
},
...
...
src/views/mobile/address/components/m-address-overview/index.vue
0 → 100644
View file @
45b2ed4d
<
template
>
<div
class=
"c-address-overview"
>
<m-address-display
class=
"mx-3.5"
></m-address-display>
<m-address-blue-card></m-address-blue-card>
<m-four-params
class=
"my-3.5"
></m-four-params>
<m-address-balance-graph
class=
"mx-3.5"
></m-address-balance-graph>
</div>
</
template
>
<
script
lang=
"ts"
>
import
mAddressDisplay
from
'./m-address-display.vue'
import
VueTypedMixins
from
'vue-typed-mixins'
import
AddressOverview
from
'@/mixin/componentsMixin/AddressOverview'
import
MAddressBlueCard
from
'./m-address-blue-card.vue'
import
MFourParams
from
'./m-four-params.vue'
import
MAddressBalanceGraph
from
'./m-address-balance-graph.vue'
export
default
VueTypedMixins
(
AddressOverview
).
extend
({
components
:
{
mAddressDisplay
,
MAddressBlueCard
,
MFourParams
,
MAddressBalanceGraph
,
},
})
</
script
>
<
style
lang=
"scss"
scoped
>
.c-address-overview
{
background
:
#ffffff
;
box-shadow
:
0px
1px
8px
0px
rgba
(
31
,
52
,
112
,
0
.06
);
border-radius
:
2px
;
}
</
style
>
src/views/mobile/address/components/m-address-overview/m-address-balance-graph.vue
0 → 100644
View file @
45b2ed4d
<
template
>
<div
class=
"c-balance-graph"
>
<div
class=
"flex items-center justify-between"
>
<dir>
{{
$t
(
'lang.address.accountBalance'
)
}}
</dir>
<div
class=
""
>
<span
class=
"text-text-color ml-3"
>
W1
</span>
<span
class=
"text-footer-color font-bold ml-3"
>
M1
</span>
<span
class=
"text-text-color ml-3"
>
M6
</span>
<span
class=
"text-text-color ml-3"
>
Y1
</span>
<span
class=
"text-text-color ml-3"
>
ALL
</span>
</div>
</div>
</div>
</
template
>
<
script
lang=
"ts"
>
import
Vue
from
'vue'
export
default
Vue
.
extend
({})
</
script
>
<
style
lang=
"scss"
scoped
>
.c-balance-graph
{
height
:
140px
;
background
:
#ffffff
;
border-radius
:
2px
;
}
</
style
>
src/views/mobile/address/components/m-address-overview/m-address-blue-card.vue
0 → 100644
View file @
45b2ed4d
<
template
>
<div
class=
"c-address-blue-card px-4 flow-root"
:style=
"
{
backgroundImage: `url(${balanceBg})`,
}"
>
<div
class=
"flex items-center mt-7 justify-between"
>
<div
class=
"yccIcon"
>
<img
src=
"@/assets/images/blockChainBrowser/address/yccIcon.png"
class=
"w-full h-full"
alt=
""
/>
</div>
<Select
size=
"small"
:optionPosition=
"'right'"
></Select>
</div>
<div
class=
"text-white mt-3.5 text-xs"
>
{{
$t
(
'lang.address.balance'
)
}}
</div>
<div
class=
"text-white mt-1 text-3xl font-bold"
>
1-0293-0123YCC
</div>
<div
class=
"text-white text-xs"
style=
"margin-top: 5px;"
>
{{
$t
(
'lang.address.freeze'
)
}}
0 YCC
</div>
</div>
</
template
>
<
script
lang=
"ts"
>
import
Select
from
'@/components/pc/Select.vue'
import
balanceBg
from
'@/assets/images/blockChainBrowser/address/balanceBg-mobile.png'
import
Vue
from
'vue'
export
default
Vue
.
extend
({
components
:
{
Select
,
},
data
()
{
return
{
balanceBg
,
}
},
})
</
script
>
<
style
lang=
"scss"
scoped
>
.c-address-blue-card
{
height
:
180px
;
background-color
:
#2545cb
;
background-repeat
:
no-repeat
;
background-position
:
right
;
background-size
:
172px
151px
;
border-radius
:
10px
;
.yccIcon
{
width
:
25px
;
height
:
25px
;
}
}
</
style
>
src/views/mobile/address/components/m-address-overview/m-address-display.vue
0 → 100644
View file @
45b2ed4d
<
template
>
<div
class=
"c-address-display flex items-center"
>
<div
class=
"text-text-color text-sm mr-3.5"
>
{{
$t
(
'lang.address.address'
)
}}
</div>
<div
class=
"text-darkBlue font-bold text-sm"
>
{{
'alskdjflkasdf'
|
filterHash
(
10
)
}}
</div>
<m-copy-btn
:copyTxt=
"'laksdjf'"
class=
"ml-2 mr-5"
></m-copy-btn>
<div
class=
"qrcodeBox flex items-center justify-center"
>
<div
class=
"qrcodeContainer"
>
<Popover
placement=
"bottom"
trigger=
"click"
>
<canvas
id=
"qrcode"
style=
"margin: 13px;"
></canvas>
<img
slot=
"reference"
:src=
"qrcodeIcon"
class=
"w-full h-full"
alt=
""
/>
</Popover>
</div>
</div>
</div>
</
template
>
<
script
lang=
"ts"
>
import
MCopyBtn
from
'@/components/mobile/m-copyBtn.vue'
import
qrcodeIcon
from
'@/assets/images/blockChainBrowser/address/qrcodeIcon.png'
import
{
Popover
}
from
'element-ui'
import
Vue
from
'vue'
export
default
Vue
.
extend
({
components
:
{
MCopyBtn
,
Popover
},
data
()
{
return
{
qrcodeIcon
,
}
},
})
</
script
>
<
style
lang=
"scss"
scoped
>
.c-address-display
{
height
:
50px
;
.qrcodeBox
{
height
:
25px
;
width
:
25px
;
background-color
:
rgba
(
37
,
69
,
203
,
0
.1
);
.qrcodeContainer
{
width
:
17px
;
height
:
17px
;
}
}
}
</
style
>
src/views/mobile/address/components/m-address-overview/m-four-params.vue
0 → 100644
View file @
45b2ed4d
<
template
>
<div
class=
"c-four-params flex flex-wrap"
>
<div
class=
"param"
>
<div
class=
"text-text-color text-xs mt-2.5 ml-7"
style=
"margin-bottom: 2px;"
>
{{
$t
(
'lang.address.totalReception'
)
}}
</div>
<div
class=
"text-title-color text-sm font-bold ml-7"
>
1123
</div>
</div>
<div
class=
"param"
>
<div
class=
"text-text-color text-xs mt-2.5 ml-7"
style=
"margin-bottom: 2px;"
>
{{
$t
(
'lang.address.totalSent'
)
}}
</div>
<div
class=
"text-title-color text-sm font-bold ml-7"
>
1123
</div>
</div>
<div
class=
"param"
>
<div
class=
"text-text-color text-xs mt-2.5 ml-7"
style=
"margin-bottom: 2px;"
>
{{
$t
(
'lang.block.txCount'
)
}}
</div>
<div
class=
"text-title-color text-sm font-bold ml-7"
>
1123
</div>
</div>
<div
class=
"param"
>
<div
class=
"text-text-color text-xs mt-2.5 ml-7"
style=
"margin-bottom: 2px;"
>
{{
$t
(
'lang.address.totalValue'
)
}}
</div>
<div
class=
"text-title-color text-sm font-bold ml-7"
>
laksjdf
</div>
</div>
</div>
</
template
>
<
script
lang=
"ts"
>
import
Vue
from
'vue'
export
default
Vue
.
extend
({})
</
script
>
<
style
lang=
"scss"
scoped
>
.param
{
width
:
50%
;
flex-shrink
:
0
;
height
:
55px
;
background
:
#ffffff
;
border-radius
:
2px
;
}
</
style
>
src/views/mobile/address/index.vue
0 → 100644
View file @
45b2ed4d
<
template
>
<div
class=
"c-address mx-3.5 flow-root"
>
<m-chain-search
class=
"mt-3.5"
></m-chain-search>
<m-address-overview
class=
"mt-5"
></m-address-overview>
<m-tabs
:focusedTab=
"focusedTab"
:setFocusedTab=
"($event) => (focusedTab = $event)"
:tabList=
"tabList"
></m-tabs>
<m-vote-pack
:rewardAmount=
"30"
class=
"mb-3"
:type=
"'lskjd'"
></m-vote-pack>
</div>
</
template
>
<
script
lang=
"ts"
>
import
MChainSearch
from
'@/components/mobile/m-chainSearch.vue'
import
MTabs
from
'@/components/mobile/m-tabs.vue'
import
MVotePack
from
'@/components/mobile/m-vote-pack.vue'
import
address
from
'@/mixin/address'
import
VueTypedMixins
from
'vue-typed-mixins'
import
MAddressOverview
from
'./components/m-address-overview/index.vue'
export
default
VueTypedMixins
(
address
).
extend
({
components
:
{
MChainSearch
,
MAddressOverview
,
MTabs
,
MVotePack
,
},
})
</
script
>
<
style
lang=
"scss"
scoped
>
.c-address
{
padding-top
:
44px
;
}
</
style
>
src/views/pc/address.vue
→
src/views/pc/address
/index
.vue
View file @
45b2ed4d
File moved
tailwind.config.js
View file @
45b2ed4d
...
@@ -40,9 +40,11 @@ module.exports = {
...
@@ -40,9 +40,11 @@ module.exports = {
'bgfootercolor'
:
'#f9fafb'
,
'bgfootercolor'
:
'#f9fafb'
,
"lightBlue"
:
"#4FDDFC"
,
"lightBlue"
:
"#4FDDFC"
,
lightBlue2
:
'rgba(79, 221, 252, 0.04)'
,
lightBlue2
:
'rgba(79, 221, 252, 0.04)'
,
lightBlue3
:
"rgba(37, 69, 203, 0.1)"
,
'active'
:
'#0276F7'
,
'active'
:
'#0276F7'
,
"darkBlue"
:
"#1F3470"
,
"darkBlue"
:
"#1F3470"
,
'orange'
:
'#F8A457'
,
'orange'
:
'#F8A457'
,
lightOrange
:
'rgba(248, 164, 87, 0.1)'
,
black
:
colors
.
black
,
black
:
colors
.
black
,
white
:
colors
.
white
,
white
:
colors
.
white
,
gray
:
colors
.
coolGray
,
gray
:
colors
.
coolGray
,
...
...
vue.config.js
View file @
45b2ed4d
...
@@ -21,7 +21,8 @@ module.exports = {
...
@@ -21,7 +21,8 @@ module.exports = {
changeOrigin
:
true
,
changeOrigin
:
true
,
},
},
"/yccApi"
:
{
"/yccApi"
:
{
target
:
"https://mainnet.yuan.org/api"
,
// target: "https://mainnet.yuan.org/api",
target
:
"http://13.115.171.240:7901/"
,
pathRewrite
:
{
pathRewrite
:
{
"^/yccApi"
:
""
"^/yccApi"
:
""
},
},
...
...
chenqikuai
@chenqikuai
mentioned in commit
748f7ae1
·
Mar 03, 2022
mentioned in commit
748f7ae1
mentioned in commit 748f7ae18ac2f8eb14ee7c2865eaea786342a520
Toggle commit list
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