diff --git a/app/components/VersionComponent.vue b/app/components/VersionComponent.vue index d6f2fb3..7ca8785 100644 --- a/app/components/VersionComponent.vue +++ b/app/components/VersionComponent.vue @@ -13,6 +13,10 @@ +
+

Uploaded By

+

{{ version.uploadedBy?.displayName }}

+
diff --git a/app/components/artifact/Artifact.ts b/app/components/artifact/Artifact.ts index 4204971..cdf8f78 100644 --- a/app/components/artifact/Artifact.ts +++ b/app/components/artifact/Artifact.ts @@ -1,5 +1,5 @@ import {MavenApi} from "~/utils/Api"; -import {type EnhancedResponse, useUserStore} from "~/components/users/UserStore"; +import type {User} from "~/components/users/UserStore"; export class Artifact { @@ -18,11 +18,10 @@ export class Artifact static get(onSuccess: (artifacts: Artifact[]) => void) { - MavenApi.create().get>("/artifacts") + MavenApi.create().get("/artifacts") .then((response) => { - useUserStore().add(response.data.users); - onSuccess(response.data.data); + onSuccess(response.data); }); } @@ -53,7 +52,9 @@ export class Version public artifactId: string, public version: string, public jars?: Jar[], - public pom?: Pom + public pom?: Pom, + public snapshot?: boolean, + public uploadedBy?: User ) { } diff --git a/app/components/auth/LoginComponent.vue b/app/components/auth/LoginComponent.vue deleted file mode 100644 index 34e9b93..0000000 --- a/app/components/auth/LoginComponent.vue +++ /dev/null @@ -1,43 +0,0 @@ - - - - - \ No newline at end of file diff --git a/app/components/events/Event.ts b/app/components/events/Event.ts index 8c930c5..9703283 100644 --- a/app/components/events/Event.ts +++ b/app/components/events/Event.ts @@ -1,7 +1,7 @@ import axios from "axios"; import type {Account} from "~/auth/Account"; import {Session} from "~/auth/Session"; -import {type EnhancedResponse, useUserStore} from "~/components/users/UserStore"; +import {type EnhancedResponse, User, useUserStore} from "~/components/users/UserStore"; export class Event { @@ -9,18 +9,17 @@ export class Event public type: EventType, public timestamp: Date, public resource: Resource, - public userId: string + public user: User ) { } static get(onSuccess: (events: Event[]) => void) { - MavenApi.create().get>("/events", {withCredentials: true}) + MavenApi.create().get("/events", {withCredentials: true}) .then((response) => { - useUserStore().add(response.data.users); - onSuccess(response.data.data) + onSuccess(response.data) }); } } @@ -30,7 +29,8 @@ export class Resource constructor( public groupId: string, public artifactId: string, - public version: string + public version: string, + public isSnapshot: boolean ) { } diff --git a/app/components/events/EventComponent.vue b/app/components/events/EventComponent.vue index 9e281f3..b3bd8e6 100644 --- a/app/components/events/EventComponent.vue +++ b/app/components/events/EventComponent.vue @@ -6,9 +6,9 @@ {{ event.resource.groupId }} {{ event.resource.artifactId }} - {{ event.resource.version }} + {{ event.resource.version }}
Release
Snapshot
-

{{useUserStore().get(event.userId)?.displayName}}

+

{{ event.user.displayName }}

{{ Age.calc(event.timestamp) }} @@ -28,5 +28,16 @@ defineProps<{ \ No newline at end of file diff --git a/app/components/ui/table/HeaderCell.vue b/app/components/ui/table/HeaderCell.vue index ce29d0d..7d80f22 100644 --- a/app/components/ui/table/HeaderCell.vue +++ b/app/components/ui/table/HeaderCell.vue @@ -12,7 +12,7 @@ .header { border-bottom: 1px solid #c1c1c1; padding: 0.75rem 1rem; - background-color: #efefef; + background-color: #f3f3f3; } .header, .header * { font-weight: 600;