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
352a033d
Commit
352a033d
authored
Jul 11, 2022
by
isstuev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some style fixes
parent
6249bdaa
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
92 additions
and
113 deletions
+92
-113
Tabs.ts
theme/components/Tabs.ts
+3
-0
index.ts
theme/components/index.ts
+2
-0
AddressTagTableItem.tsx
ui/privateTags/AddressTagTable/AddressTagTableItem.tsx
+4
-25
DeletePrivateTagModal.tsx
ui/privateTags/DeletePrivateTagModal.tsx
+7
-7
DeleteTransactionModal.tsx
ui/privateTags/DeleteTransactionModal.tsx
+0
-27
PrivateAddressTags.tsx
ui/privateTags/PrivateAddressTags.tsx
+3
-3
PrivateTransactionTags.tsx
ui/privateTags/PrivateTransactionTags.tsx
+3
-3
TransactionTagTableItem.tsx
...ivateTags/TransactionTagTable/TransactionTagTableItem.tsx
+4
-24
AddressInput.tsx
ui/shared/AddressInput.tsx
+6
-0
DeleteButton.tsx
ui/shared/DeleteButton.tsx
+28
-0
EditButton.tsx
ui/shared/EditButton.tsx
+28
-0
WatchListTableItem.tsx
ui/watchlist/WatchlistTable/WatchListTableItem.tsx
+4
-24
No files found.
theme/components/Tabs.ts
View file @
352a033d
...
@@ -17,6 +17,9 @@ const variantSoftRounded: PartsStyleFunction<typeof parts> = (props) => {
...
@@ -17,6 +17,9 @@ const variantSoftRounded: PartsStyleFunction<typeof parts> = (props) => {
color
:
getColor
(
theme
,
`
${
c
}
.700`
),
color
:
getColor
(
theme
,
`
${
c
}
.700`
),
bg
:
getColor
(
theme
,
`
${
c
}
.50`
),
bg
:
getColor
(
theme
,
`
${
c
}
.50`
),
},
},
_hover
:
{
color
:
getColor
(
theme
,
`
${
c
}
.400`
),
},
},
},
}
}
}
}
...
...
theme/components/index.ts
View file @
352a033d
...
@@ -4,6 +4,7 @@ import Input from './Input';
...
@@ -4,6 +4,7 @@ import Input from './Input';
import
Link
from
'
./Link
'
;
import
Link
from
'
./Link
'
;
import
Modal
from
'
./Modal
'
;
import
Modal
from
'
./Modal
'
;
import
Table
from
'
./Table
'
;
import
Table
from
'
./Table
'
;
import
Tabs
from
'
./Tabs
'
;
import
Tag
from
'
./Tag
'
;
import
Tag
from
'
./Tag
'
;
import
Tooltip
from
'
./Tooltip
'
;
import
Tooltip
from
'
./Tooltip
'
;
...
@@ -13,6 +14,7 @@ const components = {
...
@@ -13,6 +14,7 @@ const components = {
Form
,
Form
,
Link
,
Link
,
Modal
,
Modal
,
Tabs
,
Table
,
Table
,
Tag
,
Tag
,
Tooltip
,
Tooltip
,
...
...
ui/privateTags/AddressTagTable/AddressTagTableItem.tsx
View file @
352a033d
...
@@ -4,19 +4,16 @@ import {
...
@@ -4,19 +4,16 @@ import {
Tag
,
Tag
,
Tr
,
Tr
,
Td
,
Td
,
Icon
,
IconButton
,
HStack
,
HStack
,
Tooltip
,
Tooltip
,
}
from
'
@chakra-ui/react
'
}
from
'
@chakra-ui/react
'
import
EditIcon
from
'
../../../icons/edit.svg
'
;
import
DeleteIcon
from
'
../../../icons/delete.svg
'
;
import
AddressIcon
from
'
../../shared/AddressIcon
'
;
import
AddressIcon
from
'
../../shared/AddressIcon
'
;
import
AddressLinkWithTooltip
from
'
../../shared/AddressLinkWithTooltip
'
;
import
AddressLinkWithTooltip
from
'
../../shared/AddressLinkWithTooltip
'
;
import
type
{
TPrivateTagsAddressItem
}
from
'
../../../data/privateTagsAddress
'
;
import
type
{
TPrivateTagsAddressItem
}
from
'
../../../data/privateTagsAddress
'
;
import
EditButton
from
'
../../shared/EditButton
'
;
import
DeleteButton
from
'
../../shared/DeleteButton
'
;
interface
Props
{
interface
Props
{
item
:
TPrivateTagsAddressItem
;
item
:
TPrivateTagsAddressItem
;
...
@@ -50,26 +47,8 @@ const AddressTagTableItem = ({ item, onEditClick, onDeleteClick }: Props) => {
...
@@ -50,26 +47,8 @@ const AddressTagTableItem = ({ item, onEditClick, onDeleteClick }: Props) => {
</
Td
>
</
Td
>
<
Td
>
<
Td
>
<
HStack
spacing=
{
6
}
>
<
HStack
spacing=
{
6
}
>
<
Tooltip
label=
"Edit"
>
<
EditButton
onClick=
{
onItemEditClick
}
/>
<
IconButton
<
DeleteButton
onClick=
{
onItemDeleteClick
}
/>
aria
-
label=
"edit"
variant=
"iconBlue"
w=
"30px"
h=
"30px"
onClick=
{
onItemEditClick
}
icon=
{
<
Icon
as=
{
EditIcon
}
w=
"20px"
h=
"20px"
/>
}
/>
</
Tooltip
>
<
Tooltip
label=
"Delete"
>
<
IconButton
aria
-
label=
"delete"
variant=
"iconBlue"
w=
"30px"
h=
"30px"
onClick=
{
onItemDeleteClick
}
icon=
{
<
Icon
as=
{
DeleteIcon
}
w=
"20px"
h=
"20px"
/>
}
/>
</
Tooltip
>
</
HStack
>
</
HStack
>
</
Td
>
</
Td
>
</
Tr
>
</
Tr
>
...
...
ui/privateTags/Delete
Address
Modal.tsx
→
ui/privateTags/Delete
PrivateTag
Modal.tsx
View file @
352a033d
...
@@ -5,23 +5,23 @@ import DeleteModal from '../shared/DeleteModal'
...
@@ -5,23 +5,23 @@ import DeleteModal from '../shared/DeleteModal'
type
Props
=
{
type
Props
=
{
isOpen
:
boolean
;
isOpen
:
boolean
;
onClose
:
()
=>
void
;
onClose
:
()
=>
void
;
address
?:
string
;
tag
?:
string
;
}
}
const
Delete
AddressModal
:
React
.
FC
<
Props
>
=
({
isOpen
,
onClose
,
address
})
=>
{
const
Delete
PrivateTagModal
:
React
.
FC
<
Props
>
=
({
isOpen
,
onClose
,
tag
})
=>
{
const
onDelete
=
useCallback
(()
=>
{
const
onDelete
=
useCallback
(()
=>
{
// eslint-disable-next-line no-console
// eslint-disable-next-line no-console
console
.
log
(
'
delete
'
,
address
);
console
.
log
(
'
delete
'
,
tag
);
},
[
address
]);
},
[
tag
]);
return
(
return
(
<
DeleteModal
<
DeleteModal
isOpen=
{
isOpen
}
isOpen=
{
isOpen
}
onClose=
{
onClose
}
onClose=
{
onClose
}
onDelete=
{
onDelete
}
onDelete=
{
onDelete
}
title=
"Remov
e address
private tag"
title=
"Remov
al of
private tag"
text=
{
`
Address ${ address || 'address' } will be delet
ed`
}
text=
{
`
Tag "${ tag || 'address' }" will be remov
ed`
}
/>
/>
)
)
}
}
export
default
Delete
Address
Modal
;
export
default
Delete
PrivateTag
Modal
;
ui/privateTags/DeleteTransactionModal.tsx
deleted
100644 → 0
View file @
6249bdaa
import
React
,
{
useCallback
}
from
'
react
'
;
import
DeleteModal
from
'
../shared/DeleteModal
'
type
Props
=
{
isOpen
:
boolean
;
onClose
:
()
=>
void
;
transaction
?:
string
;
}
const
DeleteTransactionModal
:
React
.
FC
<
Props
>
=
({
isOpen
,
onClose
,
transaction
})
=>
{
const
onDelete
=
useCallback
(()
=>
{
// eslint-disable-next-line no-console
console
.
log
(
'
delete
'
,
transaction
);
},
[
transaction
]);
return
(
<
DeleteModal
isOpen=
{
isOpen
}
onClose=
{
onClose
}
onDelete=
{
onDelete
}
title=
"Remove transaction private tag"
text=
{
`Transaction ${ transaction || 'transaction' } will be deleted`
}
/>
)
}
export
default
DeleteTransactionModal
;
ui/privateTags/PrivateAddressTags.tsx
View file @
352a033d
...
@@ -7,7 +7,7 @@ import AddressModal from './AddressModal/AddressModal';
...
@@ -7,7 +7,7 @@ import AddressModal from './AddressModal/AddressModal';
import
type
{
TPrivateTagsAddressItem
}
from
'
./../../data/privateTagsAddress
'
;
import
type
{
TPrivateTagsAddressItem
}
from
'
./../../data/privateTagsAddress
'
;
import
{
privateTagsAddress
}
from
'
./../../data/privateTagsAddress
'
;
import
{
privateTagsAddress
}
from
'
./../../data/privateTagsAddress
'
;
import
Delete
AddressModal
from
'
./DeleteAddress
Modal
'
;
import
Delete
PrivateTagModal
from
'
./DeletePrivateTag
Modal
'
;
const
PrivateAddressTags
:
React
.
FC
=
()
=>
{
const
PrivateAddressTags
:
React
.
FC
=
()
=>
{
const
addressModalProps
=
useDisclosure
();
const
addressModalProps
=
useDisclosure
();
...
@@ -27,7 +27,7 @@ const PrivateAddressTags: React.FC = () => {
...
@@ -27,7 +27,7 @@ const PrivateAddressTags: React.FC = () => {
},
[
addressModalProps
]);
},
[
addressModalProps
]);
const
onDeleteClick
=
useCallback
((
data
:
TPrivateTagsAddressItem
)
=>
{
const
onDeleteClick
=
useCallback
((
data
:
TPrivateTagsAddressItem
)
=>
{
setDeleteModalData
(
data
.
address
);
setDeleteModalData
(
data
.
tag
);
deleteModalProps
.
onOpen
();
deleteModalProps
.
onOpen
();
},
[
deleteModalProps
])
},
[
deleteModalProps
])
...
@@ -59,7 +59,7 @@ const PrivateAddressTags: React.FC = () => {
...
@@ -59,7 +59,7 @@ const PrivateAddressTags: React.FC = () => {
</
Button
>
</
Button
>
</
Box
>
</
Box
>
<
AddressModal
{
...
addressModalProps
}
onClose=
{
onAddressModalClose
}
data=
{
addressModalData
}
/>
<
AddressModal
{
...
addressModalProps
}
onClose=
{
onAddressModalClose
}
data=
{
addressModalData
}
/>
<
Delete
AddressModal
{
...
deleteModalProps
}
onClose=
{
onDeleteModalClose
}
address
=
{
deleteModalData
}
/>
<
Delete
PrivateTagModal
{
...
deleteModalProps
}
onClose=
{
onDeleteModalClose
}
tag
=
{
deleteModalData
}
/>
</>
</>
);
);
};
};
...
...
ui/privateTags/PrivateTransactionTags.tsx
View file @
352a033d
...
@@ -7,7 +7,7 @@ import TransactionModal from './TransactionModal/TransactionModal';
...
@@ -7,7 +7,7 @@ import TransactionModal from './TransactionModal/TransactionModal';
import
type
{
TPrivateTagsTransactionItem
}
from
'
./../../data/privateTagsTransaction
'
;
import
type
{
TPrivateTagsTransactionItem
}
from
'
./../../data/privateTagsTransaction
'
;
import
{
privateTagsTransaction
}
from
'
./../../data/privateTagsTransaction
'
;
import
{
privateTagsTransaction
}
from
'
./../../data/privateTagsTransaction
'
;
import
Delete
TransactionModal
from
'
./DeleteTransaction
Modal
'
;
import
Delete
PrivateTagModal
from
'
./DeletePrivateTag
Modal
'
;
const
PrivateTransactionTags
:
React
.
FC
=
()
=>
{
const
PrivateTransactionTags
:
React
.
FC
=
()
=>
{
const
transactionModalProps
=
useDisclosure
();
const
transactionModalProps
=
useDisclosure
();
...
@@ -27,7 +27,7 @@ const PrivateTransactionTags: React.FC = () => {
...
@@ -27,7 +27,7 @@ const PrivateTransactionTags: React.FC = () => {
},
[
transactionModalProps
]);
},
[
transactionModalProps
]);
const
onDeleteClick
=
useCallback
((
data
:
TPrivateTagsTransactionItem
)
=>
{
const
onDeleteClick
=
useCallback
((
data
:
TPrivateTagsTransactionItem
)
=>
{
setDeleteModalData
(
data
.
t
ransaction
);
setDeleteModalData
(
data
.
t
ag
);
deleteModalProps
.
onOpen
();
deleteModalProps
.
onOpen
();
},
[
deleteModalProps
])
},
[
deleteModalProps
])
...
@@ -59,7 +59,7 @@ const PrivateTransactionTags: React.FC = () => {
...
@@ -59,7 +59,7 @@ const PrivateTransactionTags: React.FC = () => {
</
Button
>
</
Button
>
</
Box
>
</
Box
>
<
TransactionModal
{
...
transactionModalProps
}
onClose=
{
onAddressModalClose
}
data=
{
transactionModalData
}
/>
<
TransactionModal
{
...
transactionModalProps
}
onClose=
{
onAddressModalClose
}
data=
{
transactionModalData
}
/>
<
Delete
TransactionModal
{
...
deleteModalProps
}
onClose=
{
onDeleteModalClose
}
transaction
=
{
deleteModalData
}
/>
<
Delete
PrivateTagModal
{
...
deleteModalProps
}
onClose=
{
onDeleteModalClose
}
tag
=
{
deleteModalData
}
/>
</>
</>
);
);
};
};
...
...
ui/privateTags/TransactionTagTable/TransactionTagTableItem.tsx
View file @
352a033d
...
@@ -4,14 +4,12 @@ import {
...
@@ -4,14 +4,12 @@ import {
Tag
,
Tag
,
Tr
,
Tr
,
Td
,
Td
,
Icon
,
IconButton
,
HStack
,
HStack
,
Tooltip
,
Tooltip
,
}
from
'
@chakra-ui/react
'
}
from
'
@chakra-ui/react
'
import
Edit
Icon
from
'
../../../icons/edit.svg
'
;
import
Edit
Button
from
'
../../shared/EditButton
'
;
import
Delete
Icon
from
'
../../../icons/delete.svg
'
;
import
Delete
Button
from
'
../../shared/DeleteButton
'
;
import
AddressLinkWithTooltip
from
'
../../shared/AddressLinkWithTooltip
'
;
import
AddressLinkWithTooltip
from
'
../../shared/AddressLinkWithTooltip
'
;
...
@@ -48,26 +46,8 @@ const AddressTagTableItem = ({ item, onEditClick, onDeleteClick }: Props) => {
...
@@ -48,26 +46,8 @@ const AddressTagTableItem = ({ item, onEditClick, onDeleteClick }: Props) => {
</
Td
>
</
Td
>
<
Td
>
<
Td
>
<
HStack
spacing=
{
6
}
>
<
HStack
spacing=
{
6
}
>
<
Tooltip
label=
"Edit"
>
<
EditButton
onClick=
{
onItemEditClick
}
/>
<
IconButton
<
DeleteButton
onClick=
{
onItemDeleteClick
}
/>
aria
-
label=
"edit"
variant=
"iconBlue"
w=
"30px"
h=
"30px"
onClick=
{
onItemEditClick
}
icon=
{
<
Icon
as=
{
EditIcon
}
w=
"20px"
h=
"20px"
/>
}
/>
</
Tooltip
>
<
Tooltip
label=
"Delete"
>
<
IconButton
aria
-
label=
"delete"
variant=
"iconBlue"
w=
"30px"
h=
"30px"
onClick=
{
onItemDeleteClick
}
icon=
{
<
Icon
as=
{
DeleteIcon
}
w=
"20px"
h=
"20px"
/>
}
/>
</
Tooltip
>
</
HStack
>
</
HStack
>
</
Td
>
</
Td
>
</
Tr
>
</
Tr
>
...
...
ui/shared/AddressInput.tsx
View file @
352a033d
...
@@ -22,6 +22,12 @@ const AddressInput: React.FC<Props> = ({ field, isInvalid }) => {
...
@@ -22,6 +22,12 @@ const AddressInput: React.FC<Props> = ({ field, isInvalid }) => {
placeholder=
" "
placeholder=
" "
isInvalid=
{
isInvalid
}
isInvalid=
{
isInvalid
}
maxLength=
{
ADDRESS_LENGTH
}
maxLength=
{
ADDRESS_LENGTH
}
// TODO: move this to input theme
css=
{
{
'
:-webkit-autofill
'
:
{
transition
:
'
background-color 5000s ease-in-out 0s
'
},
'
:-webkit-autofill:hover
'
:
{
transition
:
'
background-color 5000s ease-in-out 0s
'
},
'
:-webkit-autofill:focus
'
:
{
transition
:
'
background-color 5000s ease-in-out 0s
'
},
}
}
/>
/>
<
FormLabel
>
Address (0x...)
</
FormLabel
>
<
FormLabel
>
Address (0x...)
</
FormLabel
>
</
FormControl
>
</
FormControl
>
...
...
ui/shared/DeleteButton.tsx
0 → 100644
View file @
352a033d
import
React
,
{
useCallback
}
from
'
react
'
;
import
{
Tooltip
,
IconButton
,
Icon
}
from
'
@chakra-ui/react
'
;
import
DeleteIcon
from
'
../../icons/delete.svg
'
;
type
Props
=
{
onClick
:
()
=>
void
;
}
const
DeleteButton
=
({
onClick
}:
Props
)
=>
{
const
onFocusCapture
=
useCallback
((
e
:
React
.
SyntheticEvent
)
=>
e
.
stopPropagation
(),
[])
return
(
<
Tooltip
label=
"Delete"
>
<
IconButton
aria
-
label=
"delete"
variant=
"iconBlue"
w=
"30px"
h=
"30px"
onClick=
{
onClick
}
icon=
{
<
Icon
as=
{
DeleteIcon
}
w=
"20px"
h=
"20px"
/>
}
onFocusCapture=
{
onFocusCapture
}
/>
</
Tooltip
>
)
}
export
default
DeleteButton
;
ui/shared/EditButton.tsx
0 → 100644
View file @
352a033d
import
React
,
{
useCallback
}
from
'
react
'
;
import
{
Tooltip
,
IconButton
,
Icon
}
from
'
@chakra-ui/react
'
;
import
EditIcon
from
'
../../icons/edit.svg
'
;
type
Props
=
{
onClick
:
()
=>
void
;
}
const
EditButton
=
({
onClick
}:
Props
)
=>
{
const
onFocusCapture
=
useCallback
((
e
:
React
.
SyntheticEvent
)
=>
e
.
stopPropagation
(),
[])
return
(
<
Tooltip
label=
"Edit"
>
<
IconButton
aria
-
label=
"edit"
variant=
"iconBlue"
w=
"30px"
h=
"30px"
onClick=
{
onClick
}
icon=
{
<
Icon
as=
{
EditIcon
}
w=
"20px"
h=
"20px"
/>
}
onFocusCapture=
{
onFocusCapture
}
/>
</
Tooltip
>
)
}
export
default
EditButton
;
ui/watchlist/WatchlistTable/WatchListTableItem.tsx
View file @
352a033d
...
@@ -5,14 +5,12 @@ import {
...
@@ -5,14 +5,12 @@ import {
Tr
,
Tr
,
Td
,
Td
,
Switch
,
Switch
,
Icon
,
IconButton
,
HStack
,
HStack
,
Tooltip
,
Tooltip
,
}
from
'
@chakra-ui/react
'
}
from
'
@chakra-ui/react
'
import
Edit
Icon
from
'
../../../icons/edit.svg
'
;
import
Edit
Button
from
'
../../shared/EditButton
'
;
import
Delete
Icon
from
'
../../../icons/delete.svg
'
;
import
Delete
Button
from
'
../../shared/DeleteButton
'
;
import
type
{
TWatchlistItem
}
from
'
../../../data/watchlist
'
;
import
type
{
TWatchlistItem
}
from
'
../../../data/watchlist
'
;
...
@@ -46,26 +44,8 @@ const WatchlistTableItem = ({ item, onEditClick, onDeleteClick }: Props) => {
...
@@ -46,26 +44,8 @@ const WatchlistTableItem = ({ item, onEditClick, onDeleteClick }: Props) => {
<
Td
><
Switch
colorScheme=
"blue"
size=
"md"
isChecked=
{
item
.
notification
}
/></
Td
>
<
Td
><
Switch
colorScheme=
"blue"
size=
"md"
isChecked=
{
item
.
notification
}
/></
Td
>
<
Td
>
<
Td
>
<
HStack
spacing=
{
6
}
>
<
HStack
spacing=
{
6
}
>
<
Tooltip
label=
"Edit"
>
<
EditButton
onClick=
{
onItemEditClick
}
/>
<
IconButton
<
DeleteButton
onClick=
{
onItemDeleteClick
}
/>
aria
-
label=
"edit"
variant=
"iconBlue"
w=
"30px"
h=
"30px"
onClick=
{
onItemEditClick
}
icon=
{
<
Icon
as=
{
EditIcon
}
w=
"20px"
h=
"20px"
/>
}
/>
</
Tooltip
>
<
Tooltip
label=
"Delete"
>
<
IconButton
aria
-
label=
"delete"
variant=
"iconBlue"
w=
"30px"
h=
"30px"
onClick=
{
onItemDeleteClick
}
icon=
{
<
Icon
as=
{
DeleteIcon
}
w=
"20px"
h=
"20px"
/>
}
/>
</
Tooltip
>
</
HStack
>
</
HStack
>
</
Td
>
</
Td
>
</
Tr
>
</
Tr
>
...
...
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