2022-04-26 09:10:07 +03:00
|
|
|
export interface ClientConfig {
|
|
|
|
name: string;
|
2022-05-12 09:31:31 +03:00
|
|
|
title?: string;
|
2022-04-26 09:10:07 +03:00
|
|
|
summary: string;
|
2022-08-10 08:09:43 +03:00
|
|
|
offlineMessage?: string;
|
2022-04-26 09:10:07 +03:00
|
|
|
logo: string;
|
|
|
|
tags: string[];
|
|
|
|
version: string;
|
|
|
|
nsfw: boolean;
|
|
|
|
extraPageContent: string;
|
|
|
|
socialHandles: SocialHandle[];
|
|
|
|
chatDisabled: boolean;
|
|
|
|
externalActions: any[];
|
|
|
|
customStyles: string;
|
|
|
|
maxSocketPayloadSize: number;
|
|
|
|
federation: Federation;
|
|
|
|
notifications: Notifications;
|
|
|
|
authentication: Authentication;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface Authentication {
|
|
|
|
indieAuthEnabled: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface Federation {
|
|
|
|
enabled: boolean;
|
|
|
|
account: string;
|
|
|
|
followerCount: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface Notifications {
|
|
|
|
browser: Browser;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface Browser {
|
|
|
|
enabled: boolean;
|
|
|
|
publicKey: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface SocialHandle {
|
|
|
|
platform: string;
|
|
|
|
url: string;
|
|
|
|
icon: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export function makeEmptyClientConfig(): ClientConfig {
|
|
|
|
return {
|
|
|
|
name: '',
|
|
|
|
summary: '',
|
2022-08-10 08:09:43 +03:00
|
|
|
offlineMessage: '',
|
2022-04-26 09:10:07 +03:00
|
|
|
logo: '',
|
|
|
|
tags: [],
|
|
|
|
version: '',
|
|
|
|
nsfw: false,
|
|
|
|
extraPageContent: '',
|
|
|
|
socialHandles: [],
|
|
|
|
chatDisabled: false,
|
|
|
|
externalActions: [],
|
|
|
|
customStyles: '',
|
|
|
|
maxSocketPayloadSize: 0,
|
|
|
|
federation: {
|
|
|
|
enabled: false,
|
|
|
|
account: '',
|
|
|
|
followerCount: 0,
|
|
|
|
},
|
|
|
|
notifications: {
|
|
|
|
browser: {
|
|
|
|
enabled: false,
|
|
|
|
publicKey: '',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
authentication: {
|
|
|
|
indieAuthEnabled: false,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
}
|