Skip to content

Commit ed26254

Browse files
committed
test: rm failing notifications.resolver test stub
1 parent 0382154 commit ed26254

File tree

4 files changed

+10
-33
lines changed

4 files changed

+10
-33
lines changed

api/src/graphql/generated/client/gql.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable */
12
import * as types from './graphql.js';
23
import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
34

api/src/graphql/generated/client/validators.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable */
12
import { z } from 'zod'
23
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'
34

api/src/unraid-api/graph/resolvers/notifications/notifications.resolver.spec.ts

Lines changed: 0 additions & 18 deletions
This file was deleted.

web/components/Notifications/Indicator.vue

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,26 @@
11
<script setup lang="ts">
22
import { useQuery } from "@vue/apollo-composable";
3-
import {
4-
NOTIFICATION_COUNT_FRAGMENT,
5-
unreadOverview,
6-
} from "./graphql/notification.query";
7-
import { useFragment } from "~/composables/gql";
3+
import { unreadOverview } from "./graphql/notification.query";
84
import { Importance } from "~/composables/gql/graphql";
95
import {
106
BellIcon,
117
ExclamationTriangleIcon,
128
ShieldExclamationIcon,
139
} from "@heroicons/vue/24/solid";
1410
import { cn } from "../shadcn/utils";
15-
// const { result } = useSubscription(unreadsSubscription);
1611
1712
const { result } = useQuery(unreadOverview, null, {
1813
pollInterval: 1_000, // 1 second
1914
});
2015
2116
const overview = computed(() => {
2217
if (!result.value) {
23-
// console.log("no overview:", result.value);
2418
return;
2519
}
26-
// console.log("overview", result.value);
2720
return result.value.notifications.overview.unread;
2821
});
2922
30-
const indicatorState = computed(() => {
23+
const indicatorLevel = computed(() => {
3124
if (!overview.value) {
3225
return undefined;
3326
}
@@ -44,7 +37,7 @@ const indicatorState = computed(() => {
4437
});
4538
4639
const icon = computed<{ component: Component; color: string } | null>(() => {
47-
switch (indicatorState.value) {
40+
switch (indicatorLevel.value) {
4841
case Importance.Warning:
4942
return {
5043
component: ExclamationTriangleIcon,
@@ -65,17 +58,17 @@ const icon = computed<{ component: Component; color: string } | null>(() => {
6558
<div class="relative">
6659
<BellIcon class="w-6 h-6" />
6760
<div
68-
v-if="indicatorState"
61+
v-if="indicatorLevel"
6962
:class="
7063
cn('absolute top-0 right-0 size-2.5 rounded-full', {
71-
'bg-unraid-red': indicatorState === Importance.Alert,
72-
'bg-yellow-500': indicatorState === Importance.Warning,
73-
'bg-green-500': indicatorState === 'UNREAD',
64+
'bg-unraid-red': indicatorLevel === Importance.Alert,
65+
'bg-yellow-500': indicatorLevel === Importance.Warning,
66+
'bg-green-500': indicatorLevel === 'UNREAD',
7467
})
7568
"
7669
/>
7770
<div
78-
v-if="indicatorState === Importance.Alert"
71+
v-if="indicatorLevel === Importance.Alert"
7972
class="absolute top-0 right-0 size-2.5 rounded-full bg-unraid-red animate-ping"
8073
/>
8174
</div>

0 commit comments

Comments
 (0)