mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add support for custom menu links in config.json
This commit is contained in:
parent
fbfc97d0db
commit
2feb124bfc
3 changed files with 44 additions and 2 deletions
|
@ -126,6 +126,18 @@ export function getThemes() {
|
|||
|
||||
export const getDefaultTheme = () => internalDefaultTheme;
|
||||
|
||||
export function getMenuLinks() {
|
||||
return getConfig().then(config => {
|
||||
if (!config.menuLinks) {
|
||||
console.error('web config is invalid, missing menuLinks:', config);
|
||||
}
|
||||
return config.menuLinks || [];
|
||||
}).catch(error => {
|
||||
console.log('cannot get web config:', error);
|
||||
return [];
|
||||
});
|
||||
}
|
||||
|
||||
export function getPlugins() {
|
||||
return getConfig().then(config => {
|
||||
if (!config.plugins) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue