This repository was archived by the owner on Jan 30, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ interface AppTitleBase {
2+ /**
3+ * The configured brand name.
4+ * @example Element
5+ */
6+ brand : string ;
7+ /**
8+ * Is the client sync loop in an error state.
9+ */
10+ syncError : boolean ;
11+ /**
12+ * The current unread notification count.
13+ */
14+ unreadNotificationCount ?: number ;
15+ /**
16+ * Has the client muted notifications.
17+ */
18+ notificationsMuted ?: boolean ;
19+ }
20+
21+ export interface AppTitleInRoom extends AppTitleBase {
22+ /**
23+ * The room name, may be undefined if the room has no name.
24+ */
25+ roomName ?: string ;
26+ /**
27+ * The room ID of the room in view.
28+ */
29+ roomId : string ;
30+ }
31+
32+ export type AppTitleContext = AppTitleBase | AppTitleInRoom ;
33+
34+ export interface ProvideBrandingExtensions {
35+ /**
36+ * Called whenever the client would update the document title.
37+ * @param context Current application context used to generate the title.
38+ * @returns A string to be used for the full title, or null to use the default title.
39+ */
40+ getAppTitle ( context : AppTitleContext ) : string | null ;
41+ }
42+
43+ export abstract class BrandingExtensionsBase implements ProvideBrandingExtensions {
44+ public getAppTitle ( context : AppTitleContext ) : string | null {
45+ return null ;
46+ }
47+ }
Original file line number Diff line number Diff line change @@ -13,10 +13,12 @@ See the License for the specific language governing permissions and
1313limitations under the License.
1414*/
1515
16+ import { ProvideBrandingExtensions } from "../lifecycles/BrandingExtensions" ;
1617import { ProvideCryptoSetupExtensions } from "../lifecycles/CryptoSetupExtensions" ;
1718import { ProvideExperimentalExtensions } from "../lifecycles/ExperimentalExtensions" ;
1819
1920export type AllExtensions = {
21+ branding ?: ProvideBrandingExtensions ;
2022 cryptoSetup ?: ProvideCryptoSetupExtensions ;
2123 experimental ?: ProvideExperimentalExtensions ;
2224} ;
You can’t perform that action at this time.
0 commit comments