Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
9c9634fc
Commit
9c9634fc
authored
Mar 29, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update mobile view
parent
63ab38a1
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
44 deletions
+31
-44
ListItemMobileGrid.tsx
ui/shared/ListItemMobile/ListItemMobileGrid.tsx
+9
-6
TxState.pw.tsx_mobile_base-view-mobile-1.png
...creenshots__/TxState.pw.tsx_mobile_base-view-mobile-1.png
+0
-0
TxStateListItem.tsx
ui/tx/state/TxStateListItem.tsx
+11
-28
TxStateTokenIdList.tsx
ui/tx/state/TxStateTokenIdList.tsx
+9
-8
utils.tsx
ui/tx/state/utils.tsx
+2
-2
No files found.
ui/shared/ListItemMobile/ListItemMobileGrid.tsx
View file @
9c9634fc
import
{
Grid
,
Text
,
chakra
}
from
'
@chakra-ui/react
'
;
import
{
Grid
,
chakra
,
GridItem
}
from
'
@chakra-ui/react
'
;
import
{
motion
}
from
'
framer-motion
'
;
import
{
motion
}
from
'
framer-motion
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
...
@@ -22,10 +22,11 @@ const ListItemMobileGrid = ({ isAnimated, items, className }: Props) => {
...
@@ -22,10 +22,11 @@ const ListItemMobileGrid = ({ isAnimated, items, className }: Props) => {
animate=
{
{
opacity
:
1
,
scale
:
1
}
}
animate=
{
{
opacity
:
1
,
scale
:
1
}
}
transitionDuration=
"normal"
transitionDuration=
"normal"
transitionTimingFunction=
"linear"
transitionTimingFunction=
"linear"
rowGap=
{
4
}
rowGap=
{
2
}
columnGap=
{
2
}
columnGap=
{
2
}
gridTemplateColumns=
"max-content auto"
gridTemplateColumns=
"86px auto"
paddingY=
{
6
}
gridTemplateRows=
"minmax(30px, max-content)"
paddingY=
{
4
}
borderColor=
"divider"
borderColor=
"divider"
borderTopWidth=
"1px"
borderTopWidth=
"1px"
_last=
{
{
_last=
{
{
...
@@ -36,8 +37,10 @@ const ListItemMobileGrid = ({ isAnimated, items, className }: Props) => {
...
@@ -36,8 +37,10 @@ const ListItemMobileGrid = ({ isAnimated, items, className }: Props) => {
>
>
{
items
.
map
(
item
=>
Boolean
(
item
.
value
)
&&
(
{
items
.
map
(
item
=>
Boolean
(
item
.
value
)
&&
(
<>
<>
<
Text
>
{
item
.
name
}
</
Text
>
<
GridItem
fontWeight=
{
500
}
lineHeight=
"30px"
>
{
item
.
name
}
</
GridItem
>
{
typeof
item
.
value
===
'
string
'
?
<
Text
variant=
"secondary"
>
{
item
.
value
}
</
Text
>
:
item
.
value
}
<
GridItem
alignSelf=
"center"
>
{
typeof
item
.
value
===
'
string
'
?
<
chakra
.
span
color=
"text_secondary"
>
{
item
.
value
}
</
chakra
.
span
>
:
item
.
value
}
</
GridItem
>
</>
</>
))
}
))
}
</
Grid
>
</
Grid
>
...
...
ui/tx/__screenshots__/TxState.pw.tsx_mobile_base-view-mobile-1.png
View replaced file @
63ab38a1
View file @
9c9634fc
57.5 KB
|
W:
|
H:
54.9 KB
|
W:
|
H:
2-up
Swipe
Onion skin
ui/tx/state/TxStateListItem.tsx
View file @
9c9634fc
import
{
Grid
,
GridItem
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
TxStateChange
}
from
'
types/api/txStateChanges
'
;
import
type
{
TxStateChange
}
from
'
types/api/txStateChanges
'
;
...
@@ -6,7 +5,7 @@ import type { TxStateChange } from 'types/api/txStateChanges';
...
@@ -6,7 +5,7 @@ import type { TxStateChange } from 'types/api/txStateChanges';
import
Address
from
'
ui/shared/address/Address
'
;
import
Address
from
'
ui/shared/address/Address
'
;
import
AddressIcon
from
'
ui/shared/address/AddressIcon
'
;
import
AddressIcon
from
'
ui/shared/address/AddressIcon
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
ListItemMobile
from
'
ui/shared/ListItemMobile/ListItemMobile
'
;
import
ListItemMobile
Grid
from
'
ui/shared/ListItemMobile/ListItemMobileGrid
'
;
import
{
getStateElements
}
from
'
./utils
'
;
import
{
getStateElements
}
from
'
./utils
'
;
...
@@ -18,37 +17,21 @@ const TxStateListItem = ({ data }: Props) => {
...
@@ -18,37 +17,21 @@ const TxStateListItem = ({ data }: Props) => {
const
{
before
,
after
,
change
,
hint
,
tokenId
}
=
getStateElements
(
data
);
const
{
before
,
after
,
change
,
hint
,
tokenId
}
=
getStateElements
(
data
);
return
(
const
items
=
[
<
ListItemMobile
>
{
name
:
'
Address
'
,
value
:
(
<
Address
flexGrow=
{
1
}
w=
"100%"
>
<
Address
flexGrow=
{
1
}
w=
"100%"
>
<
AddressIcon
address=
{
data
.
address
}
/>
<
AddressIcon
address=
{
data
.
address
}
/>
<
AddressLink
type=
"address"
hash=
{
data
.
address
.
hash
}
ml=
{
2
}
truncation=
"constant"
mr=
"auto"
/>
<
AddressLink
type=
"address"
hash=
{
data
.
address
.
hash
}
ml=
{
2
}
truncation=
"constant"
mr=
"auto"
/>
{
hint
}
{
hint
}
</
Address
>
</
Address
>
<
Grid
gridTemplateColumns=
"90px 1fr"
columnGap=
{
3
}
rowGap=
{
2
}
>
)
},
{
before
&&
(
{
name
:
'
Before
'
,
value
:
before
},
<>
{
name
:
'
After
'
,
value
:
after
},
<
GridItem
fontWeight=
{
500
}
>
Before
</
GridItem
>
{
name
:
'
Change
'
,
value
:
change
},
<
GridItem
>
{
before
}
</
GridItem
>
{
name
:
'
Token ID
'
,
value
:
tokenId
},
</>
];
)
}
{
after
&&
(
return
<
ListItemMobileGrid
items=
{
items
}
/>;
<>
<
GridItem
fontWeight=
{
500
}
>
After
</
GridItem
>
<
GridItem
>
{
after
}
</
GridItem
>
</>
)
}
<
GridItem
fontWeight=
{
500
}
>
Change
</
GridItem
>
<
GridItem
>
{
change
}
</
GridItem
>
{
tokenId
&&
(
<>
<
GridItem
fontWeight=
{
500
}
>
Token ID
</
GridItem
>
<
GridItem
>
{
tokenId
}
</
GridItem
>
</>
)
}
</
Grid
>
</
ListItemMobile
>
);
};
};
export
default
TxStateListItem
;
export
default
TxStateListItem
;
ui/tx/state/TxStateTokenIdList.tsx
View file @
9c9634fc
...
@@ -22,9 +22,9 @@ const TxStateTokenIdList = ({ items, tokenAddress }: Props) => {
...
@@ -22,9 +22,9 @@ const TxStateTokenIdList = ({ items, tokenAddress }: Props) => {
id=
{
item
.
total
.
token_id
}
id=
{
item
.
total
.
token_id
}
w=
"auto"
w=
"auto"
truncation=
"constant"
truncation=
"constant"
my=
{
{
base
:
'
-3px
'
,
lg
:
0
}
}
/>
/>
))
}
))
}
{
items
.
length
>
3
&&
(
<
Link
<
Link
fontWeight=
{
400
}
fontWeight=
{
400
}
textDecoration=
"underline dashed"
textDecoration=
"underline dashed"
...
@@ -33,6 +33,7 @@ const TxStateTokenIdList = ({ items, tokenAddress }: Props) => {
...
@@ -33,6 +33,7 @@ const TxStateTokenIdList = ({ items, tokenAddress }: Props) => {
>
>
View
{
isCut
?
'
more
'
:
'
less
'
}
View
{
isCut
?
'
more
'
:
'
less
'
}
</
Link
>
</
Link
>
)
}
</
Flex
>
</
Flex
>
);
);
};
};
...
...
ui/tx/state/utils.tsx
View file @
9c9634fc
...
@@ -19,7 +19,7 @@ export function getStateElements(data: TxStateChange) {
...
@@ -19,7 +19,7 @@ export function getStateElements(data: TxStateChange) {
const
hint
=
(()
=>
{
const
hint
=
(()
=>
{
if
(
data
.
is_miner
)
{
if
(
data
.
is_miner
)
{
return
(
return
(
<
Flex
align=
"center"
columnGap=
{
1
}
>
<
Flex
align=
"center"
columnGap=
{
1
}
flexDir=
{
{
base
:
'
row-reverse
'
,
lg
:
'
row
'
}
}
>
<
Hint
label=
"A block producer who successfully included the block into the blockchain"
/>
<
Hint
label=
"A block producer who successfully included the block into the blockchain"
/>
<
Box
color=
"text_secondary"
textTransform=
"capitalize"
>
{
getNetworkValidatorTitle
()
}
</
Box
>
<
Box
color=
"text_secondary"
textTransform=
"capitalize"
>
{
getNetworkValidatorTitle
()
}
</
Box
>
</
Flex
>
</
Flex
>
...
@@ -31,7 +31,7 @@ export function getStateElements(data: TxStateChange) {
...
@@ -31,7 +31,7 @@ export function getStateElements(data: TxStateChange) {
if
(
changeDirection
)
{
if
(
changeDirection
)
{
const
text
=
changeDirection
===
'
from
'
?
'
Mint
'
:
'
Burn
'
;
const
text
=
changeDirection
===
'
from
'
?
'
Mint
'
:
'
Burn
'
;
return
(
return
(
<
Flex
align=
"center"
columnGap=
{
1
}
>
<
Flex
align=
"center"
columnGap=
{
1
}
flexDir=
{
{
base
:
'
row-reverse
'
,
lg
:
'
row
'
}
}
>
<
Hint
label=
"Address used in tokens mintings and burnings"
/>
<
Hint
label=
"Address used in tokens mintings and burnings"
/>
<
Box
color=
"text_secondary"
whiteSpace=
"nowrap"
>
{
text
}
address
</
Box
>
<
Box
color=
"text_secondary"
whiteSpace=
"nowrap"
>
{
text
}
address
</
Box
>
</
Flex
>
</
Flex
>
...
...
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