Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add Notifications #1689

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
d13b4e3
feat: create and use useNotifications.ts
AMIRKHANEF Dec 10, 2024
69524a3
feat: create constant.ts and useNotifications.ts
AMIRKHANEF Dec 10, 2024
9554336
fix: add hover effect to hide balance button
AMIRKHANEF Dec 15, 2024
661347d
style: add blur effect
AMIRKHANEF Dec 15, 2024
0e6b517
feat: add notification manage page
AMIRKHANEF Dec 15, 2024
d7dca02
style: add notification button to the extension mode you have box
AMIRKHANEF Dec 15, 2024
f4b707f
style: add box shaodw
AMIRKHANEF Dec 15, 2024
9c1145b
feat: create functions to get addresses information
AMIRKHANEF Dec 16, 2024
7420edc
style: some small minor changes
AMIRKHANEF Dec 16, 2024
b9ee2b7
feat: add received fund
AMIRKHANEF Dec 16, 2024
38860db
feat: add new route and create a new page for notification settings
AMIRKHANEF Dec 16, 2024
f314f56
feat: create components SelectAccounts and SelectNetwork
AMIRKHANEF Dec 16, 2024
b775d57
refactor: separate notificationSetrting from menu
AMIRKHANEF Dec 16, 2024
d8bc91e
style: some small design changes
AMIRKHANEF Dec 18, 2024
1dbf758
refactor: adjust chains type
AMIRKHANEF Dec 18, 2024
628f6d8
refactor: update constants
AMIRKHANEF Dec 18, 2024
f81a3e4
feat: create NotificationItem
AMIRKHANEF Dec 18, 2024
8f4a89e
feat: create Notifications page
AMIRKHANEF Dec 18, 2024
0ca0644
feat: create useNotifications
AMIRKHANEF Dec 18, 2024
d40db41
fix: decimal issue
AMIRKHANEF Dec 22, 2024
5cbdfb7
refactor: use referenda array instead of ksm and dot referenda arrray
AMIRKHANEF Dec 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 12 additions & 17 deletions packages/extension-polkagate/src/components/SVG/HideBalance.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2019-2024 @polkadot/extension-polkagate authors & contributors
// SPDX-License-Identifier: Apache-2.0

import { Grid, useTheme } from '@mui/material';
/* eslint-disable react/jsx-max-props-per-line */

import { Grid, IconButton, useTheme } from '@mui/material';
import React from 'react';

import { HEADER_COMPONENT_STYLE } from '../../fullscreen/governance/FullScreenHeader';
Expand All @@ -25,7 +27,7 @@ interface IconProps {
const ClosedEye = ({ color, size = 20 }: IconProps) => (
<svg
fill='none'
height= {`${size}px`}
height={`${size}px`}
viewBox='0 -5 24 24'
width={`${size}px`}
xmlns='http://www.w3.org/2000/svg'
Expand Down Expand Up @@ -74,28 +76,21 @@ const HideBalance = ({ darkColor, hide = false, lightColor, noBorder = true, onC
const color = theme.palette.mode === 'dark' ? darkColor || theme.palette.text.primary : lightColor || theme.palette.text.secondary;

return (
<Infotip2 text={t(hide ? 'Show numbers' : 'Hide numbers')} placement = { isExtensionMode ? 'left' : 'bottom'}>
<Infotip2 placement={isExtensionMode ? 'left' : 'bottom'} text={t(hide ? 'Show numbers' : 'Hide numbers')}>
<Grid
alignItems='center'
aria-label={hide ? 'Show balance' : 'Hide balance'}
component='button'
container
item
justifyContent='center'
onClick={onClick}
sx={{ ...HEADER_COMPONENT_STYLE, border: noBorder ? 0 : HEADER_COMPONENT_STYLE?.border }}
type='button'
sx={{ ...HEADER_COMPONENT_STYLE, border: noBorder ? 0 : HEADER_COMPONENT_STYLE?.border, ...(isExtensionMode ? { minWidth: 'unset' } : {}) }}
>
{ hide
? <ClosedEye
color={color}
size={size}
/>
: <OpenEye
color={color}
size={size}
/>
}
<IconButton onClick={onClick} sx={{ m: 0 }}>
{hide
? <ClosedEye color={color} size={size} />
: <OpenEye color={color} size={size} />
}
</IconButton>
</Grid>
</Infotip2>
);
Expand Down
1 change: 1 addition & 0 deletions packages/extension-polkagate/src/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export { default as useNativeTokenPrice } from './useNativeTokenPrice';
export { default as useNeedsPutInFrontOf } from './useNeedsPutInFrontOf';
export { default as useNeedsRebag } from './useNeedsRebag';
export { default as useNFT } from './useNFT';
export { default as useNotifications } from './useNotifications';
export { default as useNotifyOnChainChange } from './useNotifyOnChainChange';
export { default as useOutsideClick } from './useOutsideClick';
export { default as usePendingRewards } from './usePendingRewards';
Expand Down
Loading
Loading