/
vshmidt
/
cloudbeaver
Обзор
Документация
Войти
/
vshmidt
/
cloudbeaver
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
devel
webapp/packages/plugin-settings-menu/src/PluginBootstrap.ts
34 строки
1 KB
Alexey Potsetsuev
dbeaver/pro#6847 fix: elements order (#3729)
12 сен 2025, 18:21
Не верифицирован
12 сен 2025, 18:21
b733f39
Код
Авторство
О чём код?
/* * CloudBeaver - Cloud Database Manager * Copyright (C) 2020-2025 DBeaver Corp and others * * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { menuExtractItems, MenuService } from '@cloudbeaver/core-view'; import { MENU_APP_STATE } from '@cloudbeaver/plugin-top-app-bar'; import { TOP_NAV_BAR_SETTINGS_MENU } from './SettingsMenu/TOP_NAV_BAR_SETTINGS_MENU.js'; @injectable(() => [MenuService]) export class PluginBootstrap extends Bootstrap { constructor(private readonly menuService: MenuService) { super(); } override register(): void { this.addTopAppMenuItems(); } private addTopAppMenuItems() { this.menuService.addCreator({ menus: [MENU_APP_STATE], getItems: (context, items) => [...items, TOP_NAV_BAR_SETTINGS_MENU], orderItems: (context, items) => { items.push(...menuExtractItems(items, [TOP_NAV_BAR_SETTINGS_MENU])); return items; }, }); } }