From aa6b146e2d85f487b56b00b26386802f19f8b0f8 Mon Sep 17 00:00:00 2001 From: Zen Voich Date: Mon, 25 Nov 2024 13:15:37 +0400 Subject: [PATCH] [frontend] show package version publisher --- cli/declarations/main/main.did | 5 +++ cli/declarations/main/main.did.d.ts | 5 +++ cli/declarations/main/main.did.js | 5 +++ .../package/PackageVersionSummary.svelte | 12 ++++++ frontend/components/package/UserCard.svelte | 39 ++++++++++++------- frontend/declarations/main/main.did | 5 +++ frontend/declarations/main/main.did.d.ts | 5 +++ frontend/declarations/main/main.did.js | 5 +++ 8 files changed, 67 insertions(+), 14 deletions(-) diff --git a/cli/declarations/main/main.did b/cli/declarations/main/main.did index 06a2e107..5d82914f 100644 --- a/cli/declarations/main/main.did +++ b/cli/declarations/main/main.did @@ -162,6 +162,7 @@ type PackageSummary__1 = ownerInfo: User; owners: vec User; publication: PackagePublication; + publisher: User; quality: PackageQuality; }; type PackageSummaryWithChanges__1 = @@ -178,6 +179,7 @@ type PackageSummaryWithChanges__1 = ownerInfo: User; owners: vec User; publication: PackagePublication; + publisher: User; quality: PackageQuality; }; type PackageSummaryWithChanges = @@ -194,6 +196,7 @@ type PackageSummaryWithChanges = ownerInfo: User; owners: vec User; publication: PackagePublication; + publisher: User; quality: PackageQuality; }; type PackageSummary = @@ -209,6 +212,7 @@ type PackageSummary = ownerInfo: User; owners: vec User; publication: PackagePublication; + publisher: User; quality: PackageQuality; }; type PackageQuality = @@ -256,6 +260,7 @@ type PackageDetails = ownerInfo: User; owners: vec User; publication: PackagePublication; + publisher: User; quality: PackageQuality; testStats: TestStats__1; versionHistory: vec PackageSummaryWithChanges__1; diff --git a/cli/declarations/main/main.did.d.ts b/cli/declarations/main/main.did.d.ts index 30777e9e..79d52110 100644 --- a/cli/declarations/main/main.did.d.ts +++ b/cli/declarations/main/main.did.d.ts @@ -194,6 +194,7 @@ export interface PackageDetails { 'depAlias' : string, 'deps' : Array, 'quality' : PackageQuality, + 'publisher' : User, 'testStats' : TestStats__1, 'highestVersion' : PackageVersion, 'downloadsTotal' : bigint, @@ -237,6 +238,7 @@ export interface PackageSummary { 'owner' : Principal, 'depAlias' : string, 'quality' : PackageQuality, + 'publisher' : User, 'highestVersion' : PackageVersion, 'downloadsTotal' : bigint, 'downloadsInLast30Days' : bigint, @@ -251,6 +253,7 @@ export interface PackageSummaryWithChanges { 'owner' : Principal, 'depAlias' : string, 'quality' : PackageQuality, + 'publisher' : User, 'highestVersion' : PackageVersion, 'downloadsTotal' : bigint, 'downloadsInLast30Days' : bigint, @@ -266,6 +269,7 @@ export interface PackageSummaryWithChanges__1 { 'owner' : Principal, 'depAlias' : string, 'quality' : PackageQuality, + 'publisher' : User, 'highestVersion' : PackageVersion, 'downloadsTotal' : bigint, 'downloadsInLast30Days' : bigint, @@ -281,6 +285,7 @@ export interface PackageSummary__1 { 'owner' : Principal, 'depAlias' : string, 'quality' : PackageQuality, + 'publisher' : User, 'highestVersion' : PackageVersion, 'downloadsTotal' : bigint, 'downloadsInLast30Days' : bigint, diff --git a/cli/declarations/main/main.did.js b/cli/declarations/main/main.did.js index e7089746..7d84cffa 100644 --- a/cli/declarations/main/main.did.js +++ b/cli/declarations/main/main.did.js @@ -96,6 +96,7 @@ export const idlFactory = ({ IDL }) => { 'owner' : IDL.Principal, 'depAlias' : IDL.Text, 'quality' : PackageQuality, + 'publisher' : User, 'highestVersion' : PackageVersion, 'downloadsTotal' : IDL.Nat, 'downloadsInLast30Days' : IDL.Nat, @@ -126,6 +127,7 @@ export const idlFactory = ({ IDL }) => { 'owner' : IDL.Principal, 'depAlias' : IDL.Text, 'quality' : PackageQuality, + 'publisher' : User, 'highestVersion' : PackageVersion, 'downloadsTotal' : IDL.Nat, 'downloadsInLast30Days' : IDL.Nat, @@ -170,6 +172,7 @@ export const idlFactory = ({ IDL }) => { 'owner' : IDL.Principal, 'depAlias' : IDL.Text, 'quality' : PackageQuality, + 'publisher' : User, 'highestVersion' : PackageVersion, 'downloadsTotal' : IDL.Nat, 'downloadsInLast30Days' : IDL.Nat, @@ -187,6 +190,7 @@ export const idlFactory = ({ IDL }) => { 'depAlias' : IDL.Text, 'deps' : IDL.Vec(PackageSummary__1), 'quality' : PackageQuality, + 'publisher' : User, 'testStats' : TestStats__1, 'highestVersion' : PackageVersion, 'downloadsTotal' : IDL.Nat, @@ -209,6 +213,7 @@ export const idlFactory = ({ IDL }) => { 'owner' : IDL.Principal, 'depAlias' : IDL.Text, 'quality' : PackageQuality, + 'publisher' : User, 'highestVersion' : PackageVersion, 'downloadsTotal' : IDL.Nat, 'downloadsInLast30Days' : IDL.Nat, diff --git a/frontend/components/package/PackageVersionSummary.svelte b/frontend/components/package/PackageVersionSummary.svelte index e67c9f34..05dcd5b6 100644 --- a/frontend/components/package/PackageVersionSummary.svelte +++ b/frontend/components/package/PackageVersionSummary.svelte @@ -5,6 +5,7 @@ import {markdownToHtml} from '/logic/markdown-to-html'; import Date from '../Date.svelte'; import PackageBenchmarksDiff from './PackageBenchmarksDiff.svelte'; + import UserCard from './UserCard.svelte'; export let summary : PackageSummaryWithChanges; export let showName = false; @@ -65,6 +66,10 @@ {/if} + +
+ Published by +