app title

This commit is contained in:
Jan Prochazka 2024-09-03 09:45:44 +02:00
parent 416ed14a9d
commit 906ed3d237
3 changed files with 13 additions and 4 deletions

View File

@ -347,7 +347,7 @@ function createWindow() {
mainWindow = new BrowserWindow({
width: 1200,
height: 800,
title: 'DbGate',
title: isProApp() ? 'DbGate Premium' : 'DbGate',
frame: useNativeMenu,
titleBarStyle: useNativeMenu ? undefined : 'hidden',
...bounds,

View File

@ -2,8 +2,11 @@
import { activeTab, currentDatabase } from '../stores';
import getElectron from './getElectron';
import _ from 'lodash';
import { isProApp } from './proTools';
$: title = _.compact([$activeTab?.title, $currentDatabase?.name, 'DbGate']).join(' - ');
$: title = _.compact([$activeTab?.title, $currentDatabase?.name, isProApp() ? 'DbGate Premium' : 'DbGate']).join(
' - '
);
$: {
const electron = getElectron();

View File

@ -8,8 +8,11 @@
import { isMac } from '../utility/common';
import getElectron from '../utility/getElectron';
import { apiOn } from '../utility/api';
import { isProApp } from '../utility/proTools';
$: title = _.compact([$activeTab?.title, $currentDatabase?.name, 'DbGate']).join(' - ');
$: title = _.compact([$activeTab?.title, $currentDatabase?.name, isProApp() ? 'DbGate Premium' : 'DbGate']).join(
' - '
);
const electron = getElectron();
let isMaximized = false;
@ -36,7 +39,10 @@
<FontIcon icon="icon window-minimize" />
</div>
<div class="button">
<FontIcon icon={`icon ${isMaximized ? 'window-restore' : 'window-maximize'}`} on:click={() => electron.send('window-action', 'maximize')} />
<FontIcon
icon={`icon ${isMaximized ? 'window-restore' : 'window-maximize'}`}
on:click={() => electron.send('window-action', 'maximize')}
/>
</div>
<div class="button close-button" on:click={() => electron.send('window-action', 'close')}>
<FontIcon icon="icon window-close" />