Skip to content

Commit

Permalink
Merge branch 'develop' into 603-show-accountcontact-as-subject-for-l1…
Browse files Browse the repository at this point in the history
…-l2-and-l2-l1
  • Loading branch information
MarkNerdi authored Sep 7, 2023
2 parents 0f7de46 + 5f5c00e commit 355cc0c
Show file tree
Hide file tree
Showing 57 changed files with 443 additions and 1,258 deletions.
4 changes: 2 additions & 2 deletions packages/desktop/components/AccountSummary.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { AccountActionsButton } from '@components'
import { AccountActionsMenu } from '@components'
import { Text, TogglableTokenBalanceLabel } from '@ui'
import { TextType } from '@ui/enums'
import { localize } from '@core/i18n'
Expand All @@ -20,7 +20,7 @@
<Text type={TextType.h5} classes="text-left">
{localize('general.balanceWithNetwork', { values: { network: formattedNetworkName } })}
</Text>
<AccountActionsButton />
<AccountActionsMenu />
</div>
<div class="flex flex-col flex-wrap items-start space-y-1">
<TogglableTokenBalanceLabel token={baseCoin} />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<script lang="ts">
import { Pill } from '@bloomwalletio/ui'
import { localize } from '@core/i18n'
import { INode, getDefaultNodes, isSupportedNetworkId } from '@core/network'
import { activeProfile } from '@core/profile/stores'
import { NodeActionsButton, Text } from '@ui'
import { Pill } from '@bloomwalletio/ui'
import { PopupId, openPopup } from '../../../../desktop/lib/auxiliary/popup'
import { PopupId, openPopup } from '@desktop/auxiliary/popup'
import { Text } from '@ui'
import { NodeActionsMenu } from './menus'
export let nodesContainer: HTMLElement | undefined = undefined
Expand Down Expand Up @@ -57,7 +58,7 @@
</Pill>
{/if}
</div>
<NodeActionsButton {node} {clientOptions} />
<NodeActionsMenu {node} {clientOptions} />
</button>
{/each}
{/if}
Expand Down
1 change: 0 additions & 1 deletion packages/desktop/components/buttons/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export * from './menu-buttons'
export * from './popup-buttons'

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions packages/desktop/components/buttons/menu-buttons/index.js

This file was deleted.

3 changes: 2 additions & 1 deletion packages/desktop/components/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export * from './buttons'
export * from './drawers'
export * from './filter'
export * from './menu-buttons'
export * from './menus'
export * from './modals'
export * from './panes'
export * from './popups'
Expand All @@ -14,6 +14,7 @@ export { default as ContactCard } from './ContactCard.svelte'
export { default as ContactMetadataTable } from './ContactMetadataTable.svelte'
export { default as OnboardingLayout } from './OnboardingLayout.svelte'
export { default as NetworkCard } from './NetworkCard.svelte'
export { default as NodeListTable } from './NodeListTable.svelte'
export { default as Proposals } from './Proposals.svelte'
export { default as ProposalAnswer } from './ProposalAnswer.svelte'
export { default as ProposalCard } from './ProposalCard.svelte'
Expand Down
1 change: 0 additions & 1 deletion packages/desktop/components/menu-buttons/index.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import { deleteAccount } from '@core/profile-manager/actions'
import { activeAccounts, visibleActiveAccounts } from '@core/profile/stores'
import { PopupId, openPopup } from '@desktop/auxiliary/popup'
import { MenuItem, Modal, ToggleHiddenAccountMenuItem } from '@ui'
import { MeatballMenuButton, MenuItem, Modal, ToggleHiddenAccountMenuItem } from '@ui'
export let modal: Modal = undefined
let modal: Modal = undefined
const showDeleteAccount =
$selectedAccount?.index === $activeAccounts?.length - 1 && $visibleActiveAccounts?.length > 1
Expand All @@ -34,19 +34,26 @@
}
</script>

<Modal bind:this={modal} {...$$restProps}>
<account-actions-menu class="flex flex-col">
<MenuItem icon={Icon.Doc} title={localize('actions.viewBalanceBreakdown')} onClick={onViewBalanceClick} />
<MenuItem icon={Icon.Customize} title={localize('actions.customizeAcount')} onClick={onCustomiseAccountClick} />
<ToggleHiddenAccountMenuItem onClick={modal?.close} />
<hr />
{#if showDeleteAccount}
<account-actions-menu class="relative">
<MeatballMenuButton onClick={modal?.toggle} />
<Modal bind:this={modal} {...$$restProps} position={{ right: '0' }}>
<account-actions-menu class="flex flex-col">
<MenuItem icon={Icon.Doc} title={localize('actions.viewBalanceBreakdown')} onClick={onViewBalanceClick} />
<MenuItem
icon={Icon.Delete}
title={localize('actions.deleteAccount')}
onClick={onDeleteAccountClick}
variant="error"
icon={Icon.Customize}
title={localize('actions.customizeAcount')}
onClick={onCustomiseAccountClick}
/>
{/if}
</account-actions-menu>
</Modal>
<ToggleHiddenAccountMenuItem onClick={modal?.close} />
<hr />
{#if showDeleteAccount}
<MenuItem
icon={Icon.Delete}
title={localize('actions.deleteAccount')}
onClick={onDeleteAccountClick}
variant="error"
/>
{/if}
</account-actions-menu>
</Modal>
</account-actions-menu>
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import { activeProfile, updateActiveProfile } from '@core/profile/stores'
import { CollectiblesRoute, collectiblesRouter } from '@core/router'
import { burnNft } from '@core/wallet'
import { MenuItem, Modal } from '@ui'
import { PopupId, closePopup, openPopup } from '../../../../desktop/lib/auxiliary/popup'
import { PopupId, closePopup, openPopup } from '@desktop/auxiliary/popup'
import { MeatballMenuButton, MenuItem, Modal } from '@ui'
export let modal: Modal = undefined
export let nft: INft
Expand Down Expand Up @@ -75,30 +75,33 @@
}
</script>

<Modal bind:this={modal} position={{ top: '100px', right: '60px' }}>
<div class="flex flex-col">
<MenuItem
icon="receive"
title={localize('views.collectibles.details.menu.download')}
disabled={true}
onClick={() => {}}
/>
<MenuItem
icon="profile"
title={localize(`views.collectibles.details.menu.${isCurrentPfp ? 'unsetPfp' : 'setPfp'}`)}
onClick={onSetPfpClick}
/>
<MenuItem
icon="export"
title={localize('views.collectibles.details.menu.view')}
onClick={onOpenMediaClick}
disabled={!url}
/>
<MenuItem
icon="delete"
title={localize('views.collectibles.details.menu.burn')}
onClick={openBurnNft}
disabled={isLocked}
/>
</div>
</Modal>
<collectible-details-menu class="relative">
<MeatballMenuButton onClick={modal?.toggle} />
<Modal bind:this={modal} position={{ right: '0' }}>
<div class="flex flex-col">
<MenuItem
icon="receive"
title={localize('views.collectibles.details.menu.download')}
disabled={true}
onClick={() => {}}
/>
<MenuItem
icon="profile"
title={localize(`views.collectibles.details.menu.${isCurrentPfp ? 'unsetPfp' : 'setPfp'}`)}
onClick={onSetPfpClick}
/>
<MenuItem
icon="export"
title={localize('views.collectibles.details.menu.view')}
onClick={onOpenMediaClick}
disabled={!url}
/>
<MenuItem
icon="delete"
title={localize('views.collectibles.details.menu.burn')}
onClick={openBurnNft}
disabled={isLocked}
/>
</div>
</Modal>
</collectible-details-menu>
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<script lang="ts">
import { MenuItem, Modal } from '@ui'
import { localize } from '@core/i18n'
import {
removeNodeFromClientOptions,
Expand All @@ -10,7 +8,8 @@
import { IClientOptions, INode } from '@core/network/interfaces'
import { getDefaultNodes } from '@core/network/utils'
import { activeProfile } from '@core/profile/stores'
import { closePopup, openPopup, PopupId } from '../../../../desktop/lib/auxiliary/popup'
import { PopupId, closePopup, openPopup } from '@desktop/auxiliary/popup'
import { MeatballMenuButton, MenuItem, Modal } from '@ui'
export let node: INode
export let clientOptions: IClientOptions
Expand Down Expand Up @@ -94,27 +93,30 @@
}
</script>

<Modal bind:this={modal} size="small">
<MenuItem
title={localize('views.settings.configureNodeList.editDetails')}
onClick={onEditNodeDetailsClick}
disabled={isOfficialNode}
/>
<MenuItem
disabled={node?.disabled}
title={localize(`views.settings.configureNodeList.${isPrimary ? 'unsetAsPrimary' : 'setAsPrimary'}`)}
onClick={onTogglePrimaryNodeClick}
/>
<MenuItem
disabled={!allowDisableOrRemove}
title={localize(`views.settings.configureNodeList.${node.disabled ? 'include' : 'exclude'}Node`)}
onClick={onToggleDisabledNodeClick}
/>
<hr />
<MenuItem
disabled={!allowDisableOrRemove}
title={localize('views.settings.configureNodeList.removeNode')}
onClick={onRemoveNodeClick}
variant="error"
/>
</Modal>
<node-actions-menu>
<MeatballMenuButton onClick={modal?.toggle} />
<Modal bind:this={modal} size="small" position={{ right: '210px', absolute: true }}>
<MenuItem
title={localize('views.settings.configureNodeList.editDetails')}
onClick={onEditNodeDetailsClick}
disabled={isOfficialNode}
/>
<MenuItem
disabled={node?.disabled}
title={localize(`views.settings.configureNodeList.${isPrimary ? 'unsetAsPrimary' : 'setAsPrimary'}`)}
onClick={onTogglePrimaryNodeClick}
/>
<MenuItem
disabled={!allowDisableOrRemove}
title={localize(`views.settings.configureNodeList.${node.disabled ? 'include' : 'exclude'}Node`)}
onClick={onToggleDisabledNodeClick}
/>
<hr />
<MenuItem
disabled={!allowDisableOrRemove}
title={localize('views.settings.configureNodeList.removeNode')}
onClick={onRemoveNodeClick}
variant="error"
/>
</Modal>
</node-actions-menu>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { onMount } from 'svelte'
import { Modal, MenuItem, MeatballMenuButton, ModalPosition } from '@ui'
import { Modal, MenuItem, MeatballMenuButton } from '@ui'
import { selectedAccount } from '@core/account/stores'
import { handleError } from '@core/error/handlers'
import { localize } from '@core/i18n'
Expand All @@ -12,7 +12,6 @@
import features from '@features/features'
export let proposal: IProposal
export let modalPosition: ModalPosition | undefined = undefined
let modal: Modal = undefined
let isVotingForProposal: boolean
Expand Down Expand Up @@ -82,11 +81,13 @@
onMount(() => void updateIsVoting())
</script>

<MeatballMenuButton onClick={modal?.toggle} />
<Modal bind:this={modal} position={modalPosition} classes="mt-1.5">
<div class="flex flex-col">
{#each buttons as button}
<MenuItem {...button} />
{/each}
</div>
</Modal>
<proposal-details-menu class="relative">
<MeatballMenuButton onClick={modal?.toggle} />
<Modal bind:this={modal} position={{ right: '0' }}>
<div class="flex flex-col">
{#each buttons as button}
<MenuItem {...button} />
{/each}
</div>
</Modal>
</proposal-details-menu>
Loading

0 comments on commit 355cc0c

Please sign in to comment.