favorites & about button in toolbar

This commit is contained in:
Jan Prochazka
2021-03-25 10:53:35 +01:00
parent 50e61cdce1
commit 5f2afc037e
6 changed files with 52 additions and 9 deletions

View File

@@ -3,6 +3,7 @@ import { ExtensionsDirectory } from 'dbgate-types';
import invalidateCommands from './commands/invalidateCommands';
import getElectron from './utility/getElectron';
import { GlobalCommand } from './commands/registerCommand';
import { useConfig } from './utility/metadataLoaders';
interface TabDefinition {
title: string;
@@ -98,3 +99,11 @@ activeTab.subscribe(value => {
activeTabValue = value;
});
export const getActiveTab = () => activeTabValue;
const currentConfigStore = useConfig();
let currentConfigValue = null;
currentConfigStore.subscribe(value => {
currentConfigValue = value;
invalidateCommands();
});
export const getCurrentConfig = () => currentConfigValue;