worklog-reminder

Форк
0
/
app.config.main.js 
73 строки · 3.0 Кб
1
import path from 'path';
2
import { app } from 'electron';
3
import EventDict from './Domain/Dictionary/EventDict';
4
import OpenInShellHandler from './Application/Event/RendererHandler/OpenInShellHandler';
5
import ShowMainWindowHandler from './Application/Event/RendererHandler/ShowMainWindowHandler';
6
import SyncIsWindowVisible from './Application/Event/RendererHandler/SyncIsWindowVisible';
7
import AppReadyHandler from './Application/Event/MainHandler/AppReadyHandler';
8
import UserAgentHandler from './Application/Event/MainHandler/UserAgentHandler';
9
import WindowAllClosedHandler from './Application/Event/MainHandler/WindowAllClosedHandler';
10
import ActivateHandler from './Application/Event/MainHandler/ActivateHandler';
11
import HideMacOsDockHandler from './Application/Event/MainHandler/HideMacOsDockHandler';
12
import InstallReactExt from './Application/Event/MainHandler/InstallReactExt';
13
import CheckForUpdatesHandler from './Application/Event/MainHandler/CheckForUpdatesHandler';
14
import ShowWindowShortcutHandler from './Application/Event/MainHandler/ShowWindowShortcutHandler';
15
import SyncIsAgentEnabled from './Application/Event/RendererHandler/SyncIsAgentEnabled';
16
import SyncIsDevHandler from './Application/Event/RendererHandler/SyncIsDevHandler';
17
import SetAgentEnabledHandler from './Application/Event/RendererHandler/SetAgentEnabledHandler';
18
import RestoreWindowPositionHandler from './Application/Event/RendererHandler/RestoreWindowPositionHandler';
19

20
const APP_ROOT = app.getAppPath();
21

22
export default {
23
  assetsDir: path.join(APP_ROOT, '.webpack', 'static'),
24
  eventHandlers: {
25
    // App events from main thread
26
    app: {
27
      // This method will be called when Electron has finished
28
      // initialization and is ready to setHandlers browser windows.
29
      // Some APIs can only be used after this event occurs.
30
      [EventDict.APP_READY]: [
31
        new UserAgentHandler(),
32
        new AppReadyHandler(),
33
        new HideMacOsDockHandler(),
34
        new InstallReactExt(),
35
        new CheckForUpdatesHandler(),
36
        new ShowWindowShortcutHandler(),
37
      ],
38
      [EventDict.APP_ACTIVATE]: [
39
        new ActivateHandler(),
40
      ],
41
      // Quit when all windows are closed, except on macOS. There, it's common
42
      // for applications and their menu bar to stay active until the user quits
43
      // explicitly with Cmd + Q.
44
      [EventDict.APP_WINDOW_ALL_CLOSED]: [
45
        new WindowAllClosedHandler(),
46
      ],
47
    },
48
    renderer: {
49
      // Events from renderer
50
      [EventDict.OPEN_IN_SHELL]: [
51
        new OpenInShellHandler(),
52
      ],
53
      [EventDict.SHOW_MAIN_WINDOW]: [
54
        new ShowMainWindowHandler(),
55
      ],
56
      [EventDict.SYNC_IS_WINDOW_VISIBLE]: [
57
        new SyncIsWindowVisible(),
58
      ],
59
      [EventDict.SYNC_IS_AGENT_ENABLED]: [
60
        new SyncIsAgentEnabled(),
61
      ],
62
      [EventDict.SET_AGENT_ENABLED]: [
63
        new SetAgentEnabledHandler(),
64
      ],
65
      [EventDict.SYNC_IS_DEV]: [
66
        new SyncIsDevHandler(),
67
      ],
68
      [EventDict.RESTORE_WINDOW_POSITION]: [
69
        new RestoreWindowPositionHandler(),
70
      ],
71
    },
72
  },
73
};
74

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.