Skip to content

Commit

Permalink
feat(desktop): 子窗口支持 F12 开启 DevTools
Browse files Browse the repository at this point in the history
  • Loading branch information
aooiuu committed Aug 10, 2024
1 parent 060a9d1 commit bd266e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/web/electron/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { BrowserWindow, app } from 'electron';
import EasyPostMessage from 'easy-post-message';
import Adapter from 'easy-post-message/electron-adapter';
import { createApp } from '@any-reader/shared';
import { useDevTools } from './useDevTools';

export const ROOT_PATH = path.join(os.homedir(), '.any-reader');
export const CONFIG_PATH = path.join(ROOT_PATH, 'config.desktop.json');
Expand Down Expand Up @@ -61,6 +62,8 @@ export function createAPI() {
}
});

useDevTools(window);

if (process.env.VITE_DEV_SERVER_URL) {
window.loadURL(process.env.VITE_DEV_SERVER_URL + '/#' + data.url);
} else {
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/pages/pc/layout/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<!-- 侧边栏 - 小屏 -->
<div class="h-34 flex items-center bg-[--ar-main-background] px-10 lh-34 sm:hidden">
<div @click="navsShow = true"><MenuOutlined class="mr-5" /></div>
<div class="flex flex-1 items-center justify-center">any-reader</div>
<div class="app-region-drag flex flex-1 items-center justify-center">any-reader</div>
<SearchOutlined @click="navTo('/search')" />
</div>
<!-- 侧边栏 - 大屏 -->
Expand Down

0 comments on commit bd266e5

Please sign in to comment.