diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f33c42..a324af1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,11 +4,19 @@ ### Added -- Audiveris parsing errors now displayed in stage progress? +- Audiveris parsing warnings now reported on score view ### Fixed - "Open In Noteflight" fixed and works without local server +- Some time signatures were accidentally cut off and failed parsing + +### Updated + +- Updated most application dependencies to latest (exceptions listed): + - `electron` is `11.x.x`, instead of 12 + - `webpack` is still `4.x.x`, instead of 5 +- Internal code changes to make `Log` component a bit nicer ## 0.8.0 (2021-05-14) diff --git a/src/common/constants.js b/src/common/constants.js index 85f079e..f015a49 100644 --- a/src/common/constants.js +++ b/src/common/constants.js @@ -8,6 +8,9 @@ export const Colors = { LightGrey: '#bbb', Grey: '#777', Charcoal: '#333', + Red: '#f00', + Yelow: '#ff0', + Orange: '#ff7f00', }; export const tmpPath = join(remote.app.getPath('userData'), 'tmp'); diff --git a/src/main/index.js b/src/main/index.js index d510f73..ebba553 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -13,7 +13,7 @@ let mainWindow; function createMainWindow() { const window = new BrowserWindow({ webPreferences: { nodeIntegration: true, webviewTag: true, webSecurity: false, enableRemoteModule: true }, - ...(isDevelopment ? { width: 800, height: 1000 } : { width: 1200, height: 900 }), + ...(isDevelopment ? { width: 1200, height: 1000 } : { width: 1200, height: 900 }), title: isDevelopment ? undefined : `${app.getName()} (${app.getVersion()})`, }); diff --git a/src/renderer/Log.jsx b/src/renderer/Log.jsx index 2f2092c..6c4b2ba 100644 --- a/src/renderer/Log.jsx +++ b/src/renderer/Log.jsx @@ -16,6 +16,12 @@ export const error = (item) => { console.error(item); }; +export const getLog = () => logValues; + +export const clearLog = () => { + logValues = []; +}; + const errorText = style({ color: 'red', }); diff --git a/src/renderer/Score.jsx b/src/renderer/Score.jsx index 5c4f058..390cc59 100644 --- a/src/renderer/Score.jsx +++ b/src/renderer/Score.jsx @@ -1,15 +1,16 @@ import axios from 'axios'; import { remote } from 'electron'; import { copyFileSync, readFileSync, writeFileSync } from 'fs'; -import { basename, join, relative } from 'path'; +import { basename, join } from 'path'; import React, { useEffect, useState } from 'react'; -import { Code, FileText, Image } from 'react-feather'; +import { AlertCircle, Code, FileText, Image } from 'react-feather'; import { cssRule } from 'typestyle'; -import { isDevelopment } from '../common/constants'; +import { Colors, isDevelopment } from '../common/constants'; import NFClient from '../common/nfclient'; import { imageDir } from '../common/stages/images'; import { getTitle } from '../common/util'; +import { getLog, log, logValues } from './Log'; cssRule('#sheetMusic', { border: '1px solid #aaa !important', @@ -57,6 +58,11 @@ export const Score = (props) => { const margin = 10; + let foundErrors = 0; + getLog().forEach((l) => { + if (l.value.indexOf('Exception:') !== -1) foundErrors++; + }); + return (