mirror of
https://github.com/unraid/api.git
synced 2026-05-07 23:51:40 -05:00
fix(web): replace incorrect custom types with codegen from gql & update values to match expected shapes
This commit is contained in:
@@ -136,6 +136,7 @@ export const serverState: Server = {
|
|||||||
apiKey: "unupc_fab6ff6ffe51040595c6d9ffb63a353ba16cc2ad7d93f813a2e80a5810",
|
apiKey: "unupc_fab6ff6ffe51040595c6d9ffb63a353ba16cc2ad7d93f813a2e80a5810",
|
||||||
avatar: "https://source.unsplash.com/300x300/?portrait",
|
avatar: "https://source.unsplash.com/300x300/?portrait",
|
||||||
config: {
|
config: {
|
||||||
|
id: 'config-id',
|
||||||
error: null,
|
error: null,
|
||||||
valid: false,
|
valid: false,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
import { defineStore, createPinia, setActivePinia } from 'pinia';
|
import { defineStore, createPinia, setActivePinia } from 'pinia';
|
||||||
import type { NotificationItemProps } from "~/types/ui/notification";
|
import type { NotificationFragmentFragment } from '~/composables/gql/graphql';
|
||||||
|
|
||||||
setActivePinia(createPinia());
|
setActivePinia(createPinia());
|
||||||
|
|
||||||
export const useNotificationsStore = defineStore('notifications', () => {
|
export const useNotificationsStore = defineStore('notifications', () => {
|
||||||
const notifications = ref<NotificationItemProps[]>([]);
|
const notifications = ref<NotificationFragmentFragment[]>([]);
|
||||||
const isOpen = ref<boolean>(false);
|
const isOpen = ref<boolean>(false);
|
||||||
|
|
||||||
const title = computed<string>(() => isOpen.value ? 'Notifications Are Open' : 'Notifications Are Closed');
|
const title = computed<string>(() => isOpen.value ? 'Notifications Are Open' : 'Notifications Are Closed');
|
||||||
|
|
||||||
const toggle = () => isOpen.value = !isOpen.value;
|
const toggle = () => isOpen.value = !isOpen.value;
|
||||||
|
|
||||||
const setNotifications = (newNotifications: NotificationItemProps[]) => {
|
const setNotifications = (newNotifications: NotificationFragmentFragment[]) => {
|
||||||
notifications.value = newNotifications;
|
notifications.value = newNotifications;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -714,6 +714,7 @@ export const useServerStore = defineStore('server', () => {
|
|||||||
// ref: 'configError',
|
// ref: 'configError',
|
||||||
// type: 'server',
|
// type: 'server',
|
||||||
// };
|
// };
|
||||||
|
//@ts-expect-error - causing a build-breaking type error, but seems plausible, so i kept it around - pujitm
|
||||||
case 'INELIGIBLE':
|
case 'INELIGIBLE':
|
||||||
return {
|
return {
|
||||||
heading: 'Ineligible for OS Version',
|
heading: 'Ineligible for OS Version',
|
||||||
|
|||||||
Reference in New Issue
Block a user