mirror of
https://github.com/thelounge/thelounge.git
synced 2026-03-14 14:35:50 +01:00
configuration
This commit is contained in:
parent
7bc184b252
commit
8e6920af1d
7 changed files with 112 additions and 120 deletions
|
|
@ -1,53 +1,50 @@
|
|||
const config_example = {
|
||||
public: false,
|
||||
lockNetwork: false,
|
||||
useHexIp: false,
|
||||
prefetch: true,
|
||||
fileUpload: true,
|
||||
ldapEnabled: false,
|
||||
defaults: {
|
||||
name: "test",
|
||||
host: "irc.libera.chat",
|
||||
port: 6697,
|
||||
password: "",
|
||||
tls: true,
|
||||
rejectUnauthorized: true,
|
||||
nick: "butler",
|
||||
username: "",
|
||||
realname: "",
|
||||
join: "#thelounge-test",
|
||||
leaveMessage: "",
|
||||
sasl: "",
|
||||
saslAccount: "",
|
||||
saslPassword: "",
|
||||
},
|
||||
isUpdateAvailable: false,
|
||||
applicationServerKey:
|
||||
"BHcIWSuK8Yt_1nkWqKFcSdLQtuLuZyfegdugXQa_UBv02dOZtDhwEJocb1h8bxOSzLgkNRAAArw8BC126rTuc5Q",
|
||||
version: "4.4.2-rc.1",
|
||||
gitCommit: "1f66dd2af",
|
||||
themes: [
|
||||
{
|
||||
displayName: "Default",
|
||||
name: "default",
|
||||
themeColor: null,
|
||||
},
|
||||
{
|
||||
displayName: "Gruvbox",
|
||||
name: "thelounge-theme-gruvbox",
|
||||
themeColor: "#282828",
|
||||
},
|
||||
{
|
||||
displayName: "Morning",
|
||||
name: "morning",
|
||||
themeColor: null,
|
||||
},
|
||||
{
|
||||
displayName: "Solarized",
|
||||
name: "thelounge-theme-solarized",
|
||||
themeColor: "#002b36",
|
||||
},
|
||||
],
|
||||
defaultTheme: "default",
|
||||
fileUploadMaxFileSize: 10485760,
|
||||
export type ConfigTheme = {
|
||||
displayName: string;
|
||||
name: string;
|
||||
themeColor: string | null;
|
||||
};
|
||||
type SharedConfigurationBase = {
|
||||
public: boolean;
|
||||
useHexIp: boolean;
|
||||
prefetch: boolean;
|
||||
fileUpload: boolean;
|
||||
ldapEnabled: boolean;
|
||||
isUpdateAvailable: boolean;
|
||||
applicationServerKey: string;
|
||||
version: string;
|
||||
gitCommit: string | null;
|
||||
themes: ConfigTheme[];
|
||||
defaultTheme: string;
|
||||
fileUploadMaxFileSize?: number;
|
||||
};
|
||||
|
||||
export type ConfigNetDefaults = {
|
||||
name: string;
|
||||
host: string;
|
||||
port: number;
|
||||
password: string;
|
||||
tls: boolean;
|
||||
rejectUnauthorized: boolean;
|
||||
nick: string;
|
||||
username: string;
|
||||
realname: string;
|
||||
join: string;
|
||||
leaveMessage: string;
|
||||
sasl: string;
|
||||
saslAccount: string;
|
||||
saslPassword: string;
|
||||
};
|
||||
export type LockedConfigNetDefaults = Pick<
|
||||
ConfigNetDefaults,
|
||||
"name" | "nick" | "username" | "password" | "realname" | "join"
|
||||
>;
|
||||
|
||||
export type LockedSharedConfiguration = SharedConfigurationBase & {
|
||||
lockNetwork: true;
|
||||
defaults: LockedConfigNetDefaults;
|
||||
};
|
||||
|
||||
export type SharedConfiguration = SharedConfigurationBase & {
|
||||
lockNetwork: false;
|
||||
defaults: ConfigNetDefaults;
|
||||
};
|
||||
|
|
|
|||
4
shared/types/socket-events.d.ts
vendored
4
shared/types/socket-events.d.ts
vendored
|
|
@ -5,7 +5,7 @@ import {SharedMsg, ClientMessage} from "../../shared/types/msg";
|
|||
import {SharedUser} from "../../shared/types/user";
|
||||
import {SharedChangelogData} from "../../shared/types/changelog";
|
||||
import {LinkPreview} from "../plugins/irc-events/link";
|
||||
import {ClientConfiguration} from "../server";
|
||||
import {SharedConfiguration, LockedSharedConfiguration} from "../../shared/types/config";
|
||||
|
||||
type Session = {
|
||||
current: boolean;
|
||||
|
|
@ -32,7 +32,7 @@ interface ServerToClientEvents {
|
|||
|
||||
commands: (data: string[]) => void;
|
||||
|
||||
configuration: (config: ClientConfiguration) => void;
|
||||
configuration: (config: SharedConfiguration | LockedSharedConfiguration) => void;
|
||||
|
||||
"push:issubscribed": (isSubscribed: boolean) => void;
|
||||
"push:unregister": () => void;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue