-
Notifications
You must be signed in to change notification settings - Fork 82
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
Implement the new UI for the NervosDAO #2645
Implement the new UI for the NervosDAO #2645
Conversation
c778da6
to
9ae90e6
Compare
className={styles.balance} | ||
> | ||
<span className={styles.number}>{isPrivacyMode ? '******' : shannonToCKBFormatter(`${free}`)}</span> CKB | ||
</CopyZone> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { HIDE_BALANCE } from 'utils/const'
how about replace '******' with HIDE_BALANCE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolved
)} | ||
</div> | ||
<div>{`${isPrivacyMode ? '******' : capacity} CKB`}</div> | ||
</div> | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about replace '******' with HIDE_BALANCE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolved
--third-background-color: #ffffff; | ||
--fourth-background-color: #ecf9f0; | ||
--main-text-color: #333333; | ||
--secondary-text-color: #8DA394; | ||
--main-shadow-color: #eeeeee; | ||
--secondary-text-color: #8da394; | ||
--third-text-color: #666666; | ||
--link-color: #{$main-color}; | ||
--notice-background-color: #D4F8E9; | ||
--notice-text-color: #FF9737; | ||
--notice-background-color: #d4f8e9; | ||
--notice-text-color: #ff9737; | ||
--border-color: #999999; | ||
--input-border-color: #F0F0F0; | ||
--input-border-color: #f0f0f0; | ||
--input-hint-color: #666666; | ||
--divide-line-color: #E5E5E5; | ||
--step-no-activity-color: #E5E5E5; | ||
--divide-line-color: #e5e5e5; | ||
--step-no-activity-color: #e5e5e5; | ||
--activity-color: #{$main-color}; | ||
--success-color: #{$main-color}; | ||
--error-color: #FF1E1E; | ||
--input-disabled-color: #FAFAFA; | ||
--error-color: #ff1e1e; | ||
--input-disabled-color: #fafafa; | ||
--input-second-color: #999999; | ||
--input-button-color: #999999; | ||
--button-cancel-color: #999999; | ||
--svg-color: #666666; | ||
--dialog-secondary-text-color: #666666; | ||
--disable-button-text-color: #CCCCCC; | ||
--disable-button-text-color: #cccccc; | ||
--enable-button-text-color: #333333; | ||
--main-pagination-button-text-color: #666666; | ||
--main-pagination-text-color: #666666; | ||
--warn-background-color: #FFF6EB; | ||
--svg-fill-color: #FFFFFF; | ||
--warn-background-color: #fff6eb; | ||
--svg-fill-color: #ffffff; | ||
// table | ||
--table-head-background-color: #FAFAFA; | ||
--table-head-border-color: #F0F0F0; | ||
--table-head-background-color: #fafafa; | ||
--table-head-border-color: #f0f0f0; | ||
|
||
@media (prefers-color-scheme: dark) { | ||
--primary-color: #{$main-color}; | ||
--primary-text-color: #232323; | ||
--main-background-color: #111614; | ||
--secondary-background-color: #1E2423; | ||
--main-text-color: #FFFFFF; | ||
--secondary-text-color: #8DA394; | ||
--secondary-background-color: #1e2423; | ||
--main-text-color: #ffffff; | ||
--main-shadow-color: #141b1a; | ||
--secondary-text-color: #8da394; | ||
--third-text-color: #cccccc; | ||
--link-color: #{$main-color}; | ||
--third-background-color: #2D3534; | ||
--notice-background-color: #093F29; | ||
--notice-text-color: #F78C2A; | ||
--border-color: #343E3C; | ||
--input-border-color: #343E3C; | ||
--input-hint-color: #FFFFFF; | ||
--third-background-color: #2d3534; | ||
--fourth-background-color: var(--secondary-background-color); | ||
--notice-background-color: #093f29; | ||
--notice-text-color: #f78c2a; | ||
--border-color: #343e3c; | ||
--input-border-color: #343e3c; | ||
--input-hint-color: #ffffff; | ||
--divide-line-color: rgba(240, 240, 240, 0.2); | ||
--step-no-activity-color: #666666; | ||
--activity-color: #{$main-color}; | ||
--success-color: #{$main-color}; | ||
--error-color: #FF1E1E; | ||
--input-disabled-color: #171B1A; | ||
--error-color: #ff1e1e; | ||
--input-disabled-color: #171b1a; | ||
--input-second-color: #999999; | ||
--input-button-color: #FFFFFF; | ||
--input-button-color: #ffffff; | ||
--button-cancel-color: #999999; | ||
--svg-color: #FFFFFF; | ||
--svg-color: #ffffff; | ||
--dialog-secondary-text-color: #999999; | ||
--disable-button-text-color: #666666; | ||
--enable-button-text-color: #FFFFFF; | ||
--main-pagination-button-text-color: #CCCCCC; | ||
--enable-button-text-color: #ffffff; | ||
--main-pagination-button-text-color: #cccccc; | ||
--main-pagination-text-color: #999999; | ||
--warn-background-color: rgba(255, 140, 0, 0.2); | ||
--svg-fill-color: #333333; | ||
// table | ||
--table-head-background-color: #171B1A; | ||
--table-head-border-color: #282E2D; | ||
--table-head-background-color: #171b1a; | ||
--table-head-border-color: #282e2d; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to format color
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is because the current automatic code style configuration is set up that way, and we shouldn't manually adjust the code style. We should create a separate issue later to address the configuration problem with the automation of the code style.
{CellStatus.Depositing !== cellStatus && compensation >= BigInt(0) | ||
? `+${shannonToCKBFormatter(compensation.toString()).toString()} CKB` | ||
? `${isPrivacyMode ? '******' : `+${shannonToCKBFormatter(compensation.toString()).toString()}`} CKB` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about using the const HIDE_BALANCE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolved
clearNervosDaoData()(dispatch) | ||
} | ||
// eslint-disable-next-line | ||
}, []) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not add wallet.id
into the dependence?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should dispatch need also?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copied from
export const useInitData = ({ |
I'm not sure if the previous
eslint-disable-next-line
was intentional, as there were no relevant comments.
const [showingLockInfo, setShowingLockInfo] = useState<CKBComponents.Script | null>(null) | ||
|
||
useEffect(() => { | ||
Promise.all([getAllNetworks(), getCurrentNetworkID()]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because current transaction detail is in the main window, we can get networks
and networkID
from useState
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, that's nice, updated.
packages/neuron-ui/src/components/NervosDAODetail/CellsCard/index.tsx
Outdated
Show resolved
Hide resolved
$tile-yellow-hover: #fa8f00; | ||
$tile-grey-hover: #888; | ||
$divider-color: #b3b3b3; | ||
$tile-green: #00c891; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try to use css parameters instead of sass parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolved
clearNervosDaoData()(dispatch) | ||
} | ||
// eslint-disable-next-line | ||
}, []) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should dispatch need also?
@@ -30,7 +30,7 @@ | |||
|
|||
.syncStatus { | |||
height: 32px; | |||
background-color: #FFFFFF99; | |||
background-color: #ffffff99; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The case of the css needs to be uniform.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can merge this issue and discuss it together on #2645 (comment)
e8bc0c9
to
30dcbc0
Compare
The locked amount is not displayed because NaN issues should be handled in Magickbase/neuron-public-issues#125 (comment) . |
30dcbc0
to
ae458f4
Compare
@devchenyan @yanguoyu @JeffreyMa597 All comments have been processed or responded to. |
These marks may have some bugs. The correct display is like this, but the `locked` should wait for the `ckb` node to sync to 100%. Actually, Magickbase/neuron-public-issues#125 (comment) fix the NaN because of the adapt light client, but this branch is not based on the light-client branch, and |
cc953e6
to
ae458f4
Compare
I confirmed that it is the same issue, and I handled the testing in the same way as described in #2635, which worked normally. |
Implement the new UI for the NervosDAO
Preview:
iShot_2023-04-26_15.41.11.mp4