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
f2b9e4d0
Commit
f2b9e4d0
authored
Jul 14, 2022
by
isstuev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes
parent
f3fc1267
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
43 additions
and
17 deletions
+43
-17
Modal.ts
theme/components/Modal.ts
+6
-0
Table.ts
theme/components/Table.ts
+1
-0
ApiKeyTableItem.tsx
ui/apiKey/ApiKeyTable/ApiKeyTableItem.tsx
+0
-1
DeleteApiKeyModal.tsx
ui/apiKey/DeleteApiKeyModal.tsx
+8
-2
Header.module.css
ui/header/Header.module.css
+2
-2
Header.tsx
ui/header/Header.tsx
+3
-3
AccountNavLink.tsx
ui/navigation/AccountNavLink.tsx
+1
-1
MainNavLink.tsx
ui/navigation/MainNavLink.tsx
+1
-1
DeletePrivateTagModal.tsx
ui/privateTags/DeletePrivateTagModal.tsx
+9
-2
DeleteModal.tsx
ui/shared/DeleteModal.tsx
+3
-3
DeleteAddressModal.tsx
ui/watchlist/DeleteAddressModal.tsx
+9
-2
No files found.
theme/components/Modal.ts
View file @
f2b9e4d0
...
@@ -39,6 +39,9 @@ const baseStyleCloseButton: SystemStyleFunction = (props) => {
...
@@ -39,6 +39,9 @@ const baseStyleCloseButton: SystemStyleFunction = (props) => {
_active
:
{
bg
:
'
none
'
},
_active
:
{
bg
:
'
none
'
},
}
}
}
}
const
baseStyleOverlay
=
{
bg
:
'
blackAlpha.800
'
,
}
const
baseStyle
:
PartsStyleFunction
<
typeof
parts
>
=
(
props
)
=>
({
const
baseStyle
:
PartsStyleFunction
<
typeof
parts
>
=
(
props
)
=>
({
dialog
:
baseStyleDialog
(
props
),
dialog
:
baseStyleDialog
(
props
),
...
@@ -46,6 +49,7 @@ const baseStyle: PartsStyleFunction<typeof parts> = (props) => ({
...
@@ -46,6 +49,7 @@ const baseStyle: PartsStyleFunction<typeof parts> = (props) => ({
body
:
baseStyleBody
,
body
:
baseStyleBody
,
footer
:
baseStyleFooter
,
footer
:
baseStyleFooter
,
closeButton
:
baseStyleCloseButton
(
props
),
closeButton
:
baseStyleCloseButton
(
props
),
overlay
:
baseStyleOverlay
,
})
})
const
sizes
=
{
const
sizes
=
{
...
@@ -62,4 +66,6 @@ const Modal: ComponentMultiStyleConfig = {
...
@@ -62,4 +66,6 @@ const Modal: ComponentMultiStyleConfig = {
baseStyle
,
baseStyle
,
}
}
Modal
.
defaultProps
=
{
isCentered
:
true
};
export
default
Modal
;
export
default
Modal
;
theme/components/Table.ts
View file @
f2b9e4d0
...
@@ -30,6 +30,7 @@ const Table: ComponentMultiStyleConfig = {
...
@@ -30,6 +30,7 @@ const Table: ComponentMultiStyleConfig = {
fontWeight
:
'
normal
'
,
fontWeight
:
'
normal
'
,
overflow
:
'
hidden
'
,
overflow
:
'
hidden
'
,
color
:
'
gray.500
'
,
color
:
'
gray.500
'
,
letterSpacing
:
'
none
'
,
},
},
td
:
{
td
:
{
fontSize
:
'
md
'
,
fontSize
:
'
md
'
,
...
...
ui/apiKey/ApiKeyTable/ApiKeyTableItem.tsx
View file @
f2b9e4d0
...
@@ -42,7 +42,6 @@ const WatchlistTableItem = ({ item, onEditClick, onDeleteClick }: Props) => {
...
@@ -42,7 +42,6 @@ const WatchlistTableItem = ({ item, onEditClick, onDeleteClick }: Props) => {
</
Td
>
</
Td
>
<
Td
>
<
Td
>
<
HStack
spacing=
{
6
}
>
<
HStack
spacing=
{
6
}
>
icons
<
EditButton
onClick=
{
onItemEditClick
}
/>
<
EditButton
onClick=
{
onItemEditClick
}
/>
<
DeleteButton
onClick=
{
onItemDeleteClick
}
/>
<
DeleteButton
onClick=
{
onItemDeleteClick
}
/>
</
HStack
>
</
HStack
>
...
...
ui/apiKey/DeleteApiKeyModal.tsx
View file @
f2b9e4d0
import
React
,
{
useCallback
}
from
'
react
'
;
import
React
,
{
useCallback
}
from
'
react
'
;
import
{
Text
}
from
'
@chakra-ui/react
'
;
import
DeleteModal
from
'
../shared/DeleteModal
'
import
DeleteModal
from
'
../shared/DeleteModal
'
type
Props
=
{
type
Props
=
{
...
@@ -13,13 +13,19 @@ const DeleteAddressModal: React.FC<Props> = ({ isOpen, onClose, name }) => {
...
@@ -13,13 +13,19 @@ const DeleteAddressModal: React.FC<Props> = ({ isOpen, onClose, name }) => {
// eslint-disable-next-line no-console
// eslint-disable-next-line no-console
console
.
log
(
'
delete
'
,
name
);
console
.
log
(
'
delete
'
,
name
);
},
[
name
]);
},
[
name
]);
const
renderText
=
useCallback
(()
=>
{
return
(
<
Text
display=
"flex"
>
API key for
<
Text
fontWeight=
"600"
whiteSpace=
"pre"
>
{
` "${ name || 'name' }" `
}
</
Text
>
will be deleted
</
Text
>
)
},
[
name
]);
return
(
return
(
<
DeleteModal
<
DeleteModal
isOpen=
{
isOpen
}
isOpen=
{
isOpen
}
onClose=
{
onClose
}
onClose=
{
onClose
}
onDelete=
{
onDelete
}
onDelete=
{
onDelete
}
title=
"Remove API key"
title=
"Remove API key"
text=
{
`API key for "${ name || 'name' }" will be deleted`
}
renderText=
{
renderText
}
/>
/>
)
)
}
}
...
...
ui/header/Header.module.css
View file @
f2b9e4d0
.identicon
{
.identicon
{
max-width
:
4
0
px
;
max-width
:
4
8
px
;
max-height
:
4
0
px
;
max-height
:
4
8
px
;
}
}
\ No newline at end of file
ui/header/Header.tsx
View file @
f2b9e4d0
...
@@ -23,12 +23,12 @@ const Header = () => {
...
@@ -23,12 +23,12 @@ const Header = () => {
<
InputLeftElement
w=
{
6
}
ml=
"132px"
mr=
{
2.5
}
>
<
InputLeftElement
w=
{
6
}
ml=
"132px"
mr=
{
2.5
}
>
<
SearchIcon
w=
{
5
}
h=
{
5
}
color=
"gray.500"
/>
<
SearchIcon
w=
{
5
}
h=
{
5
}
color=
"gray.500"
/>
</
InputLeftElement
>
</
InputLeftElement
>
<
Input
paddingInlineStart=
"50px"
placeholder=
"Search by addresses / transactions /
block/ token
... "
/>
<
Input
paddingInlineStart=
"50px"
placeholder=
"Search by addresses / transactions /
block / token
... "
/>
</
InputGroup
>
</
InputGroup
>
<
Switch
size=
"lg"
onChange=
{
toggleColorMode
}
/>
<
Switch
size=
"lg"
onChange=
{
toggleColorMode
}
/>
<
Center
minWidth=
"50px"
width=
"50px"
height=
"50px"
bg=
{
useColorModeValue
(
'
blackAlpha.100
'
,
'
white
'
)
}
borderRadius=
"50%"
overflow=
"hidden"
>
<
Center
minWidth=
"50px"
width=
"50px"
height=
"50px"
bg=
{
useColorModeValue
(
'
blackAlpha.100
'
,
'
white
'
)
}
borderRadius=
"50%"
overflow=
"hidden"
>
{
/* the displayed size is 4
0
px, but we need to generate x2 for retina displays */
}
{
/* the displayed size is 4
8
px, but we need to generate x2 for retina displays */
}
<
Identicon
className=
{
styles
.
identicon
}
string=
"randomness"
size=
{
80
}
/>
<
Identicon
className=
{
styles
.
identicon
}
string=
"randomness"
size=
{
96
}
/>
</
Center
>
</
Center
>
</
HStack
>
</
HStack
>
)
)
...
...
ui/navigation/AccountNavLink.tsx
View file @
f2b9e4d0
...
@@ -26,7 +26,7 @@ const AccountNavLink = ({ text, pathname, icon }: Props) => {
...
@@ -26,7 +26,7 @@ const AccountNavLink = ({ text, pathname, icon }: Props) => {
py=
{
2.5
}
py=
{
2.5
}
color=
{
isActive
?
colors
.
text
.
active
:
colors
.
text
.
default
}
color=
{
isActive
?
colors
.
text
.
active
:
colors
.
text
.
default
}
bgColor=
{
isActive
?
colors
.
bg
.
active
:
colors
.
bg
.
default
}
bgColor=
{
isActive
?
colors
.
bg
.
active
:
colors
.
bg
.
default
}
_hover=
{
{
color
:
colors
.
text
.
hover
}
}
_hover=
{
{
color
:
isActive
?
colors
.
text
.
active
:
colors
.
text
.
hover
}
}
borderRadius=
"base"
borderRadius=
"base"
>
>
<
HStack
spacing=
{
3
}
>
<
HStack
spacing=
{
3
}
>
...
...
ui/navigation/MainNavLink.tsx
View file @
f2b9e4d0
...
@@ -27,7 +27,7 @@ const MainNavLink = ({ text, pathname, icon }: Props) => {
...
@@ -27,7 +27,7 @@ const MainNavLink = ({ text, pathname, icon }: Props) => {
py=
{
2.5
}
py=
{
2.5
}
color=
{
isActive
?
colors
.
text
.
active
:
colors
.
text
.
default
}
color=
{
isActive
?
colors
.
text
.
active
:
colors
.
text
.
default
}
bgColor=
{
isActive
?
colors
.
bg
.
active
:
colors
.
bg
.
default
}
bgColor=
{
isActive
?
colors
.
bg
.
active
:
colors
.
bg
.
default
}
_hover=
{
{
color
:
colors
.
text
.
hover
}
}
_hover=
{
{
color
:
isActive
?
colors
.
text
.
active
:
colors
.
text
.
hover
}
}
borderRadius=
"base"
borderRadius=
"base"
>
>
<
HStack
justifyContent=
"space-between"
>
<
HStack
justifyContent=
"space-between"
>
...
...
ui/privateTags/DeletePrivateTagModal.tsx
View file @
f2b9e4d0
import
React
,
{
useCallback
}
from
'
react
'
;
import
React
,
{
useCallback
}
from
'
react
'
;
import
{
Text
}
from
'
@chakra-ui/react
'
;
import
DeleteModal
from
'
../shared/DeleteModal
'
import
DeleteModal
from
'
../shared/DeleteModal
'
type
Props
=
{
type
Props
=
{
...
@@ -13,13 +13,20 @@ const DeletePrivateTagModal: React.FC<Props> = ({ isOpen, onClose, tag }) => {
...
@@ -13,13 +13,20 @@ const DeletePrivateTagModal: React.FC<Props> = ({ isOpen, onClose, tag }) => {
// eslint-disable-next-line no-console
// eslint-disable-next-line no-console
console
.
log
(
'
delete
'
,
tag
);
console
.
log
(
'
delete
'
,
tag
);
},
[
tag
]);
},
[
tag
]);
const
renderText
=
useCallback
(()
=>
{
return
(
<
Text
display=
"flex"
>
Tag
<
Text
fontWeight=
"600"
whiteSpace=
"pre"
>
{
` "${ tag || 'address' }" `
}
</
Text
>
will be deleted
</
Text
>
)
},
[
tag
]);
return
(
return
(
<
DeleteModal
<
DeleteModal
isOpen=
{
isOpen
}
isOpen=
{
isOpen
}
onClose=
{
onClose
}
onClose=
{
onClose
}
onDelete=
{
onDelete
}
onDelete=
{
onDelete
}
title=
"Removal of private tag"
title=
"Removal of private tag"
text=
{
`Tag "${ tag || 'address' }" will be removed`
}
renderText=
{
renderText
}
/>
/>
)
)
}
}
...
...
ui/shared/DeleteModal.tsx
View file @
f2b9e4d0
...
@@ -16,10 +16,10 @@ type Props = {
...
@@ -16,10 +16,10 @@ type Props = {
onClose
:
()
=>
void
;
onClose
:
()
=>
void
;
onDelete
:
()
=>
void
;
onDelete
:
()
=>
void
;
title
:
string
;
title
:
string
;
text
:
string
;
renderText
:
()
=>
JSX
.
Element
;
}
}
const
DeleteModal
:
React
.
FC
<
Props
>
=
({
isOpen
,
onClose
,
onDelete
,
title
,
t
ext
})
=>
{
const
DeleteModal
:
React
.
FC
<
Props
>
=
({
isOpen
,
onClose
,
onDelete
,
title
,
renderT
ext
})
=>
{
const
onDeleteClick
=
useCallback
(()
=>
{
const
onDeleteClick
=
useCallback
(()
=>
{
onDelete
();
onDelete
();
...
@@ -33,7 +33,7 @@ const DeleteModal: React.FC<Props> = ({ isOpen, onClose, onDelete, title, text }
...
@@ -33,7 +33,7 @@ const DeleteModal: React.FC<Props> = ({ isOpen, onClose, onDelete, title, text }
<
ModalHeader
fontWeight=
"500"
textStyle=
"h3"
>
{
title
}
</
ModalHeader
>
<
ModalHeader
fontWeight=
"500"
textStyle=
"h3"
>
{
title
}
</
ModalHeader
>
<
ModalCloseButton
/>
<
ModalCloseButton
/>
<
ModalBody
>
<
ModalBody
>
{
text
}
{
renderText
()
}
</
ModalBody
>
</
ModalBody
>
<
ModalFooter
>
<
ModalFooter
>
<
Button
variant=
"primary"
size=
"lg"
onClick=
{
onDeleteClick
}
>
<
Button
variant=
"primary"
size=
"lg"
onClick=
{
onDeleteClick
}
>
...
...
ui/watchlist/DeleteAddressModal.tsx
View file @
f2b9e4d0
import
React
,
{
useCallback
}
from
'
react
'
;
import
React
,
{
useCallback
}
from
'
react
'
;
import
{
Text
}
from
'
@chakra-ui/react
'
;
import
DeleteModal
from
'
../shared/DeleteModal
'
import
DeleteModal
from
'
../shared/DeleteModal
'
type
Props
=
{
type
Props
=
{
...
@@ -13,13 +13,20 @@ const DeleteAddressModal: React.FC<Props> = ({ isOpen, onClose, address }) => {
...
@@ -13,13 +13,20 @@ const DeleteAddressModal: React.FC<Props> = ({ isOpen, onClose, address }) => {
// eslint-disable-next-line no-console
// eslint-disable-next-line no-console
console
.
log
(
'
delete
'
,
address
);
console
.
log
(
'
delete
'
,
address
);
},
[
address
]);
},
[
address
]);
const
renderText
=
useCallback
(()
=>
{
return
(
<
Text
display=
"flex"
>
Address
<
Text
fontWeight=
"600"
whiteSpace=
"pre"
>
{
address
||
'
address
'
}
</
Text
>
will be deleted
</
Text
>
)
},
[
address
]);
return
(
return
(
<
DeleteModal
<
DeleteModal
isOpen=
{
isOpen
}
isOpen=
{
isOpen
}
onClose=
{
onClose
}
onClose=
{
onClose
}
onDelete=
{
onDelete
}
onDelete=
{
onDelete
}
title=
"Remove address from watch list"
title=
"Remove address from watch list"
text=
{
`Address ${ address || 'address' } will be deleted`
}
renderText=
{
renderText
}
/>
/>
)
)
}
}
...
...
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