Skip to content
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 @@ -49,13 +49,18 @@ <h4 id="network-action-name">{{ order.network_app_name_text }}</h4>
<ion-label>{{ t('resultUrl') }}:</ion-label>
</ion-col>
<ion-col class="wrap-text" align="end">
<ion-label (click)="openResultUrl(order.result_url_text)">
<a *ngIf="order.result_url_text !== undefined">
{{ order.result_url_text }}
</a>
<ion-text *ngIf="order.result_url_text === undefined">{{
t('noResultUrlAvailable')
}}</ion-text>
<ion-label
*ngIf="order.result_url_text !== undefined"
(click)="openResultUrl(order.result_url_text)"
>
<a> {{ order.result_url_text }} </a>
</ion-label>

<ion-label
*ngIf="order.result_url_text === undefined"
(click)="openResultUrl(resultUrlFromAssetId(order.asset_id_text))"
>
<a> {{ resultUrlFromAssetId(order.asset_id_text) }} </a>
</ion-label>
</ion-col>
<ion-col size="1"> </ion-col>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { catchError, first, map } from 'rxjs/operators';
import { OrderHistoryService } from '../../../../shared/actions/service/order-history.service';
import { ErrorService } from '../../../../shared/error/error.service';
import { isNonNullable } from '../../../../utils/rx-operators/rx-operators';
import { getAssetProfileForCaptureIframe } from '../../../../utils/url';

const { Browser, Clipboard } = Plugins;
@UntilDestroy({ checkProperties: true })
Expand Down Expand Up @@ -42,13 +43,15 @@ export class NetworkActionOrderDetailsPage {
// eslint-disable-next-line class-methods-use-this
openResultUrl(url: string) {
if (url) {
Browser.open({
url: `${url}`,
toolbarColor: '#564dfc',
});
Browser.open({ url, toolbarColor: '#000000' });
}
}

// eslint-disable-next-line class-methods-use-this
resultUrlFromAssetId(assetId: string) {
return getAssetProfileForCaptureIframe(assetId);
}

async copyToClipboard(value: string) {
await Clipboard.write({ string: value });
this.snackBar.open(
Expand Down
5 changes: 5 additions & 0 deletions src/app/utils/url.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { BUBBLE_IFRAME_URL } from '../shared/dia-backend/secret';
import { urlToDownloadApp } from './constants';
import { MimeType } from './mime-type';

Expand All @@ -19,6 +20,10 @@ export function getAssetProfileForNSE(id: string, token?: string) {
return `https://nftsearch.site/asset-profile?cid=${id}`;
}

export function getAssetProfileForCaptureIframe(cid: string) {
return `${BUBBLE_IFRAME_URL}/asset_page?nid=${cid}`;
}

export function getAppDownloadLink(isPlatform: (platformName: any) => boolean) {
if (isPlatform('ios'))
return 'https://apps.apple.com/en/app/capture-app/id1536388009';
Expand Down