mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
* CB-3087 hide private project for special roles * CB-3087 add new permission for private project access * CB-2808 feat: add lm roles list * CB-3070 feat: settings resolver API * CB-3085 add plugins settings * CB-3086 hide scripts for the viewer and editor * CB-3085 hide tools panel * CB-2808 resolve conflict * CB-3085 fix splitter disabled mode * CB-3085 add disabled state to the log viewer settings * CB-3085 mark disabled as computed * CB-2808 hide menu if all sub items are hidden * CB-2808 hide connection's selector if connections are disabled --------- Co-authored-by: Aleksey Potsetsuev <wrouds@gmail.com> Co-authored-by: naumov <iamemptyhuh@gmail.com> Co-authored-by: MarinaVorobeva21 <98399603+MarinaVorobeva21@users.noreply.github.com>
30 lines
1.0 KiB
TypeScript
30 lines
1.0 KiB
TypeScript
/*
|
|
* CloudBeaver - Cloud Database Manager
|
|
* Copyright (C) 2020-2022 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 { injectable } from '@cloudbeaver/core-di';
|
|
import { PluginManagerService, PluginSettings } from '@cloudbeaver/core-plugin';
|
|
|
|
const defaultSettings = {
|
|
maxFileSize: 100, // kilobyte
|
|
disabled: false,
|
|
};
|
|
|
|
export type SqlEditorSettings = typeof defaultSettings;
|
|
|
|
@injectable()
|
|
export class SqlEditorSettingsService {
|
|
readonly settings: PluginSettings<SqlEditorSettings>;
|
|
/** @deprecated Use settings instead, will be removed in 23.0.0 */
|
|
readonly deprecatedSettings: PluginSettings<SqlEditorSettings>;
|
|
|
|
constructor(private readonly pluginManagerService: PluginManagerService) {
|
|
this.settings = this.pluginManagerService.getPluginSettings('sql-editor', defaultSettings);
|
|
this.deprecatedSettings = this.pluginManagerService.getDeprecatedPluginSettings('core.app.sqlEditor', defaultSettings);
|
|
}
|
|
}
|