mirror of
https://github.com/heyman/heynote.git
synced 2025-03-09 12:31:40 +01:00
Move constants from electron/constants.ts into src/common/constants.js
This commit is contained in:
parent
3fbb3e324a
commit
64740192bf
@ -1,13 +0,0 @@
|
|||||||
export const WINDOW_CLOSE_EVENT = "window-close"
|
|
||||||
export const OPEN_SETTINGS_EVENT = "open-settings"
|
|
||||||
export const SETTINGS_CHANGE_EVENT = "settings-change"
|
|
||||||
|
|
||||||
export const UPDATE_AVAILABLE_EVENT = "update-available"
|
|
||||||
export const UPDATE_NOT_AVAILABLE_EVENT = "update-not-available"
|
|
||||||
export const UPDATE_DOWNLOADED = "update-downloaded"
|
|
||||||
export const UPDATE_ERROR = "update-error"
|
|
||||||
export const UPDATE_DOWNLOAD_PROGRESS = "update-download-progress"
|
|
||||||
|
|
||||||
export const UPDATE_START_DOWNLOAD = "auto-update:startDownload"
|
|
||||||
export const UPDATE_INSTALL_AND_RESTART = "auto-update:installAndRestart"
|
|
||||||
export const UPDATE_CHECK_FOR_UPDATES = "auto-update:checkForUpdates"
|
|
@ -11,7 +11,7 @@ import {
|
|||||||
UPDATE_START_DOWNLOAD,
|
UPDATE_START_DOWNLOAD,
|
||||||
UPDATE_INSTALL_AND_RESTART,
|
UPDATE_INSTALL_AND_RESTART,
|
||||||
UPDATE_CHECK_FOR_UPDATES,
|
UPDATE_CHECK_FOR_UPDATES,
|
||||||
} from '../constants'
|
} from '@/src/common/constants'
|
||||||
import { setForceQuit } from "./index";
|
import { setForceQuit } from "./index";
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,8 +3,9 @@ import { release } from 'node:os'
|
|||||||
import { join } from 'node:path'
|
import { join } from 'node:path'
|
||||||
import fs from "fs"
|
import fs from "fs"
|
||||||
|
|
||||||
|
import { WINDOW_CLOSE_EVENT, SETTINGS_CHANGE_EVENT } from '@/src/common/constants'
|
||||||
|
|
||||||
import { menu, getTrayMenu } from './menu'
|
import { menu, getTrayMenu } from './menu'
|
||||||
import { WINDOW_CLOSE_EVENT, SETTINGS_CHANGE_EVENT } from '../constants';
|
|
||||||
import CONFIG from "../config"
|
import CONFIG from "../config"
|
||||||
import { isDev, isLinux, isMac, isWindows } from '../detect-platform';
|
import { isDev, isLinux, isMac, isWindows } from '../detect-platform';
|
||||||
import { initializeAutoUpdate, checkForUpdates } from './auto-update';
|
import { initializeAutoUpdate, checkForUpdates } from './auto-update';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const { app, Menu } = require("electron")
|
const { app, Menu } = require("electron")
|
||||||
import { OPEN_SETTINGS_EVENT } from "../constants";
|
import { OPEN_SETTINGS_EVENT } from "@/src/common/constants";
|
||||||
import { openAboutWindow } from "./about";
|
import { openAboutWindow } from "./about";
|
||||||
import { quit } from "./index"
|
import { quit } from "./index"
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ import {
|
|||||||
UPDATE_INSTALL_AND_RESTART,
|
UPDATE_INSTALL_AND_RESTART,
|
||||||
UPDATE_DOWNLOADED,
|
UPDATE_DOWNLOADED,
|
||||||
UPDATE_CHECK_FOR_UPDATES,
|
UPDATE_CHECK_FOR_UPDATES,
|
||||||
} from "../constants"
|
} from "@/src/common/constants"
|
||||||
import CONFIG from "../config"
|
import CONFIG from "../config"
|
||||||
import getCurrencyData from "./currency"
|
import getCurrencyData from "./currency"
|
||||||
|
|
||||||
|
@ -1,2 +1,17 @@
|
|||||||
export const SCRATCH_FILE_NAME = "scratch.txt"
|
export const SCRATCH_FILE_NAME = "scratch.txt"
|
||||||
export const AUTO_SAVE_INTERVAL = 2000
|
export const AUTO_SAVE_INTERVAL = 2000
|
||||||
|
|
||||||
|
export const WINDOW_CLOSE_EVENT = "window-close"
|
||||||
|
export const OPEN_SETTINGS_EVENT = "open-settings"
|
||||||
|
export const SETTINGS_CHANGE_EVENT = "settings-change"
|
||||||
|
export const REDO_EVENT = "redo"
|
||||||
|
|
||||||
|
export const UPDATE_AVAILABLE_EVENT = "update-available"
|
||||||
|
export const UPDATE_NOT_AVAILABLE_EVENT = "update-not-available"
|
||||||
|
export const UPDATE_DOWNLOADED = "update-downloaded"
|
||||||
|
export const UPDATE_ERROR = "update-error"
|
||||||
|
export const UPDATE_DOWNLOAD_PROGRESS = "update-download-progress"
|
||||||
|
|
||||||
|
export const UPDATE_START_DOWNLOAD = "auto-update:startDownload"
|
||||||
|
export const UPDATE_INSTALL_AND_RESTART = "auto-update:installAndRestart"
|
||||||
|
export const UPDATE_CHECK_FOR_UPDATES = "auto-update:checkForUpdates"
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
"@/*": ["./*"],
|
"@/*": ["./*"],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"include": ["src"," shared-utils"],
|
"include": ["src"," shared-utils", "electron"],
|
||||||
"references": [
|
"references": [
|
||||||
{ "path": "./tsconfig.node.json" }
|
{ "path": "./tsconfig.node.json" }
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user