2022-04-26 08:10:07 +02:00
|
|
|
export interface ClientConfig {
|
|
|
|
name: string;
|
2022-05-12 08:31:31 +02:00
|
|
|
title?: string;
|
2022-04-26 08:10:07 +02:00
|
|
|
summary: string;
|
2022-08-10 07:09:43 +02:00
|
|
|
offlineMessage?: string;
|
2022-04-26 08:10:07 +02:00
|
|
|
logo: string;
|
|
|
|
tags: string[];
|
|
|
|
nsfw: boolean;
|
|
|
|
extraPageContent: string;
|
|
|
|
socialHandles: SocialHandle[];
|
|
|
|
chatDisabled: boolean;
|
|
|
|
externalActions: any[];
|
|
|
|
customStyles: string;
|
2022-11-13 05:26:55 +01:00
|
|
|
appearanceVariables: Map<string, string>;
|
2022-04-26 08:10:07 +02:00
|
|
|
maxSocketPayloadSize: number;
|
|
|
|
federation: Federation;
|
|
|
|
notifications: Notifications;
|
|
|
|
authentication: Authentication;
|
2022-10-19 05:40:57 +02:00
|
|
|
socketHostOverride?: string;
|
2022-04-26 08:10:07 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
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 07:09:43 +02:00
|
|
|
offlineMessage: '',
|
2022-04-26 08:10:07 +02:00
|
|
|
logo: '',
|
|
|
|
tags: [],
|
|
|
|
nsfw: false,
|
|
|
|
extraPageContent: '',
|
|
|
|
socialHandles: [],
|
|
|
|
chatDisabled: false,
|
|
|
|
externalActions: [],
|
|
|
|
customStyles: '',
|
2022-11-13 05:26:55 +01:00
|
|
|
appearanceVariables: new Map(),
|
2022-04-26 08:10:07 +02:00
|
|
|
maxSocketPayloadSize: 0,
|
|
|
|
federation: {
|
|
|
|
enabled: false,
|
|
|
|
account: '',
|
|
|
|
followerCount: 0,
|
|
|
|
},
|
|
|
|
notifications: {
|
|
|
|
browser: {
|
|
|
|
enabled: false,
|
|
|
|
publicKey: '',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
authentication: {
|
|
|
|
indieAuthEnabled: false,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
}
|