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

refactor: Hide wallet switcher #7797

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@
</script>

<svelte:window on:click={onOutsideClick} />
<account-switcher>
<wallet-switcher>
<button type="button" on:click={onButtonClick} class="flex flex-row justify-center items-center space-x-2">
<WalletLabel wallet={$selectedWallet} />
<icon-container class:rotate={isModalOpened}>
<Icon height="18" width="18" icon={IconEnum.ChevronDown} classes="text-gray-800 dark:text-white" />
</icon-container>
</button>
<WalletSwitcherModal bind:modal />
</account-switcher>
</wallet-switcher>

<style lang="scss">
account-switcher {
wallet-switcher {
@apply block relative;
-webkit-app-region: none;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export * from './popups'

export { default as AccountActivity } from './AccountActivity.svelte'
export { default as AccountSummary } from './AccountSummary.svelte'
export { default as AccountSwitcher } from './AccountSwitcher.svelte'
export { default as WalletSwitcher } from './WalletSwitcher.svelte'
export { default as OnboardingLayout } from './OnboardingLayout.svelte'
export { default as Proposals } from './Proposals.svelte'
export { default as ProposalAnswer } from './ProposalAnswer.svelte'
Expand Down
4 changes: 2 additions & 2 deletions packages/desktop/components/popups/Popup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import { clickOutside } from '@core/utils/ui'

// Popups
import AccountSwitcherPopup from './WalletSwitcherPopup.svelte'
import WalletSwitcherPopup from './WalletSwitcherPopup.svelte'
import ActivityDetailsPopup from './ActivityDetailsPopup.svelte'
import AddNodePopup from './AddNodePopup.svelte'
import AddProposalPopup from './AddProposalPopup.svelte'
Expand Down Expand Up @@ -94,7 +94,7 @@
let popupContent

const POPUP_MAP: PopupComponentMap = {
[PopupId.AccountSwitcher]: AccountSwitcherPopup,
[PopupId.WalletSwitcher]: WalletSwitcherPopup,
[PopupId.ActivityDetails]: ActivityDetailsPopup,
[PopupId.AddNode]: AddNodePopup,
[PopupId.AddProposal]: AddProposalPopup,
Expand Down
4 changes: 2 additions & 2 deletions packages/desktop/views/dashboard/TopNavigation.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<script lang="ts">
import { Icon, Text } from '@ui'
import { AccountSwitcher } from '@components'
import { PlatformOption } from '@core/app'
import { platform } from '@core/app/stores'
import { localize } from '@core/i18n'
Expand Down Expand Up @@ -62,7 +61,8 @@
{/if}
</div>

<AccountSwitcher />
<!-- TODO(2.0) We hide the WalletSwitcher for now -->
<!-- <WalletSwitcher /> -->

<div class="right-button flex justify-end" />
</top-navigation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function handleDeepLink(input: string): void {

if (get(visibleActiveWallets).length > 1) {
openPopup({
id: PopupId.AccountSwitcher,
id: PopupId.WalletSwitcher,
overflow: true,
props: {
onConfirm: () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/lib/auxiliary/popup/enums/popup-id.enum.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export enum PopupId {
AccountSwitcher = 'accountSwitcher',
WalletSwitcher = 'WalletSwitcher',
ActivityDetails = 'activityDetails',
AddNode = 'addNode',
AddProposal = 'addProposal',
Expand Down
Loading