Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit 4a0a965

Browse files
authored
Merge branch 'hs/branding-module-extension' into hs/branding-module-extension+favicon
2 parents a7ebf2e + a88b9ea commit 4a0a965

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed

src/lifecycles/BrandingExtensions.ts

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,32 @@
11
interface AppTitleBase {
2+
/**
3+
* The configured brand name.
4+
* @example Element
5+
*/
26
brand: string;
7+
/**
8+
* Is the client sync loop in an error state.
9+
*/
310
syncError: boolean;
11+
/**
12+
* The current unread notification count.
13+
*/
14+
unreadNotificationCount?: number;
15+
/**
16+
* Has the client muted notifications.
17+
*/
18+
notificationsMuted?: boolean;
419
}
520

621
export interface AppTitleInRoom extends AppTitleBase {
7-
brand: string;
22+
/**
23+
* The room name, may be undefined if the room has no name.
24+
*/
825
roomName?: string;
26+
/**
27+
* The room ID of the room in view.
28+
*/
929
roomId: string;
10-
unreadNotificationCount: number;
11-
notificationsMuted: boolean;
1230
}
1331

1432
export interface GetFaviconParameters {
@@ -27,6 +45,11 @@ export interface GetFaviconParameters {
2745
export type AppTitleContext = AppTitleBase | AppTitleInRoom;
2846

2947
export interface ProvideBrandingExtensions {
48+
/**
49+
* Called whenever the client would update the document title.
50+
* @param context Current application context used to generate the title.
51+
* @returns A string to be used for the full title, or null to use the default title.
52+
*/
3053
getAppTitle(context: AppTitleContext): string | null;
3154
/**
3255
* Called when the app needs to generate the basic app favicon.

0 commit comments

Comments
 (0)