-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into 2374-nest-isc-chains-in-stardust-class
- Loading branch information
Showing
14 changed files
with
159 additions
and
46 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
13 changes: 13 additions & 0 deletions
13
packages/desktop/views/dashboard/collectibles/components/CollectiblesTabs.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,13 @@ | ||
<script lang="ts"> | ||
import { Tabs } from '@bloomwalletio/ui' | ||
import { COLLECTIBLES_TABS } from '@core/nfts' | ||
import { selectedCollectiblesTab } from '@core/nfts/stores' | ||
const selectedIndex = COLLECTIBLES_TABS.findIndex((tab) => tab.key === $selectedCollectiblesTab?.key) | ||
</script> | ||
|
||
{#if COLLECTIBLES_TABS.length > 1} | ||
<div class="w-64"> | ||
<Tabs {selectedIndex} bind:selectedTab={$selectedCollectiblesTab} tabs={COLLECTIBLES_TABS} /> | ||
</div> | ||
{/if} |
3 changes: 2 additions & 1 deletion
3
packages/desktop/views/dashboard/collectibles/components/index.ts
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export { default as Irc27CollectibleDetails } from './Irc27CollectibleDetails.svelte' | ||
export { default as CollectiblesTabs } from './CollectiblesTabs.svelte' | ||
export { default as Erc721CollectibleDetails } from './Erc721CollectibleDetails.svelte' | ||
export { default as Irc27CollectibleDetails } from './Irc27CollectibleDetails.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
73 changes: 73 additions & 0 deletions
73
packages/desktop/views/dashboard/collectibles/views/CollectionsGalleryView.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,73 @@ | ||
<script lang="ts"> | ||
import { Button, IconName, Pill, Text } from '@bloomwalletio/ui' | ||
import { CollectiblesListMenu, EmptyListPlaceholder } from '@components' | ||
import { Filter } from '@components/filter' | ||
import { localize } from '@core/i18n' | ||
import { PopupId, openPopup } from '@desktop/auxiliary/popup' | ||
import features from '@features/features' | ||
import { SearchInput } from '@ui' | ||
import { writable } from 'svelte/store' | ||
import { CollectiblesTabs } from '../components' | ||
function onReceiveClick(): void { | ||
openPopup({ | ||
id: PopupId.ReceiveAddress, | ||
}) | ||
} | ||
// MOCKS | ||
const collections: { name: string }[] = [] | ||
let collectionSearchTerm = '' | ||
const collectionFilter = writable(undefined) | ||
const ownedCollections = collections | ||
let queriedCollections: typeof collections = [] | ||
$: collectionSearchTerm, | ||
$collectionFilter, | ||
(queriedCollections = ownedCollections | ||
.filter((collection) => collection) | ||
.sort((collection1, collection2) => | ||
collection1.name.toLowerCase().localeCompare(collection2.name.toLowerCase()) | ||
)) | ||
</script> | ||
|
||
<collections-gallery-view class="flex flex-col w-full h-full gap-4"> | ||
<header class="flex flex-row items-center justify-between"> | ||
<div class="flex flex-row text-left gap-2 items-center flex-1"> | ||
<Text type="h6">{localize('views.collectibles.collectionsGallery.title')}</Text> | ||
<Pill color="neutral"> | ||
<Text textColor="secondary">{String(queriedCollections.length ?? '')}</Text> | ||
</Pill> | ||
</div> | ||
<CollectiblesTabs /> | ||
<div class="flex justify-end items-center gap-5 h-10 shrink-0 flex-1"> | ||
{#if collections.length} | ||
<SearchInput bind:value={collectionSearchTerm} /> | ||
<Filter filterStore={collectionFilter} /> | ||
{/if} | ||
{#if features.collectibles.erc721.enabled} | ||
<CollectiblesListMenu /> | ||
{/if} | ||
</div> | ||
</header> | ||
{#if collections.length} | ||
{#if queriedCollections.length} | ||
<!-- <CollectionsGallery collections={queriedCollections} /> --> | ||
{:else} | ||
<div class="w-full h-full flex flex-col items-center justify-center"> | ||
<EmptyListPlaceholder | ||
title={localize('views.collectibles.collectionsGallery.noResults')} | ||
icon={IconName.Data} | ||
/> | ||
</div> | ||
{/if} | ||
{:else} | ||
<div class="w-full h-full flex flex-col items-center justify-center grow-1 gap-6"> | ||
<EmptyListPlaceholder | ||
title={localize('views.collectibles.collectionsGallery.emptyTitle')} | ||
subtitle={localize('views.collectibles.collectionsGallery.emptyDescription')} | ||
icon={IconName.Data} | ||
/> | ||
<Button text={localize('actions.getStarted')} on:click={onReceiveClick} /> | ||
</div> | ||
{/if} | ||
</collections-gallery-view> |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export { default as CollectiblesDetailsView } from './CollectiblesDetailsView.svelte' | ||
export { default as CollectiblesGalleryView } from './CollectiblesGalleryView.svelte' | ||
export { default as CollectionsGalleryView } from './CollectionsGalleryView.svelte' |
7 changes: 7 additions & 0 deletions
7
packages/shared/src/lib/core/nfts/constants/collectibles-tabs.constant.ts
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,7 @@ | ||
import { KeyValue } from '@ui' | ||
import features from '@features/features' | ||
|
||
export const COLLECTIBLES_TABS: KeyValue<string>[] = [ | ||
{ key: 'collectibles', value: 'Collectibles' }, | ||
...(features.collectibles?.collections.enabled ? [{ key: 'collections', value: 'Collections' }] : []), | ||
] |
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
5 changes: 5 additions & 0 deletions
5
packages/shared/src/lib/core/nfts/stores/selected-collectibles-tabs.store.ts
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,5 @@ | ||
import { KeyValue } from '@ui' | ||
import { Writable, writable } from 'svelte/store' | ||
import { COLLECTIBLES_TABS } from '../constants' | ||
|
||
export const selectedCollectiblesTab: Writable<KeyValue<string>> = writable(COLLECTIBLES_TABS[0]) |
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