mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
* CB-3570 add manual save * CB-3451 git settings api * CB-3451 migrate to the new config model * CB-3451 improve locks, update gql * CB-3451 fix RM configuration * CB-3570 resolve conflicts * CB-3451 checkout remote branch * CB-3451 review fix * CB-3451 improve logs/fix private project access * CB-3570 review fixes * CB-3570 remove hasChanges flag * CB-3570 debounce saveProperties --------- Co-authored-by: Aleksandr Skoblikov <aleksandr.skoblikov@dbeaver.com>
30 lines
1.0 KiB
TypeScript
30 lines
1.0 KiB
TypeScript
/*
|
|
* CloudBeaver - Cloud Database Manager
|
|
* Copyright (C) 2020-2023 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: 10 * 1024, // kilobyte
|
|
disabled: false,
|
|
autoSave: true,
|
|
};
|
|
|
|
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.createSettings('sql-editor', 'plugin', defaultSettings);
|
|
this.deprecatedSettings = this.pluginManagerService.getDeprecatedPluginSettings('core.app.sqlEditor', defaultSettings);
|
|
}
|
|
}
|