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
50c71a0d
Commit
50c71a0d
authored
Aug 14, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
skeleton for private tags page
parent
e1253b7d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
9 deletions
+32
-9
ApiKeys.tsx
ui/pages/ApiKeys.tsx
+1
-1
PrivateAddressTags.tsx
ui/privateTags/PrivateAddressTags.tsx
+14
-3
PrivateTransactionTags.tsx
ui/privateTags/PrivateTransactionTags.tsx
+14
-2
SkeletonTable.tsx
ui/shared/SkeletonTable.tsx
+3
-3
No files found.
ui/pages/ApiKeys.tsx
View file @
50c71a0d
...
@@ -54,7 +54,7 @@ const ApiKeysPage: React.FC = () => {
...
@@ -54,7 +54,7 @@ const ApiKeysPage: React.FC = () => {
return
(
return
(
<>
<>
<
Skeleton
height=
{
6
}
width=
"250px"
borderRadius=
"full"
marginBottom=
{
12
}
/>
<
Skeleton
height=
{
6
}
width=
"250px"
borderRadius=
"full"
marginBottom=
{
12
}
/>
<
SkeletonTable
columns=
{
[
'
auto
'
,
'
108px
'
]
}
/>
<
SkeletonTable
columns=
{
[
'
100%
'
,
'
108px
'
]
}
/>
<
Skeleton
height=
"44px"
width=
"156px"
borderRadius=
"base"
marginTop=
{
8
}
/>
<
Skeleton
height=
"44px"
width=
"156px"
borderRadius=
"base"
marginTop=
{
8
}
/>
</>
</>
);
);
...
...
ui/privateTags/PrivateAddressTags.tsx
View file @
50c71a0d
import
{
Box
,
Button
,
Spinner
,
Text
,
useDisclosure
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Button
,
Text
,
Skeleton
,
useDisclosure
}
from
'
@chakra-ui/react
'
;
import
React
,
{
useCallback
,
useState
}
from
'
react
'
;
import
React
,
{
useCallback
,
useState
}
from
'
react
'
;
import
type
{
AddressTags
,
AddressTag
}
from
'
types/api/account
'
;
import
type
{
AddressTags
,
AddressTag
}
from
'
types/api/account
'
;
import
SkeletonTable
from
'
ui/shared/SkeletonTable
'
;
import
AddressModal
from
'
./AddressModal/AddressModal
'
;
import
AddressModal
from
'
./AddressModal/AddressModal
'
;
import
AddressTagTable
from
'
./AddressTagTable/AddressTagTable
'
;
import
AddressTagTable
from
'
./AddressTagTable/AddressTagTable
'
;
import
DeletePrivateTagModal
from
'
./DeletePrivateTagModal
'
;
import
DeletePrivateTagModal
from
'
./DeletePrivateTagModal
'
;
type
Props
=
{
type
Props
=
{
addressTags
:
AddressTags
;
addressTags
?
:
AddressTags
;
}
}
const
PrivateAddressTags
=
({
addressTags
}:
Props
)
=>
{
const
PrivateAddressTags
=
({
addressTags
}:
Props
)
=>
{
...
@@ -38,13 +40,22 @@ const PrivateAddressTags = ({ addressTags }: Props) => {
...
@@ -38,13 +40,22 @@ const PrivateAddressTags = ({ addressTags }: Props) => {
deleteModalProps
.
onClose
();
deleteModalProps
.
onClose
();
},
[
deleteModalProps
]);
},
[
deleteModalProps
]);
if
(
!
addressTags
)
{
return
(
<>
<
Skeleton
height=
{
6
}
width=
"250px"
borderRadius=
"full"
marginBottom=
{
12
}
/>
<
SkeletonTable
columns=
{
[
'
auto
'
,
'
40%
'
,
'
108px
'
]
}
/>
<
Skeleton
height=
"44px"
width=
"156px"
borderRadius=
"base"
marginTop=
{
8
}
/>
</>
);
}
return
(
return
(
<>
<>
<
Text
marginBottom=
{
12
}
>
<
Text
marginBottom=
{
12
}
>
Use private transaction tags to label any transactions of interest.
Use private transaction tags to label any transactions of interest.
Private tags are saved in your account and are only visible when you are logged in.
Private tags are saved in your account and are only visible when you are logged in.
</
Text
>
</
Text
>
{
!
addressTags
&&
<
Spinner
/>
}
{
Boolean
(
addressTags
?.
length
)
&&
(
{
Boolean
(
addressTags
?.
length
)
&&
(
<
AddressTagTable
<
AddressTagTable
data=
{
addressTags
}
data=
{
addressTags
}
...
...
ui/privateTags/PrivateTransactionTags.tsx
View file @
50c71a0d
import
{
Box
,
Button
,
Text
,
useDisclosure
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Button
,
Skeleton
,
Text
,
useDisclosure
}
from
'
@chakra-ui/react
'
;
import
React
,
{
useCallback
,
useState
}
from
'
react
'
;
import
React
,
{
useCallback
,
useState
}
from
'
react
'
;
import
type
{
TransactionTags
,
TransactionTag
}
from
'
types/api/account
'
;
import
type
{
TransactionTags
,
TransactionTag
}
from
'
types/api/account
'
;
import
SkeletonTable
from
'
ui/shared/SkeletonTable
'
;
import
DeletePrivateTagModal
from
'
./DeletePrivateTagModal
'
;
import
DeletePrivateTagModal
from
'
./DeletePrivateTagModal
'
;
import
TransactionModal
from
'
./TransactionModal/TransactionModal
'
;
import
TransactionModal
from
'
./TransactionModal/TransactionModal
'
;
import
TransactionTagTable
from
'
./TransactionTagTable/TransactionTagTable
'
;
import
TransactionTagTable
from
'
./TransactionTagTable/TransactionTagTable
'
;
type
Props
=
{
type
Props
=
{
transactionTags
:
TransactionTags
;
transactionTags
?
:
TransactionTags
;
}
}
const
PrivateTransactionTags
=
({
transactionTags
}:
Props
)
=>
{
const
PrivateTransactionTags
=
({
transactionTags
}:
Props
)
=>
{
...
@@ -38,6 +40,16 @@ const PrivateTransactionTags = ({ transactionTags }: Props) => {
...
@@ -38,6 +40,16 @@ const PrivateTransactionTags = ({ transactionTags }: Props) => {
deleteModalProps
.
onClose
();
deleteModalProps
.
onClose
();
},
[
deleteModalProps
]);
},
[
deleteModalProps
]);
if
(
!
transactionTags
)
{
return
(
<>
<
Skeleton
height=
{
6
}
width=
"250px"
borderRadius=
"full"
marginBottom=
{
12
}
/>
<
SkeletonTable
columns=
{
[
'
auto
'
,
'
25%
'
,
'
108px
'
]
}
/>
<
Skeleton
height=
"44px"
width=
"156px"
borderRadius=
"base"
marginTop=
{
8
}
/>
</>
);
}
return
(
return
(
<>
<>
<
Text
marginBottom=
{
12
}
>
<
Text
marginBottom=
{
12
}
>
...
...
ui/shared/SkeletonTable.tsx
View file @
50c71a0d
...
@@ -9,14 +9,14 @@ const SkeletonTable = ({ columns }: Props) => {
...
@@ -9,14 +9,14 @@ const SkeletonTable = ({ columns }: Props) => {
return
(
return
(
<
div
>
<
div
>
<
Skeleton
height=
{
10
}
width=
"100%"
borderTopLeftRadius=
"base"
borderTopRightRadius=
"base"
/>
<
Skeleton
height=
{
10
}
width=
"100%"
borderTopLeftRadius=
"base"
borderTopRightRadius=
"base"
/>
{
Array
.
from
(
Array
(
5
)).
map
((
item
,
index
)
=>
(
{
Array
.
from
(
Array
(
4
)).
map
((
item
,
index
)
=>
(
<
HStack
key=
{
index
}
spacing=
{
6
}
marginTop=
{
8
}
>
<
HStack
key=
{
index
}
spacing=
{
6
}
marginTop=
{
8
}
>
{
columns
.
map
((
width
,
index
)
=>
(
{
columns
.
map
((
width
,
index
)
=>
(
<
Skeleton
<
Skeleton
key=
{
index
}
key=
{
index
}
height=
{
5
}
height=
{
5
}
flexBasis=
{
width
===
'
auto
'
?
'
100%
'
:
width
}
width=
{
width
}
flexShrink=
{
width
===
'
auto
'
?
'
initial
'
:
0
}
flexShrink=
{
width
.
includes
(
'
%
'
)
?
'
initial
'
:
0
}
borderRadius=
"full"
borderRadius=
"full"
/>
/>
))
}
))
}
...
...
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