Add theme URL param and adjust cpd theme based on it.

Signed-off-by: Timo K <toger5@hotmail.de>
This commit is contained in:
Timo K
2024-02-21 21:41:40 +01:00
parent 11457da794
commit f613b17824
5 changed files with 80 additions and 46 deletions

View File

@@ -130,6 +130,11 @@ export interface UrlParams {
* This is useful for video rooms.
*/
returnToLobby: boolean;
/**
* The theme to use for element call.
* can be "light", "dark", "light-hc" or "dark-hc".
*/
theme: string | null;
}
// This is here as a stopgap, but what would be far nicer is a function that
@@ -229,6 +234,7 @@ export const getUrlParams = (
perParticipantE2EE: parser.getFlagParam("perParticipantE2EE"),
skipLobby: parser.getFlagParam("skipLobby"),
returnToLobby: parser.getFlagParam("returnToLobby"),
theme: parser.getParam("theme"),
};
};