mirror of
https://github.com/zadam/trilium.git
synced 2025-11-17 02:30:42 +01:00
Merge pull request #48 from TriliumNext/feature/typescript_backend_11
Convert backend to TypeScript (89% -> 92%, final)
This commit is contained in:
@@ -76,7 +76,7 @@ function error(message: string) {
|
||||
|
||||
const requestBlacklist = [ "/libraries", "/app", "/images", "/stylesheets", "/api/recent-notes" ];
|
||||
|
||||
function request(req: Request, res: Response, timeMs: number, responseLength = "?") {
|
||||
function request(req: Request, res: Response, timeMs: number, responseLength: number | string = "?") {
|
||||
for (const bl of requestBlacklist) {
|
||||
if (req.url.startsWith(bl)) {
|
||||
return;
|
||||
|
||||
@@ -81,7 +81,7 @@ async function createMainWindow(app: App) {
|
||||
|
||||
app.on('second-instance', () => {
|
||||
// Someone tried to run a second instance, we should focus our window.
|
||||
// see www.js "requestSingleInstanceLock" for the rest of this logic with explanation
|
||||
// see www.ts "requestSingleInstanceLock" for the rest of this logic with explanation
|
||||
if (mainWindow) {
|
||||
if (mainWindow.isMinimized()) {
|
||||
mainWindow.restore();
|
||||
|
||||
Reference in New Issue
Block a user