diff --git a/dev/index.html b/dev/index.html index e446e17..930db90 100644 --- a/dev/index.html +++ b/dev/index.html @@ -85,11 +85,11 @@ diff --git a/src/asset/asset-model.ts b/src/asset/asset-model.ts index 15c2965..c004eaf 100644 --- a/src/asset/asset-model.ts +++ b/src/asset/asset-model.ts @@ -11,6 +11,7 @@ export interface AssetModel { captureTime?: string; captureLocation?: string; backendOwnerName?: string; + digitalSourceType?: string; usedBy?: string; captureEyeCustom?: Array; hasNftProduct?: boolean; diff --git a/src/asset/asset-service.ts b/src/asset/asset-service.ts index 77f27eb..bcc8fe5 100644 --- a/src/asset/asset-service.ts +++ b/src/asset/asset-service.ts @@ -56,6 +56,7 @@ export async function fetchAsset(nid: string): Promise { captureLocation: data.fullAssetTree?.['_api_c2_assetTree.assetLocationCreated'], backendOwnerName: data.backend_owner_name, + digitalSourceType: data.digitalSourceType, usedBy: data.usedBy, captureEyeCustom, }; diff --git a/src/constant.ts b/src/constant.ts index 553cba6..9df6bac 100644 --- a/src/constant.ts +++ b/src/constant.ts @@ -13,6 +13,7 @@ interface Url { blockchainIcon: string; txIcon: string; curatorIcon: string; + generatedViAi: string; defaultEngagementImage: string; defaultEngagementLink: string; } @@ -73,6 +74,7 @@ export const Constant: ConstantType = { blockchainIcon: `${numbersCdnUrl}/capture-eye/capture-eye-blockchain-icon.svg`, txIcon: `${numbersCdnUrl}/capture-eye/capture-eye-tx-icon.svg`, curatorIcon: `${numbersCdnUrl}/capture-eye/capture-eye-curator-icon.png`, + generatedViAi: `${numbersCdnUrl}/capture-eye/generated-via-ai.png`, defaultEngagementImage: `${numbersCdnUrl}/capture-eye/capture-ad.png`, defaultEngagementLink: 'https://captureapp.xyz', }, diff --git a/src/modal/modal-styles.ts b/src/modal/modal-styles.ts index a657301..a54c1c2 100644 --- a/src/modal/modal-styles.ts +++ b/src/modal/modal-styles.ts @@ -130,6 +130,20 @@ export function getModalStyles() { display: block; } + .badge-container { + display: flex; + position: absolute; + top: 16px; + right: 24px; + gap: 4px; + } + + .badge-container img { + width: 32px; + height: 32px; + display: block; + } + .profile-container { display: flex; align-items: center; diff --git a/src/modal/modal.ts b/src/modal/modal.ts index ae56e4c..4b0caa2 100644 --- a/src/modal/modal.ts +++ b/src/modal/modal.ts @@ -216,6 +216,22 @@ export class CaptureEyeModal extends LitElement { return this.layout == Constant.layout.original; } + private renderBadges() { + const generatedViaAi = this._asset?.digitalSourceType === 'trainedAlgorithmicMedia' + ? html`Generated via AI` + : html``; + + return html` +
+ ${generatedViaAi} +
+ `; + } + private renderCreatorOrAssetSourceType() { // Render creator and showcase link if layout is original, otherwise render assetSourceType return this.isOriginal() @@ -497,6 +513,7 @@ export class CaptureEyeModal extends LitElement {