mirror of
https://github.com/solidtime-io/solidtime-desktop.git
synced 2026-05-07 20:32:27 +00:00
improve titlebar on linux and windows
This commit is contained in:
@@ -18,7 +18,9 @@ export function initializeMainWindow(icon: string) {
|
||||
height: 800,
|
||||
show: false,
|
||||
backgroundColor: '#0f1011',
|
||||
titleBarStyle: process.platform === 'darwin' ? 'hidden' : 'default',
|
||||
titleBarStyle: 'hidden',
|
||||
// expose window controls in Windows/Linux
|
||||
...(process.platform !== 'darwin' ? { titleBarOverlay: true } : {}),
|
||||
autoHideMenuBar: true,
|
||||
...(process.platform === 'linux' ? { icon } : {}),
|
||||
webPreferences: {
|
||||
|
||||
@@ -137,6 +137,8 @@ watchEffect(async () => {
|
||||
const showInstanceSettingsModal = ref(false)
|
||||
|
||||
import { useMagicKeys, whenever } from '@vueuse/core'
|
||||
const isMac = window.electron.process.platform === 'darwin'
|
||||
|
||||
const keys = useMagicKeys()
|
||||
const cmdComma = keys['Cmd+,']
|
||||
whenever(cmdComma, () => {
|
||||
@@ -153,12 +155,17 @@ whenever(cmdComma, () => {
|
||||
<div class="flex h-screen">
|
||||
<div class="flex-1 flex flex-col">
|
||||
<div
|
||||
class="h-10 w-full bg-background border-b border-border-primary flex justify-end items-center pr-3">
|
||||
<div class="flex-1 h-full pl-20" style="-webkit-app-region: drag"></div>
|
||||
class="h-10 w-full bg-background border-b border-border-primary flex items-center"
|
||||
:class="isMac ? 'justify-end pr-3' : 'justify-start pl-3'">
|
||||
<div
|
||||
v-if="isMac"
|
||||
class="flex-1 h-full pl-20"
|
||||
style="-webkit-app-region: drag"></div>
|
||||
<div v-if="isLoggedIn" class="flex items-center space-x-2">
|
||||
<UpdateStatusBar></UpdateStatusBar>
|
||||
<OrganizationSwitcher></OrganizationSwitcher>
|
||||
</div>
|
||||
<div v-if="!isMac" class="flex-1 h-full" style="-webkit-app-region: drag"></div>
|
||||
</div>
|
||||
<div v-if="isLoggedIn" class="flex-1 flex flex-col overflow-hidden">
|
||||
<div class="flex-1 flex overflow-hidden">
|
||||
|
||||
Reference in New Issue
Block a user