Skip to content

Commit

Permalink
perf: ♻️ Optimize dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
viarotel committed May 15, 2024
1 parent 7c55e50 commit 2f2e1cf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions electron/exposes/search/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default () => {
...(theme.isDark
? {
boxShadowColor: '#4C4D4F',
boxBgColor: '#262727',
boxBgColor: '#262626',
inputColor: '#CFD3DC',
inputBgColor: '#141414',
textColor: '#CFD3DC',
Expand All @@ -65,8 +65,6 @@ export default () => {
: {}),
})

console.log('findInPage', findInPage)

return findInPage
}

Expand Down
4 changes: 2 additions & 2 deletions electron/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import path from 'node:path'
import { createRequire } from 'node:module'
import { fileURLToPath } from 'node:url'

import { BrowserWindow, app, shell } from 'electron'
import { BrowserWindow, app, nativeTheme, shell } from 'electron'
import { electronApp, optimizer } from '@electron-toolkit/utils'
import contextMenu from 'electron-context-menu'
import remote from '@electron/remote/main'
Expand Down Expand Up @@ -89,7 +89,7 @@ function createWindow() {
sandbox: false,
spellcheck: false,
},
backgroundColor: 'white',
backgroundColor: nativeTheme.shouldUseDarkColors ? 'black' : 'white',
})

remote.enable(mainWindow.webContents)
Expand Down
2 changes: 1 addition & 1 deletion src/components/AppSearch/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
class=""
circle
size="small"
:title="$t('common.search')"
:title="`${$t('common.search')}(Command/Ctrl + F)`"
@click="openSearchModal"
>
<el-icon size="12">
Expand Down

0 comments on commit 2f2e1cf

Please sign in to comment.