Skip to content

Commit 41aa905

Browse files
committed
wip
1 parent 05cf2ea commit 41aa905

File tree

6 files changed

+33
-37
lines changed

6 files changed

+33
-37
lines changed

src/app/AppConfig.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ function getAppConfigFilePath() {
3131
* Stored in the application data directory.
3232
*/
3333
export type AppConfig = {
34-
vibrancy: string | null
3534
// ----------------
3635
// General settings
3736
// ----------------
@@ -108,7 +107,6 @@ export type AppConfigKey = keyof AppConfig
108107
* Get the default config
109108
*/
110109
const defaultAppConfig: AppConfig = {
111-
vibrancy: null,
112110
launchAtStartup: false,
113111
theme: 'default',
114112
systemTitleBar: isLinux,

src/talk/renderer/DesktopHeader.vue

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ onUnmounted(() => {
6868
6969
<div class="spacer" />
7070
71-
<div class="header__item" data-theme-dark>
71+
<div class="header__item" :data-theme-dark="!OS.isMac ? true : undefined">
7272
<MainMenu />
7373
</div>
7474
@@ -95,10 +95,18 @@ onUnmounted(() => {
9595
height: 100%;
9696
/* Save space for native title bar buttons */
9797
x-margin-inline-start: env(titlebar-area-x, 0);
98-
margin-inline-start: 300px;
98+
margin-inline-start: calc(300px - 1px);
9999
background-color: var(--color-main-background-macos);
100100
x-width: env(titlebar-area-width, 100%);
101-
width: calc(100% - 300px);
101+
width: calc(100% - 300px + 1);
102+
border-inline-start: 1px solid var(--color-border-macos);
103+
border-block-end: 1px solid var(--color-border-macos);
104+
transition: margin-inline-start var(--animation-quick) ease;
105+
}
106+
107+
body:has(#app-navigation-vue[aria-hidden="true"]) .header__inner {
108+
margin-inline-start: 0;
109+
border-inline-start: none;
102110
}
103111
104112
.header__item {

src/talk/renderer/Settings/DesktopSettingsSection.vue

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -79,26 +79,6 @@ const playSoundCallOption = useNcSelectModel(playSoundCall, generalNotificationO
7979
const enableCallbox = useAppConfigValue('enableCallbox')
8080
const enableCallboxOption = useNcSelectModel(enableCallbox, generalNotificationOptions)
8181
82-
const vibrancy = useAppConfigValue('vibrancy')
83-
const vibrancyOptions = [
84-
{ label: 'null', value: null },
85-
{ label: 'titlebar', value: 'titlebar' },
86-
{ label: 'selection', value: 'selection' },
87-
{ label: 'menu', value: 'menu' },
88-
{ label: 'popover', value: 'popover' },
89-
{ label: 'sidebar', value: 'sidebar' },
90-
{ label: 'header', value: 'header' },
91-
{ label: 'sheet', value: 'sheet' },
92-
{ label: 'window', value: 'window' },
93-
{ label: 'hud', value: 'hud' },
94-
{ label: 'fullscreen-ui', value: 'fullscreen-ui' },
95-
{ label: 'tooltip', value: 'tooltip' },
96-
{ label: 'content', value: 'content' },
97-
{ label: 'under-window', value: 'under-window' },
98-
{ label: 'under-page', value: 'under-page' },
99-
]
100-
const vibrancyOption = useNcSelectModel(vibrancy, vibrancyOptions)
101-
10282
/**
10383
* Restart the app
10484
*/
@@ -121,8 +101,6 @@ function relaunch() {
121101
</div>
122102
</NcNoteCard>
123103

124-
<SettingsSelect label="Vibrancy" :options="vibrancyOptions" v-model="vibrancyOption" />
125-
126104
<SettingsSubsection v-if="!isLinux" :name="t('talk_desktop', 'General')">
127105
<NcCheckboxRadioSwitch v-model="launchAtStartup" type="switch">
128106
{{ t('talk_desktop', 'Launch at startup') }}

src/talk/renderer/assets/styles.css

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,22 @@ html, body {
2929
background: none !important;
3030
}
3131

32+
@media (prefers-color-scheme: dark) {
33+
:root {
34+
--color-border-macos: #000000;
35+
}
36+
}
37+
38+
@media (prefers-color-scheme: light) {
39+
:root {
40+
--color-border-macos: #DCDCDC;
41+
}
42+
}
43+
3244
.app-navigation {
3345
background: none !important;
3446
backdrop-filter: none !important;
47+
border-inline-end: 1px solid var(--color-border-macos) !important;
3548
}
3649

3750
.list-item {
@@ -46,7 +59,7 @@ html, body {
4659
:root {
4760
--color-primary-element-macos: rgb(from var(--color-primary-element) r g b / 0.75);
4861
--color-primary-element-hover-macos: rgb(from var(--color-primary-element-hover) r g b / 0.75);
49-
--color-main-background-macos: rgb(from var(--color-main-background) r g b / 0.4);
62+
--color-main-background-macos: rgb(from var(--color-main-background) r g b / 0.5);
5063

5164
}
5265

src/talk/renderer/components/MainMenu.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,16 @@ const talkWebLink = computed(() => generateUrl(talkRouter.value?.currentRoute?.f
2727
const showHelp = () => window.TALK_DESKTOP.showHelp()
2828
const reload = () => window.location.reload()
2929
const openSettings = () => window.OCA.Talk.Settings.open()
30+
31+
const OS = window.systemInfo
3032
</script>
3133
3234
<template>
3335
<NcActions :aria-label="t('talk_desktop', 'Menu')"
3436
type="tertiary-no-background"
3537
container="body">
3638
<template #icon>
37-
<IconMenu :size="20" fill-color="var(--color-header-contrast)" />
39+
<IconMenu :size="20" :fill-color="!OS.isMac ? 'var(--color-header-contrast)' : undefined" />
3840
</template>
3941
4042
<NcActionLink :href="talkWebLink" target="_blank">

src/talk/talk.window.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const { getBrowserWindowIcon } = require('../shared/icons.utils.js')
1313
const { TITLE_BAR_HEIGHT } = require('../constants.js')
1414
const { getAppConfig } = require('../app/AppConfig.ts')
1515
const { getScaledWindowMinSize, getScaledWindowSize, applyZoom } = require('../app/utils.ts')
16-
const {onAppConfigChange} = require('../app/AppConfig.ts')
16+
const {isMac} = require('../app/system.utils')
1717

1818
/**
1919
* @return {import('electron').BrowserWindow}
@@ -24,13 +24,12 @@ function createTalkWindow() {
2424
const talkWindowOptions = {
2525
transparent: true,
2626
frame: false,
27-
vibrancy: null,
28-
27+
vibrancy: 'sidebar',
2928
...getScaledWindowMinSize({
3029
minWidth: 600,
3130
minHeight: 400,
3231
}),
33-
//backgroundColor: '#00679E',
32+
backgroundColor: !isMac ? '#00679E' : undefined,
3433
autoHideMenuBar: true,
3534
webPreferences: {
3635
preload: TALK_WINDOW_PRELOAD_WEBPACK_ENTRY,
@@ -60,10 +59,6 @@ function createTalkWindow() {
6059
show: false,
6160
})
6261

63-
onAppConfigChange('vibrancy', (value) => {
64-
window.setVibrancy(value)
65-
})
66-
6762
// TODO: return it on release
6863
/*
6964
if (process.env.NODE_ENV === 'production') {
@@ -86,6 +81,8 @@ function createTalkWindow() {
8681

8782
setupTray(window)
8883

84+
window.setVibrancy('sidebar')
85+
8986
window.loadURL(TALK_WINDOW_WEBPACK_ENTRY)
9087

9188
return window

0 commit comments

Comments
 (0)