|
1 | 1 | import * as Path from 'path'; |
2 | | -import { app, dialog, ipcMain, Menu } from 'electron'; |
| 2 | +import { app, dialog, ipcMain, Menu, protocol } from 'electron'; |
3 | 3 | import * as Fs from 'fs'; |
4 | | -import { app, protocol, dialog, ipcMain, Menu } from 'electron'; |
5 | | -import WindowManager from './managers/WindowManager'; |
6 | 4 | import OverlayManager from './managers/OverlayManager'; |
7 | 5 | import generateAppMenu from './menus/generateAppMenu'; |
8 | 6 | import ReplayApi from './ReplayApi'; |
9 | 7 | import storage from './storage'; |
10 | 8 | import Window from './models/Window'; |
11 | 9 | import { ChildProcess } from 'child_process'; |
12 | | -import InternalServer from '~shared/constants/files'; |
13 | | -import * as Fs from 'fs'; |
14 | 10 | import IReplayMeta from '../shared/interfaces/IReplayMeta'; |
15 | 11 |
|
16 | 12 | protocol.registerSchemesAsPrivileged([ |
@@ -59,7 +55,6 @@ export default class Application { |
59 | 55 |
|
60 | 56 | public getPageUrl(page: string) { |
61 | 57 | if (Application.devServerUrl) { |
62 | | - console.log('returining page url', new URL(page, Application.devServerUrl).href); |
63 | 58 | return new URL(page, Application.devServerUrl).href; |
64 | 59 | } |
65 | 60 | return `app://./${page}.html`; |
@@ -319,9 +314,7 @@ export default class Application { |
319 | 314 | protocol.registerBufferProtocol('app', async (request, respond) => { |
320 | 315 | let pathName = new URL(request.url).pathname; |
321 | 316 | pathName = decodeURI(pathName); // Needed in case URL contains spaces |
322 | | - const filePath = Path.join(app.getAppPath(), 'pages', pathName); |
323 | | - |
324 | | - console.log('getting protocol', request.url, filePath); |
| 317 | + const filePath = Path.join(app.getAppPath(), 'frontend', pathName); |
325 | 318 |
|
326 | 319 | try { |
327 | 320 | const data = await Fs.promises.readFile(filePath); |
|
0 commit comments