diff --git a/packages/web/src/stores.ts b/packages/web/src/stores.ts index 78d051184..d422956ec 100644 --- a/packages/web/src/stores.ts +++ b/packages/web/src/stores.ts @@ -228,6 +228,12 @@ currentTheme.subscribe(value => { }); export const getCurrentTheme = () => currentThemeValue; +let extensionsValue: ExtensionsDirectory = null; +extensions.subscribe(value => { + extensionsValue = value; +}); +export const getExtensions = () => extensionsValue; + export const currentThemeDefinition = derived( [currentTheme, extensions, systemThemeStore], ([$currentTheme, $extensions, $systemTheme]) => { @@ -239,7 +245,9 @@ currentThemeDefinition.subscribe(value => { if (value?.themeType && getCurrentTheme()) { localStorage.setItem('currentThemeType', value?.themeType); } else { - localStorage.removeItem('currentThemeType'); + if (extensionsValue?.themes?.length > 0) { + localStorage.removeItem('currentThemeType'); + } } }); export const openedConnectionsWithTemporary = derived( @@ -388,12 +396,6 @@ export const getCurrentDatabase = () => currentDatabaseValue; let currentSettingsValue = null; export const getCurrentSettings = () => currentSettingsValue || {}; -let extensionsValue: ExtensionsDirectory = null; -extensions.subscribe(value => { - extensionsValue = value; -}); -export const getExtensions = () => extensionsValue; - let openedConnectionsValue = null; openedConnections.subscribe(value => { openedConnectionsValue = value; diff --git a/packages/web/src/widgets/SpecialPageLayout.svelte b/packages/web/src/widgets/SpecialPageLayout.svelte index 71534d19b..e57700961 100644 --- a/packages/web/src/widgets/SpecialPageLayout.svelte +++ b/packages/web/src/widgets/SpecialPageLayout.svelte @@ -3,6 +3,8 @@ import { getConfig } from '../utility/metadataLoaders'; import { handleAuthOnStartup } from '../clientAuth'; import { setConfigForPermissions } from '../utility/hasPermission'; + import { visibleTitleBar } from '../stores'; + import TitleBar from './TitleBar.svelte'; async function loadApi() { try { @@ -21,10 +23,22 @@ loadApi(); }); + + const isDark = + localStorage.getItem('currentThemeType') === 'dark' || + (!localStorage.getItem('currentThemeType') && + window.matchMedia && + window.matchMedia('(prefers-color-scheme: dark)').matches); -
@@ -59,6 +73,10 @@
text-transform: uppercase;
}
+ .text.visibleTitleBar {
+ top: calc(var(--dim-titlebar-height) + 1rem);
+ }
+
.root {
color: var(--theme-font-1);
display: flex;
@@ -98,4 +116,12 @@
flex-wrap: wrap;
width: 600px;
}
+
+ .titlebar {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ height: var(--dim-titlebar-height);
+ }
diff --git a/packages/web/src/widgets/TitleBar.svelte b/packages/web/src/widgets/TitleBar.svelte
index 37c1c30c9..5e779422e 100644
--- a/packages/web/src/widgets/TitleBar.svelte
+++ b/packages/web/src/widgets/TitleBar.svelte
@@ -10,9 +10,8 @@
import { apiOn } from '../utility/api';
import { isProApp } from '../utility/proTools';
- $: title = _.compact([$activeTab?.title, $currentDatabase?.name, isProApp() ? 'DbGate Premium' : 'DbGate']).join(
- ' - '
- );
+ $: appName = isProApp() ? 'DbGate Premium' : 'DbGate Community';
+ $: title = _.compact([$activeTab?.title, $currentDatabase?.name, appName]).join(' - ');
const electron = getElectron();
let isMaximized = false;
@@ -27,11 +26,13 @@