fix: [WIP] update About page types

This commit is contained in:
upsiflu 2025-03-24 10:23:13 +01:00
parent 940e1e7189
commit 8267a3e716
1 changed files with 72 additions and 71 deletions

View File

@ -1,5 +1,6 @@
import type { Module } from 'vuex'
import type { RootState } from '~/store/index'
import type { components } from '~/generated/types'
import axios from 'axios'
import { merge } from 'lodash-es'
@ -11,7 +12,7 @@ export interface State {
frontSettings: FrontendSettings
instanceUrl?: string
knownInstances: string[]
nodeinfo: NodeInfo | null
nodeinfo: components['schemas']['NodeInfo20'] | null
settings: Settings
}
@ -19,76 +20,76 @@ type TotalCount = {
total: number
}
export interface NodeInfo {
version: string;
software: {
name: string;
version: string;
}
protocols: any[];
services?: {
inbound?: string[];
outbound?: string[];
}
openRegistrations: boolean;
usage: {
users: {
total: number;
activeHalfyear: number;
activeMonth: number;
}
}
metadata: {
actorId: string
'private': boolean
shortDescription: string
longDescription: string
rules: string
contactEmail: string
terms: string
nodeName: string
banner: string
defaultUploadQuota: number
content: {
federationEnabled: boolean
anonymousCanListen: boolean
local: {
tracks?: TotalCount
artists?: TotalCount
albums?: TotalCount
hoursOfContent?: number }
}
topMusicCategories: []
topPodcastCategories: []
federation: {
followedInstances: number
followingInstances: number
}
supportedUploadExtensions: string[]
allowList: {
enabled: boolean
domains: string[]
}
reportTypes: {
'type': string
label: string
anonymous: boolean
}[]
funkwhaleSupportMessageEnabled: boolean
instanceSupportMessage: string
endpoints: {
knownNodes?: string
channels?: string
libraries?: string
}
usage: {
favorites: { tracks: TotalCount }
listenings: TotalCount
downloads: TotalCount
}
features:[]
}
}
// export interface NodeInfo {
// version: string;
// software: {
// name: string;
// version: string;
// }
// protocols: any[];
// services?: {
// inbound?: string[];
// outbound?: string[];
// }
// openRegistrations: boolean;
// usage: {
// users: {
// total: number;
// activeHalfyear: number;
// activeMonth: number;
// }
// }
// metadata: {
// actorId: string
// 'private': boolean
// shortDescription: string
// longDescription: string
// rules: string
// contactEmail: string
// terms: string
// nodeName: string
// banner: string
// defaultUploadQuota: number
// content: {
// federationEnabled: boolean
// anonymousCanListen: boolean
// local: {
// tracks?: TotalCount
// artists?: TotalCount
// albums?: TotalCount
// hoursOfContent?: number }
// }
// topMusicCategories: []
// topPodcastCategories: []
// federation: {
// followedInstances: number
// followingInstances: number
// }
// supportedUploadExtensions: string[]
// allowList: {
// enabled: boolean
// domains: string[]
// }
// reportTypes: {
// 'type': string
// label: string
// anonymous: boolean
// }[]
// funkwhaleSupportMessageEnabled: boolean
// instanceSupportMessage: string
// endpoints: {
// knownNodes?: string
// channels?: string
// libraries?: string
// }
// usage: {
// favorites: { tracks: TotalCount }
// listenings: TotalCount
// downloads: TotalCount
// }
// features:[]
// }
// }
interface FrontendSettings {
defaultServerUrl: string