diff --git a/api/src/graphql/generated/client/gql.ts b/api/src/graphql/generated/client/gql.ts index b6b97e517..7ff96c0d5 100644 --- a/api/src/graphql/generated/client/gql.ts +++ b/api/src/graphql/generated/client/gql.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import * as types from './graphql.js'; import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; diff --git a/api/src/graphql/generated/client/validators.ts b/api/src/graphql/generated/client/validators.ts index c38bc5588..4bb0c65ba 100644 --- a/api/src/graphql/generated/client/validators.ts +++ b/api/src/graphql/generated/client/validators.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { z } from 'zod' import { AccessUrlInput, ArrayCapacityBytesInput, ArrayCapacityInput, ClientType, ConfigErrorState, DashboardAppsInput, DashboardArrayInput, DashboardCaseInput, DashboardConfigInput, DashboardDisplayInput, DashboardInput, DashboardOsInput, DashboardServiceInput, DashboardServiceUptimeInput, DashboardTwoFactorInput, DashboardTwoFactorLocalInput, DashboardTwoFactorRemoteInput, DashboardVarsInput, DashboardVersionsInput, DashboardVmsInput, EventType, Importance, NetworkInput, NotificationInput, NotificationStatus, PingEventSource, RegistrationState, RemoteAccessEventActionType, RemoteAccessInput, RemoteGraphQLClientInput, RemoteGraphQLEventType, RemoteGraphQLServerInput, ServerStatus, URL_TYPE, UpdateType } from '@app/graphql/generated/client/graphql' diff --git a/api/src/unraid-api/graph/resolvers/notifications/notifications.resolver.spec.ts b/api/src/unraid-api/graph/resolvers/notifications/notifications.resolver.spec.ts deleted file mode 100644 index d64e56a75..000000000 --- a/api/src/unraid-api/graph/resolvers/notifications/notifications.resolver.spec.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Test, type TestingModule } from '@nestjs/testing'; -import { NotificationsResolver } from './notifications.resolver'; - -describe('NotificationsResolver', () => { - let resolver: NotificationsResolver; - - beforeEach(async () => { - const module: TestingModule = await Test.createTestingModule({ - providers: [NotificationsResolver], - }).compile(); - - resolver = module.get(NotificationsResolver); - }); - - it('should be defined', () => { - expect(resolver).toBeDefined(); - }); -}); diff --git a/api/src/unraid-api/graph/resolvers/notifications/notifications.resolver.ts b/api/src/unraid-api/graph/resolvers/notifications/notifications.resolver.ts index d20f65d05..76bf7c111 100644 --- a/api/src/unraid-api/graph/resolvers/notifications/notifications.resolver.ts +++ b/api/src/unraid-api/graph/resolvers/notifications/notifications.resolver.ts @@ -11,10 +11,11 @@ import { NotificationsService } from './notifications.service'; import { Importance } from '@app/graphql/generated/client/graphql'; import { AppError } from '@app/core/errors/app-error'; import { formatTimestamp } from '@app/utils'; +import {Inject} from "@nestjs/common"; @Resolver('Notifications') export class NotificationsResolver { - constructor(readonly notificationsService: NotificationsService) {} + constructor(@Inject('NOTIFICATIONS_SERVICE') readonly notificationsService: NotificationsService) {} /**============================================ * Queries diff --git a/api/src/unraid-api/graph/resolvers/resolvers.module.ts b/api/src/unraid-api/graph/resolvers/resolvers.module.ts index 6d7eec31f..f3651fd07 100644 --- a/api/src/unraid-api/graph/resolvers/resolvers.module.ts +++ b/api/src/unraid-api/graph/resolvers/resolvers.module.ts @@ -33,7 +33,7 @@ import { NotificationsService } from './notifications/notifications.service'; ServerResolver, VarsResolver, VmsResolver, - NotificationsService, + { provide: 'NOTIFICATIONS_SERVICE', useClass: NotificationsService }, ], }) export class ResolversModule {} diff --git a/web/components/Notifications/Indicator.vue b/web/components/Notifications/Indicator.vue new file mode 100644 index 000000000..8178f567a --- /dev/null +++ b/web/components/Notifications/Indicator.vue @@ -0,0 +1,98 @@ + + + diff --git a/web/components/Notifications/Sidebar.vue b/web/components/Notifications/Sidebar.vue index 6a044270b..08aed5af2 100644 --- a/web/components/Notifications/Sidebar.vue +++ b/web/components/Notifications/Sidebar.vue @@ -1,5 +1,4 @@