Skip to content

Commit

Permalink
fix: issue_175_193
Browse files Browse the repository at this point in the history
  • Loading branch information
devchenyan committed Jun 29, 2023
1 parent 240fdc1 commit 3edf8bb
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,10 @@
display: block;
margin-bottom: 24px;
color: var(--main-text-color);

.highlight {
color: var(--primary-color);
}
}
input[type='checkbox'] {
display: none;
margin-right: 8px;
}
input[type='checkbox'] + span {
display: inline-block;
padding-left: 26px;
line-height: 20px;
background: url('../../widgets/Icons/Checkbox.svg') no-repeat left top;
user-select: none;
}
input[type='checkbox']:checked + span {
background: url('../../widgets/Icons/CheckboxSelected.svg') no-repeat left
top;
}
@include checkbox;
}
16 changes: 7 additions & 9 deletions packages/neuron-ui/src/components/ClearCache/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,14 @@ const ClearCacheDialog = ({
<div className={styles.options}>
<label htmlFor={IDs.refreshCacheOption}>
<input type="checkbox" id={IDs.refreshCacheOption} checked disabled />
<span>{t(`${I18N_PATH}.options.refresh.label`)}</span>
<span className={styles.highlight}>{t(`${I18N_PATH}.options.refresh.label`)}</span>
</label>
{
hideRebuild ? null : (
<label htmlFor={IDs.rebuildCacheOption}>
<input type="checkbox" id={IDs.rebuildCacheOption} checked={isRebuild} onChange={toggleIsRebuild} />
<span>{t(`${I18N_PATH}.options.rebuild.label`)}</span>
</label>
)
}
{hideRebuild ? null : (
<label htmlFor={IDs.rebuildCacheOption}>
<input type="checkbox" id={IDs.rebuildCacheOption} checked={isRebuild} onChange={toggleIsRebuild} />
<span>{t(`${I18N_PATH}.options.rebuild.label`)}</span>
</label>
)}
</div>
</Dialog>

Expand Down
22 changes: 12 additions & 10 deletions packages/neuron-ui/src/components/DataSetting/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,18 @@ const DataSetting = () => {
<>
<div className={styles.root}>
<div className={styles.leftContainer}>
<div className={styles.label}>
<div>{t('settings.data.ckb-node-data')}</div>
<Tooltip
placement="top"
tip={<p className={styles.tooltip}>{t('settings.data.disabled-set-path')}</p>}
showTriangle
>
<AttentionOutline />
</Tooltip>
</div>
{isLightClient ? null : (
<div className={styles.label}>
<div>{t('settings.data.ckb-node-data')}</div>
<Tooltip
placement="top"
tip={<p className={styles.tooltip}>{t('settings.data.disabled-set-path')}</p>}
showTriangle
>
<AttentionOutline />
</Tooltip>
</div>
)}
<div className={styles.label}>
<div>{t('settings.data.cache')}</div>
<Tooltip
Expand Down
1 change: 1 addition & 0 deletions packages/neuron-ui/src/styles/mixin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@
opacity: 0.5;
}
input[type='checkbox']:disabled + span {
cursor: not-allowed;
background: url('../widgets/Icons/CheckboxDisabled.svg') no-repeat left top;

@media (prefers-color-scheme: dark) {
Expand Down
8 changes: 8 additions & 0 deletions packages/neuron-ui/src/widgets/Tooltip/tooltip.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,21 @@
&#{$class} {
left: 0;
bottom: 100%;
margin-bottom: 10px;
}
.triangle {
bottom: 0;
}
}

&[data-placement='top'][data-placement-center='true'] {
&#{$class} {
left: 50%;
transform: translateX(-50%);
margin-bottom: 10px;
}
.triangle {
bottom: 0;
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion packages/neuron-wallet/src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ export default {
'sudt-acp-have-data': 'The destroying sUDT acp account have amount',
'no-match-address-for-sign': 'Not found matched address',
'target-lock-error': 'CKB asset account can only transfer to sepe256k1 or acp address',
'no-exist-ckb-node-data': '{{path}} has no CKB Node config and storage, press ok to synchronize from scratch',
'no-exist-ckb-node-data':
'{{path}} has no CKB Node config and storage, press confirm to synchronize from scratch',
'light-client-sudt-acp-error': "Light client mode doesn't support sending assets to other's asset account",
},
messageBox: {
Expand Down

0 comments on commit 3edf8bb

Please sign in to comment.