mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-10-28 03:41:48 +08:00
Cb 4629 end user preferences (#2546)
* CB-4629 feat: enable user settings UI * CB-4629 feat: localization * CB-4629 feat: restore default settings * CB-4629 feat: preferences menu * CB-4629 chore: update ts references * CB-4629 user preference store * CB-4629 fix anonymous preferences * CB-4629 nullable annotation * CB-4629 refactor: context menu API * CB-4629 fix: tools panel styles * CB-4629 fix: remove outline for tab list * CB-4629 fix: hide account tab in anonymous mode * CB-4629 anonymous preferences * CB-4629 read anonymous user parameters * CB-4629 fix: zod validation and localization * CB-4629 use websession preference store in completion context * CB-4629 fix: revert tools styles --------- Co-authored-by: Aleksei Potsetsuev <wrouds@gmail.com> Co-authored-by: Evgenia Bezborodova <139753579+EvgeniaBzzz@users.noreply.github.com>
This commit is contained in:
co-authored by
Aleksei Potsetsuev
Evgenia Bezborodova
parent
9051abe90b
commit
3e71a7a6ce
@@ -75,7 +75,7 @@ export class SqlEditorBootstrap extends Bootstrap {
|
||||
this.registerTopAppBarItem();
|
||||
|
||||
this.menuService.addCreator({
|
||||
isApplicable: context => context.has(DATA_CONTEXT_SQL_EDITOR_STATE) && context.has(DATA_CONTEXT_SQL_EDITOR_TAB),
|
||||
contexts: [DATA_CONTEXT_SQL_EDITOR_STATE, DATA_CONTEXT_SQL_EDITOR_TAB],
|
||||
getItems: (context, items) => [...items, ACTION_RENAME],
|
||||
orderItems: (context, items) => {
|
||||
const actions = menuExtractItems(items, [ACTION_RENAME]);
|
||||
@@ -89,11 +89,8 @@ export class SqlEditorBootstrap extends Bootstrap {
|
||||
});
|
||||
|
||||
this.menuService.addCreator({
|
||||
contexts: [DATA_CONTEXT_CONNECTION],
|
||||
isApplicable: context => {
|
||||
if (!context.has(DATA_CONTEXT_CONNECTION)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const node = context.tryGet(DATA_CONTEXT_NAV_NODE);
|
||||
|
||||
if (node && !node.objectFeatures.includes(EObjectFeature.dataSource)) {
|
||||
@@ -203,7 +200,7 @@ export class SqlEditorBootstrap extends Bootstrap {
|
||||
|
||||
this.actionService.addHandler({
|
||||
id: 'sql-editor-new',
|
||||
isActionApplicable: (context, action) => [ACTION_SQL_EDITOR_NEW].includes(action),
|
||||
actions: [ACTION_SQL_EDITOR_NEW],
|
||||
isLabelVisible: () => false,
|
||||
getActionInfo: (context, action) => {
|
||||
const connectionContext = this.getActiveConnectionContext();
|
||||
|
||||
Reference in New Issue
Block a user