-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(frontend): move the Zero Balance trigger in the token list
- Loading branch information
1 parent
ab23de3
commit b3efe14
Showing
5 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/frontend/src/lib/components/tokens/TokensZeroBalanceCheckbox.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<script lang="ts"> | ||
import { Checkbox } from '@dfinity/gix-components'; | ||
import { hideZeroBalances } from '$lib/derived/settings.derived'; | ||
import { i18n } from '$lib/stores/i18n.store'; | ||
import { hideZeroBalancesStore } from '$lib/stores/settings.store'; | ||
let checked: boolean; | ||
$: checked = $hideZeroBalances; | ||
const toggleHide = () => | ||
hideZeroBalancesStore.set({ key: 'hide-zero-balances', value: { enabled: !checked } }); | ||
</script> | ||
|
||
<div style="--checkbox-label-order: 1"> | ||
<Checkbox inputId="checkbox-zero-balance" {checked} on:nnsChange={toggleHide}> | ||
{$i18n.tokens.text.hide_zeros} | ||
</Checkbox> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters