Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: open nft media in browser (#5359)
* enhancement: move open url in browser into own function * enhancement: add confirmation popup * chore: add localization to external url popup * fix: fix condition for blacklist * fix: fix url validation * chore: remove blacklist from electron + locale fixase * feat: open nft media in browser * enhancment: rewrite ipfs/http protocol into https * fix: disable instead of hiding menu options on nft details menu Co-authored-by: Nicole O'Brien <nicole.obrien@iota.org>
- Loading branch information
1 parent
be3cff4
commit 4163211
Showing
8 changed files
with
54 additions
and
10 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
packages/desktop/views/dashboard/collectibles/Collectibles.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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<script lang="ts"> | ||
import { collectiblesRoute, CollectiblesRoute } from '@core/router' | ||
import { DetailsView, GalleryView } from './views' | ||
import { NftDetailsView, GalleryView } from './views' | ||
</script> | ||
|
||
<div class="w-full h-full flex flex-col flex-nowrap p-8 relative flex-1 bg-gray-50 dark:bg-gray-900"> | ||
{#if $collectiblesRoute === CollectiblesRoute.Gallery} | ||
<GalleryView /> | ||
{/if} | ||
{#if $collectiblesRoute === CollectiblesRoute.Details} | ||
<DetailsView /> | ||
<NftDetailsView /> | ||
{/if} | ||
</div> |
File renamed without changes.
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,2 @@ | ||
export { default as DetailsView } from './DetailsView.svelte' | ||
export { default as NftDetailsView } from './NftDetailsView.svelte' | ||
export { default as GalleryView } from './GalleryView.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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from './buildNftFromNftOutput' | ||
export * from './getIsSpendableFromUnspentNftOutput' | ||
export * from './parseNftMetadata' | ||
export * from './rewriteIpfsUri' |
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 @@ | ||
export function rewriteIpfsUri(ipfsUri: string): string { | ||
const url = new URL(ipfsUri) | ||
|
||
return 'https://ipfs.io/ipfs/' + url.pathname.replace('//', '') | ||
} |
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