mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-29 02:11:28 -06:00
Merge remote-tracking branch 'upstream/master' into ELECTRON-134
This commit is contained in:
commit
cdc249857d
@ -6,5 +6,5 @@
|
||||
"notificationSettings": {
|
||||
"position": "upper-right",
|
||||
"display": ""
|
||||
}
|
||||
}
|
||||
}
|
@ -37,6 +37,13 @@
|
||||
<button id='open-config-win'>Open configure window</button>
|
||||
<br>
|
||||
<hr>
|
||||
<p>
|
||||
Crash Process:
|
||||
<p>
|
||||
<button id='crash'>Crash Renderer</button>
|
||||
</p>
|
||||
<br>
|
||||
<hr>
|
||||
<p>Badge Count:<p>
|
||||
<button id='inc-badge'>increment badge count</button>
|
||||
<br>
|
||||
@ -172,6 +179,12 @@
|
||||
console.log('bounds changed for=', arg)
|
||||
}
|
||||
|
||||
// crash the renderer process
|
||||
const crash = document.getElementById('crash');
|
||||
crash.addEventListener('click', function () {
|
||||
ssf.crashRendererProcess();
|
||||
});
|
||||
|
||||
var getSources = document.getElementById('get-sources');
|
||||
getSources.addEventListener('click', function() {
|
||||
ssf.getMediaSources({types: ['window', 'screen']}, function(error, sources) {
|
||||
|
@ -63,7 +63,7 @@
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiCompsComponent">
|
||||
<ROW Component="AI_CustomARPName" ComponentId="{2817ACD9-F494-4729-9830-111EF3311CFA}" Directory_="APPDIR" Attributes="4" KeyPath="DisplayName" Options="1"/>
|
||||
<ROW Component="Jobber.exe" ComponentId="{A24482DB-EF3B-4FCA-8482-C7F034F7816C}" Directory_="jobber_Dir" Attributes="0" KeyPath="Jobber.exe"/>
|
||||
<ROW Component="Jobber.exe" ComponentId="{D019D33C-26A6-400F-9C74-D862032D1A5B}" Directory_="jobber_Dir" Attributes="0" KeyPath="Jobber.exe"/>
|
||||
<ROW Component="PodUrl" ComponentId="{EA80D82D-BC65-4075-A9A8-F53E2B2513CE}" Directory_="APPDIR" Attributes="260" KeyPath="PodUrl"/>
|
||||
<ROW Component="ProductInformation" ComponentId="{8B92B687-8AE0-4A5C-B6AB-5D1854009CEA}" Directory_="APPDIR" Attributes="4" KeyPath="Version"/>
|
||||
<ROW Component="ScreenSnippet.exe" ComponentId="{B92951AB-9E69-4970-A3B5-B4E5C32F3477}" Directory_="APPDIR" Attributes="0" KeyPath="ScreenSnippet.exe"/>
|
||||
@ -71,7 +71,7 @@
|
||||
<ROW Component="Symphony.config" ComponentId="{644A231D-2C96-4D3D-ADB0-7820DA373499}" Directory_="config_Dir" Attributes="0" KeyPath="Symphony.config_1" Type="0"/>
|
||||
<ROW Component="Symphony.exe" ComponentId="{853053E4-D96C-42FE-9AF1-52FF1F449FFD}" Directory_="APPDIR" Attributes="256" KeyPath="Symphony.exe"/>
|
||||
<ROW Component="am.pak" ComponentId="{76F935B8-6077-4C7A-AD1B-77E2DBA856CC}" Directory_="locales_Dir" Attributes="0" KeyPath="am.pak" Type="0"/>
|
||||
<ROW Component="ambient.d.ts" ComponentId="{DF6F3FD1-B8F8-4758-977E-B395FA0E1F23}" Directory_="src_1_Dir" Attributes="0" KeyPath="ambient.d.ts" Type="0"/>
|
||||
<ROW Component="ambient.d.ts" ComponentId="{CAFDE1D9-C005-4ED5-A541-E08241C0EE3E}" Directory_="src_1_Dir" Attributes="0" KeyPath="ambient.d.ts" Type="0"/>
|
||||
<ROW Component="apimswincoreconsolel110.dll" ComponentId="{24C259E2-26D5-4B36-9029-C373504B0DDD}" Directory_="APPDIR" Attributes="256" KeyPath="apimswincoreconsolel110.dll"/>
|
||||
<ROW Component="apimswincoredatetimel110.dll" ComponentId="{E600038E-64D7-4245-9AFD-7E47970B7D6A}" Directory_="APPDIR" Attributes="256" KeyPath="apimswincoredatetimel110.dll"/>
|
||||
<ROW Component="apimswincoredebugl110.dll" ComponentId="{4C033829-BD86-4529-BC64-6848E1662B75}" Directory_="APPDIR" Attributes="256" KeyPath="apimswincoredebugl110.dll"/>
|
||||
@ -114,27 +114,29 @@
|
||||
<ROW Component="apimswincrtutilityl110.dll" ComponentId="{C2BDE659-5902-481C-91F4-EE4B0291076C}" Directory_="APPDIR" Attributes="256" KeyPath="apimswincrtutilityl110.dll"/>
|
||||
<ROW Component="appupdate.yml" ComponentId="{F7586760-660A-4C38-8937-138DBEC18D34}" Directory_="resources_Dir" Attributes="0" KeyPath="appupdate.yml" Type="0"/>
|
||||
<ROW Component="blink_image_resources_200_percent.pak" ComponentId="{56AB17A5-B690-4CBE-A39D-512381AAAFE1}" Directory_="APPDIR" Attributes="0" KeyPath="blink_image_resources_200_percent.pak" Type="0"/>
|
||||
<ROW Component="cld.node" ComponentId="{1F2DDDA0-B69B-4AF4-A641-59D455B30ACB}" Directory_="Release_Dir" Attributes="256" KeyPath="cld.node" Type="0"/>
|
||||
<ROW Component="cld.node" ComponentId="{D9F74D7B-B2E4-4ED8-A023-A54A98AE3F96}" Directory_="Release_Dir" Attributes="256" KeyPath="cld.node" Type="0"/>
|
||||
<ROW Component="d3dcompiler_47.dll" ComponentId="{C7B87C02-3116-43A8-A70B-3592B70E6AC8}" Directory_="APPDIR" Attributes="256" KeyPath="d3dcompiler_47.dll"/>
|
||||
<ROW Component="ffmpeg.dll" ComponentId="{A1C4A332-3490-44D8-A5C9-9523889B488B}" Directory_="APPDIR" Attributes="256" KeyPath="ffmpeg.dll"/>
|
||||
<ROW Component="index.d.ts" ComponentId="{FB146550-23F5-45DD-82E4-90609B0C6562}" Directory_="src_Dir" Attributes="0" KeyPath="index.d.ts" Type="0"/>
|
||||
<ROW Component="index.d.ts" ComponentId="{74D261F1-A6C5-49DD-8554-E48337CC04AF}" Directory_="src_Dir" Attributes="0" KeyPath="index.d.ts" Type="0"/>
|
||||
<ROW Component="index.js" ComponentId="{77C48E00-B684-4E72-ACF4-15DD0253EF43}" Directory_="lib_Dir" Attributes="0" KeyPath="index.js" Type="0"/>
|
||||
<ROW Component="libEGL.dll" ComponentId="{8EEC76AB-3601-4D11-B13E-32EC2A38C539}" Directory_="APPDIR" Attributes="256" KeyPath="libEGL.dll"/>
|
||||
<ROW Component="libGLESv2.dll" ComponentId="{0E8B8B21-B4C0-45C9-95D3-637FD93A4EC0}" Directory_="APPDIR" Attributes="256" KeyPath="libGLESv2.dll"/>
|
||||
<ROW Component="msvcp140.dll" ComponentId="{93A6289C-CF23-4BB8-A579-7FDDD1D15591}" Directory_="APPDIR" Attributes="256" KeyPath="msvcp140.dll"/>
|
||||
<ROW Component="node.dll" ComponentId="{C0972355-339E-438C-94A3-74174DE4C6B6}" Directory_="APPDIR" Attributes="256" KeyPath="node.dll"/>
|
||||
<ROW Component="npmignore_1" ComponentId="{3367B8BE-13CC-4957-B834-60B1574BCFDB}" Directory_="spawnrx_Dir" Attributes="0" KeyPath="npmignore_1" Type="0"/>
|
||||
<ROW Component="node_modules" ComponentId="{A4EB33A8-FEA8-40A5-94EF-705EBE64DDC1}" Directory_="node_modules_Dir" Attributes="0"/>
|
||||
<ROW Component="npmignore" ComponentId="{849CFFE2-EBC3-4430-AC8B-DEE1B66DF589}" Directory_="spawnrx_Dir" Attributes="0" KeyPath="npmignore" Type="0"/>
|
||||
<ROW Component="ucrtbase.dll" ComponentId="{16D802A3-DAD4-4BF4-AD64-88D6F63F5D1E}" Directory_="APPDIR" Attributes="256" KeyPath="ucrtbase.dll"/>
|
||||
<ROW Component="vcruntime140.dll" ComponentId="{2542FC82-8D71-4351-8514-2C0D12772ED5}" Directory_="APPDIR" Attributes="256" KeyPath="vcruntime140.dll"/>
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiFeatsComponent">
|
||||
<ROW Feature="D564007E3BBE4F85950A09B470A7CA65" Title="Visual C++ Redistributable for Visual Studio 2013 x86" Description="Visual C++ Redistributable for Visual Studio 2013 x86" Display="3" Level="1" Attributes="0" Components="AI_CustomARPName"/>
|
||||
<ROW Feature="MainFeature" Title="MainFeature" Description="Description" Display="1" Level="1" Directory_="APPDIR" Attributes="0" Components="AI_CustomARPName Jobber.exe PodUrl ProductInformation ScreenSnippet.exe Symphony Symphony.config Symphony.exe am.pak ambient.d.ts apimswincoreconsolel110.dll apimswincoredatetimel110.dll apimswincoredebugl110.dll apimswincoreerrorhandlingl110.dll apimswincorefilel110.dll apimswincorefilel120.dll apimswincorefilel210.dll apimswincorehandlel110.dll apimswincoreheapl110.dll apimswincoreinterlockedl110.dll apimswincorelibraryloaderl110.dll apimswincorelocalizationl120.dll apimswincorememoryl110.dll apimswincorenamedpipel110.dll apimswincoreprocessenvironmentl110.dll apimswincoreprocessthreadsl110.dll apimswincoreprocessthreadsl111.dll apimswincoreprofilel110.dll apimswincorertlsupportl110.dll apimswincorestringl110.dll apimswincoresynchl110.dll apimswincoresynchl120.dll apimswincoresysinfol110.dll apimswincoretimezonel110.dll apimswincoreutill110.dll apimswincrtconiol110.dll apimswincrtconvertl110.dll apimswincrtenvironmentl110.dll apimswincrtfilesysteml110.dll apimswincrtheapl110.dll apimswincrtlocalel110.dll apimswincrtmathl110.dll apimswincrtmultibytel110.dll apimswincrtprivatel110.dll apimswincrtprocessl110.dll apimswincrtruntimel110.dll apimswincrtstdiol110.dll apimswincrtstringl110.dll apimswincrttimel110.dll apimswincrtutilityl110.dll appupdate.yml blink_image_resources_200_percent.pak cld.node d3dcompiler_47.dll ffmpeg.dll index.d.ts libEGL.dll libGLESv2.dll msvcp140.dll node.dll npmignore_1 ucrtbase.dll vcruntime140.dll"/>
|
||||
<ROW Feature="MainFeature" Title="MainFeature" Description="Description" Display="1" Level="1" Directory_="APPDIR" Attributes="0" Components="AI_CustomARPName Jobber.exe PodUrl ProductInformation ScreenSnippet.exe Symphony Symphony.config Symphony.exe am.pak ambient.d.ts apimswincoreconsolel110.dll apimswincoredatetimel110.dll apimswincoredebugl110.dll apimswincoreerrorhandlingl110.dll apimswincorefilel110.dll apimswincorefilel120.dll apimswincorefilel210.dll apimswincorehandlel110.dll apimswincoreheapl110.dll apimswincoreinterlockedl110.dll apimswincorelibraryloaderl110.dll apimswincorelocalizationl120.dll apimswincorememoryl110.dll apimswincorenamedpipel110.dll apimswincoreprocessenvironmentl110.dll apimswincoreprocessthreadsl110.dll apimswincoreprocessthreadsl111.dll apimswincoreprofilel110.dll apimswincorertlsupportl110.dll apimswincorestringl110.dll apimswincoresynchl110.dll apimswincoresynchl120.dll apimswincoresysinfol110.dll apimswincoretimezonel110.dll apimswincoreutill110.dll apimswincrtconiol110.dll apimswincrtconvertl110.dll apimswincrtenvironmentl110.dll apimswincrtfilesysteml110.dll apimswincrtheapl110.dll apimswincrtlocalel110.dll apimswincrtmathl110.dll apimswincrtmultibytel110.dll apimswincrtprivatel110.dll apimswincrtprocessl110.dll apimswincrtruntimel110.dll apimswincrtstdiol110.dll apimswincrtstringl110.dll apimswincrttimel110.dll apimswincrtutilityl110.dll appupdate.yml blink_image_resources_200_percent.pak cld.node d3dcompiler_47.dll ffmpeg.dll index.d.ts index.js libEGL.dll libGLESv2.dll msvcp140.dll node.dll node_modules npmignore ucrtbase.dll vcruntime140.dll"/>
|
||||
<ATTRIBUTE name="CurrentFeature" value="MainFeature"/>
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiFilesComponent">
|
||||
<ROW File="CODE_OF_CONDUCT.md" Component_="npmignore_1" FileName="CODE_O~1.MD|CODE_OF_CONDUCT.md" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\spawn-rx\CODE_OF_CONDUCT.md" SelfReg="false" NextFile="COPYING"/>
|
||||
<ROW File="COPYING" Component_="npmignore_1" FileName="COPYING" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\spawn-rx\COPYING" SelfReg="false" NextFile="esdoc.json"/>
|
||||
<ROW File="Jobber.exe" Component_="Jobber.exe" FileName="Jobber.exe" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\spawn-rx\vendor\jobber\Jobber.exe" SelfReg="false" DigSign="true"/>
|
||||
<ROW File="CODE_OF_CONDUCT.md" Component_="npmignore" FileName="CODE_O~1.MD|CODE_OF_CONDUCT.md" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\spawn-rx\CODE_OF_CONDUCT.md" SelfReg="false" NextFile="COPYING"/>
|
||||
<ROW File="COPYING" Component_="npmignore" FileName="COPYING" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\spawn-rx\COPYING" SelfReg="false" NextFile="esdoc.json"/>
|
||||
<ROW File="Jobber.exe" Component_="Jobber.exe" FileName="Jobber.exe" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\spawn-rx\vendor\jobber\Jobber.exe" SelfReg="false" NextFile="cld.node" DigSign="true"/>
|
||||
<ROW File="LICENSE.electron.txt" Component_="blink_image_resources_200_percent.pak" FileName="LICENS~1.TXT|LICENSE.electron.txt" Attributes="0" SourcePath="..\..\dist\win-unpacked\LICENSE.electron.txt" SelfReg="false" NextFile="LICENSES.chromium.html"/>
|
||||
<ROW File="LICENSES.chromium.html" Component_="blink_image_resources_200_percent.pak" FileName="LICENS~1.HTM|LICENSES.chromium.html" Attributes="0" SourcePath="..\..\dist\win-unpacked\LICENSES.chromium.html" SelfReg="false" NextFile="natives_blob.bin"/>
|
||||
<ROW File="ScreenSnippet.exe" Component_="ScreenSnippet.exe" FileName="SCREEN~1.EXE|ScreenSnippet.exe" Attributes="0" SourcePath="..\..\node_modules\screen-snippet\bin\Release\ScreenSnippet.exe" SelfReg="false" NextFile="apimswincoreconsolel110.dll" DigSign="true"/>
|
||||
@ -188,10 +190,10 @@
|
||||
<ROW File="bg.pak" Component_="am.pak" FileName="bg.pak" Attributes="0" SourcePath="..\..\dist\win-unpacked\locales\bg.pak" SelfReg="false" NextFile="bn.pak"/>
|
||||
<ROW File="blink_image_resources_200_percent.pak" Component_="blink_image_resources_200_percent.pak" FileName="BLINK_~1.PAK|blink_image_resources_200_percent.pak" Attributes="0" SourcePath="..\..\dist\win-unpacked\blink_image_resources_200_percent.pak" SelfReg="false" NextFile="content_resources_200_percent.pak"/>
|
||||
<ROW File="bn.pak" Component_="am.pak" FileName="bn.pak" Attributes="0" SourcePath="..\..\dist\win-unpacked\locales\bn.pak" SelfReg="false" NextFile="ca.pak"/>
|
||||
<ROW File="build.cmd" Component_="npmignore_1" FileName="build.cmd" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\spawn-rx\build.cmd" SelfReg="false" NextFile="build.sh"/>
|
||||
<ROW File="build.sh" Component_="npmignore_1" FileName="build.sh" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\spawn-rx\build.sh" SelfReg="false" NextFile="CODE_OF_CONDUCT.md"/>
|
||||
<ROW File="build.cmd" Component_="npmignore" FileName="build.cmd" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\spawn-rx\build.cmd" SelfReg="false" NextFile="build.sh"/>
|
||||
<ROW File="build.sh" Component_="npmignore" FileName="build.sh" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\spawn-rx\build.sh" SelfReg="false" NextFile="CODE_OF_CONDUCT.md"/>
|
||||
<ROW File="ca.pak" Component_="am.pak" FileName="ca.pak" Attributes="0" SourcePath="..\..\dist\win-unpacked\locales\ca.pak" SelfReg="false" NextFile="cs.pak"/>
|
||||
<ROW File="cld.node" Component_="cld.node" FileName="CLD~1.NOD|cld.node" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\@paulcbetts\cld\build\Release\cld.node" SelfReg="false" NextFile="npmignore_1"/>
|
||||
<ROW File="cld.node" Component_="cld.node" FileName="CLD~1.NOD|cld.node" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\@paulcbetts\cld\build\Release\cld.node" SelfReg="false"/>
|
||||
<ROW File="content_resources_200_percent.pak" Component_="blink_image_resources_200_percent.pak" FileName="CONTEN~1.PAK|content_resources_200_percent.pak" Attributes="0" SourcePath="..\..\dist\win-unpacked\content_resources_200_percent.pak" SelfReg="false" NextFile="content_shell.pak"/>
|
||||
<ROW File="content_shell.pak" Component_="blink_image_resources_200_percent.pak" FileName="CONTEN~2.PAK|content_shell.pak" Attributes="0" SourcePath="..\..\dist\win-unpacked\content_shell.pak" SelfReg="false" NextFile="d3dcompiler_47.dll"/>
|
||||
<ROW File="cs.pak" Component_="am.pak" FileName="cs.pak" Attributes="0" SourcePath="..\..\dist\win-unpacked\locales\cs.pak" SelfReg="false" NextFile="da.pak"/>
|
||||
@ -204,7 +206,7 @@
|
||||
<ROW File="enUS.pak" Component_="am.pak" FileName="en-US.pak" Attributes="0" SourcePath="..\..\dist\win-unpacked\locales\en-US.pak" SelfReg="false" NextFile="es.pak"/>
|
||||
<ROW File="es.pak" Component_="am.pak" FileName="es.pak" Attributes="0" SourcePath="..\..\dist\win-unpacked\locales\es.pak" SelfReg="false" NextFile="es419.pak"/>
|
||||
<ROW File="es419.pak" Component_="am.pak" FileName="es-419.pak" Attributes="0" SourcePath="..\..\dist\win-unpacked\locales\es-419.pak" SelfReg="false" NextFile="et.pak"/>
|
||||
<ROW File="esdoc.json" Component_="npmignore_1" FileName="ESDOC~1.JSO|esdoc.json" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\spawn-rx\esdoc.json" SelfReg="false" NextFile="index.d.ts"/>
|
||||
<ROW File="esdoc.json" Component_="npmignore" FileName="ESDOC~1.JSO|esdoc.json" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\spawn-rx\esdoc.json" SelfReg="false" NextFile="index.js"/>
|
||||
<ROW File="et.pak" Component_="am.pak" FileName="et.pak" Attributes="0" SourcePath="..\..\dist\win-unpacked\locales\et.pak" SelfReg="false" NextFile="fa.pak"/>
|
||||
<ROW File="fa.pak" Component_="am.pak" FileName="fa.pak" Attributes="0" SourcePath="..\..\dist\win-unpacked\locales\fa.pak" SelfReg="false" NextFile="fakebidi.pak"/>
|
||||
<ROW File="fakebidi.pak" Component_="am.pak" FileName="FAKE-B~1.PAK|fake-bidi.pak" Attributes="0" SourcePath="..\..\dist\win-unpacked\locales\fake-bidi.pak" SelfReg="false" NextFile="fi.pak"/>
|
||||
@ -219,9 +221,10 @@
|
||||
<ROW File="hu.pak" Component_="am.pak" FileName="hu.pak" Attributes="0" SourcePath="..\..\dist\win-unpacked\locales\hu.pak" SelfReg="false" NextFile="id.pak"/>
|
||||
<ROW File="icudtl.dat" Component_="blink_image_resources_200_percent.pak" FileName="icudtl.dat" Attributes="0" SourcePath="..\..\dist\win-unpacked\icudtl.dat" SelfReg="false" NextFile="libEGL.dll"/>
|
||||
<ROW File="id.pak" Component_="am.pak" FileName="id.pak" Attributes="0" SourcePath="..\..\dist\win-unpacked\locales\id.pak" SelfReg="false" NextFile="it.pak"/>
|
||||
<ROW File="index.d.ts" Component_="index.d.ts" FileName="INDEXD~1.TS|index.d.ts" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\spawn-rx\lib\src\index.d.ts" SelfReg="false" NextFile="index.js"/>
|
||||
<ROW File="index.js" Component_="index.d.ts" FileName="index.js" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\spawn-rx\lib\src\index.js" SelfReg="false" NextFile="index.js.map"/>
|
||||
<ROW File="index.js.map" Component_="index.d.ts" FileName="INDEXJ~1.MAP|index.js.map" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\spawn-rx\lib\src\index.js.map" SelfReg="false" NextFile="package.json_1"/>
|
||||
<ROW File="index.d.ts" Component_="index.d.ts" FileName="INDEXD~1.TS|index.d.ts" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\spawn-rx\lib\src\index.d.ts" SelfReg="false" NextFile="index.js_1"/>
|
||||
<ROW File="index.js" Component_="index.js" FileName="index.js" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\spawn-rx\lib\index.js" SelfReg="false" NextFile="index.d.ts"/>
|
||||
<ROW File="index.js.map" Component_="index.d.ts" FileName="INDEXJ~1.MAP|index.js.map" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\spawn-rx\lib\src\index.js.map" SelfReg="false" NextFile="package.json"/>
|
||||
<ROW File="index.js_1" Component_="index.d.ts" FileName="index.js" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\spawn-rx\lib\src\index.js" SelfReg="false" NextFile="index.js.map"/>
|
||||
<ROW File="index.ts" Component_="ambient.d.ts" FileName="index.ts" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\spawn-rx\src\index.ts" SelfReg="false" NextFile="tsconfig.json"/>
|
||||
<ROW File="it.pak" Component_="am.pak" FileName="it.pak" Attributes="0" SourcePath="..\..\dist\win-unpacked\locales\it.pak" SelfReg="false" NextFile="ja.pak"/>
|
||||
<ROW File="ja.pak" Component_="am.pak" FileName="ja.pak" Attributes="0" SourcePath="..\..\dist\win-unpacked\locales\ja.pak" SelfReg="false" NextFile="kn.pak"/>
|
||||
@ -239,8 +242,8 @@
|
||||
<ROW File="nb.pak" Component_="am.pak" FileName="nb.pak" Attributes="0" SourcePath="..\..\dist\win-unpacked\locales\nb.pak" SelfReg="false" NextFile="nl.pak"/>
|
||||
<ROW File="nl.pak" Component_="am.pak" FileName="nl.pak" Attributes="0" SourcePath="..\..\dist\win-unpacked\locales\nl.pak" SelfReg="false" NextFile="pl.pak"/>
|
||||
<ROW File="node.dll" Component_="node.dll" FileName="node.dll" Attributes="0" SourcePath="..\..\dist\win-unpacked\node.dll" SelfReg="false" NextFile="snapshot_blob.bin"/>
|
||||
<ROW File="npmignore_1" Component_="npmignore_1" FileName="NPMIGN~1|.npmignore" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\spawn-rx\.npmignore" SelfReg="false" NextFile="build.cmd"/>
|
||||
<ROW File="package.json_1" Component_="npmignore_1" FileName="PACKAG~1.JSO|package.json" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\spawn-rx\package.json" SelfReg="false" NextFile="ambient.d.ts"/>
|
||||
<ROW File="npmignore" Component_="npmignore" FileName="NPMIGN~1|.npmignore" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\spawn-rx\.npmignore" SelfReg="false" NextFile="build.cmd"/>
|
||||
<ROW File="package.json" Component_="npmignore" FileName="PACKAG~1.JSO|package.json" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\spawn-rx\package.json" SelfReg="false" NextFile="ambient.d.ts"/>
|
||||
<ROW File="pl.pak" Component_="am.pak" FileName="pl.pak" Attributes="0" SourcePath="..\..\dist\win-unpacked\locales\pl.pak" SelfReg="false" NextFile="ptBR.pak"/>
|
||||
<ROW File="ptBR.pak" Component_="am.pak" FileName="pt-BR.pak" Attributes="0" SourcePath="..\..\dist\win-unpacked\locales\pt-BR.pak" SelfReg="false" NextFile="ptPT.pak"/>
|
||||
<ROW File="ptPT.pak" Component_="am.pak" FileName="pt-PT.pak" Attributes="0" SourcePath="..\..\dist\win-unpacked\locales\pt-PT.pak" SelfReg="false" NextFile="ro.pak"/>
|
||||
@ -256,12 +259,12 @@
|
||||
<ROW File="te.pak" Component_="am.pak" FileName="te.pak" Attributes="0" SourcePath="..\..\dist\win-unpacked\locales\te.pak" SelfReg="false" NextFile="th.pak"/>
|
||||
<ROW File="th.pak" Component_="am.pak" FileName="th.pak" Attributes="0" SourcePath="..\..\dist\win-unpacked\locales\th.pak" SelfReg="false" NextFile="tr.pak"/>
|
||||
<ROW File="tr.pak" Component_="am.pak" FileName="tr.pak" Attributes="0" SourcePath="..\..\dist\win-unpacked\locales\tr.pak" SelfReg="false" NextFile="uk.pak"/>
|
||||
<ROW File="tsconfig.json" Component_="npmignore_1" FileName="TSCONF~1.JSO|tsconfig.json" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\spawn-rx\tsconfig.json" SelfReg="false" NextFile="tslint.json"/>
|
||||
<ROW File="tslint.json" Component_="npmignore_1" FileName="TSLINT~1.JSO|tslint.json" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\spawn-rx\tslint.json" SelfReg="false" NextFile="Jobber.exe"/>
|
||||
<ROW File="tsconfig.json" Component_="npmignore" FileName="TSCONF~1.JSO|tsconfig.json" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\spawn-rx\tsconfig.json" SelfReg="false" NextFile="tslint.json"/>
|
||||
<ROW File="tslint.json" Component_="npmignore" FileName="TSLINT~1.JSO|tslint.json" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\spawn-rx\tslint.json" SelfReg="false" NextFile="Jobber.exe"/>
|
||||
<ROW File="ucrtbase.dll" Component_="ucrtbase.dll" FileName="ucrtbase.dll" Attributes="0" SourcePath="..\..\dist\win-unpacked\ucrtbase.dll" SelfReg="false" NextFile="vcruntime140.dll"/>
|
||||
<ROW File="ui_resources_200_percent.pak" Component_="blink_image_resources_200_percent.pak" FileName="UI_RES~1.PAK|ui_resources_200_percent.pak" Attributes="0" SourcePath="..\..\dist\win-unpacked\ui_resources_200_percent.pak" SelfReg="false" NextFile="views_resources_200_percent.pak"/>
|
||||
<ROW File="uk.pak" Component_="am.pak" FileName="uk.pak" Attributes="0" SourcePath="..\..\dist\win-unpacked\locales\uk.pak" SelfReg="false" NextFile="vi.pak"/>
|
||||
<ROW File="vcruntime140.dll" Component_="vcruntime140.dll" FileName="VCRUNT~1.DLL|vcruntime140.dll" Attributes="0" SourcePath="..\..\dist\win-unpacked\vcruntime140.dll" SelfReg="false" NextFile="cld.node"/>
|
||||
<ROW File="vcruntime140.dll" Component_="vcruntime140.dll" FileName="VCRUNT~1.DLL|vcruntime140.dll" Attributes="0" SourcePath="..\..\dist\win-unpacked\vcruntime140.dll" SelfReg="false" NextFile="npmignore"/>
|
||||
<ROW File="vi.pak" Component_="am.pak" FileName="vi.pak" Attributes="0" SourcePath="..\..\dist\win-unpacked\locales\vi.pak" SelfReg="false" NextFile="zhCN.pak"/>
|
||||
<ROW File="views_resources_200_percent.pak" Component_="blink_image_resources_200_percent.pak" FileName="VIEWS_~1.PAK|views_resources_200_percent.pak" Attributes="0" SourcePath="..\..\dist\win-unpacked\views_resources_200_percent.pak" SelfReg="false" NextFile="am.pak"/>
|
||||
<ROW File="zhCN.pak" Component_="am.pak" FileName="zh-CN.pak" Attributes="0" SourcePath="..\..\dist\win-unpacked\locales\zh-CN.pak" SelfReg="false" NextFile="zhTW.pak"/>
|
||||
@ -272,6 +275,9 @@
|
||||
<ROW AliasRowId="MINIMIZE_ON_CLOSE" AliasRowOperation="2" Value="true"/>
|
||||
<ROW AliasRowId="ALWAYS_ON_TOP" AliasRowOperation="2" Value="true"/>
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.AiPersistentDataComponent">
|
||||
<ROW PersistentRow="Symphony.config_1" Type="0" Condition="REINSTALL"/>
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.BuildComponent">
|
||||
<ROW BuildKey="DefaultBuild" BuildName="DefaultBuild" BuildOrder="1" BuildType="1" Languages="en" InstallationType="4" UseLargeSchema="true" MsiPackageType="x64"/>
|
||||
<ATTRIBUTE name="CurrentBuild" value="DefaultBuild"/>
|
||||
@ -298,6 +304,10 @@
|
||||
<ROW Fragment="VerifyRepairDlg.aip" Path="<AI_THEMES>classic\fragments\VerifyRepairDlg.aip"/>
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiActionTextComponent">
|
||||
<ROW Action="AI_AiBackupImmediate" Description="Preparing backup operation" Template="Path: [1]" DescriptionLocId="ActionText.Description.AI_AiBackupImmediate" TemplateLocId="ActionText.Template.AI_AiBackupImmediate"/>
|
||||
<ROW Action="AI_AiBackupRollback" Description="Rollback backup" Template="Path: [1]" DescriptionLocId="ActionText.Description.AI_AiBackupRollback" TemplateLocId="ActionText.Template.AI_AiBackupRollback"/>
|
||||
<ROW Action="AI_AiRestoreDeferred" Description="Executing restore operation" Template="Path: [1]" DescriptionLocId="ActionText.Description.AI_AiRestoreDeferred" TemplateLocId="ActionText.Template.AI_AiRestoreDeferred"/>
|
||||
<ROW Action="AI_AiRestoreRollback" Description="Rollback restore" Template="Path: [1]" DescriptionLocId="ActionText.Description.AI_AiRestoreRollback" TemplateLocId="ActionText.Template.AI_AiRestoreRollback"/>
|
||||
<ROW Action="AI_TxtUpdaterCommit" Description="Commit text file changes. " Template="Commit text file changes." DescriptionLocId="ActionText.Description.AI_TxtUpdaterCommit" TemplateLocId="ActionText.Template.AI_TxtUpdaterCommit"/>
|
||||
<ROW Action="AI_TxtUpdaterConfig" Description="Executing text file updates" Template="Updating text file: "[1]"" DescriptionLocId="ActionText.Description.AI_TxtUpdaterConfig" TemplateLocId="ActionText.Template.AI_TxtUpdaterConfig"/>
|
||||
<ROW Action="AI_TxtUpdaterInstall" Description="Generating actions to configure text files updates" DescriptionLocId="ActionText.Description.AI_TxtUpdaterInstall"/>
|
||||
@ -305,6 +315,7 @@
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiBinaryComponent">
|
||||
<ROW Name="Banner.jpg" SourcePath="Assets\Banner.jpg"/>
|
||||
<ROW Name="ResourceCleaner.dll" SourcePath="<AI_CUSTACTS>ResourceCleaner.dll"/>
|
||||
<ROW Name="Tabloid.jpg" SourcePath="Assets\Tabloid.jpg"/>
|
||||
<ROW Name="TxtUpdater.dll" SourcePath="<AI_CUSTACTS>TxtUpdater.dll"/>
|
||||
<ROW Name="aicustact.dll" SourcePath="<AI_CUSTACTS>aicustact.dll"/>
|
||||
@ -451,11 +462,19 @@
|
||||
<ROW Dialog_="FolderDlg" Control_="Back" Event="[ButtonText_Next]" Argument="[AI_ButtonText_Next_Orig]" Condition="AI_INSTALL" Ordering="2" Options="2"/>
|
||||
<ROW Dialog_="FolderDlg" Control_="Back" Event="[Text_Next]" Argument="[AI_Text_Next_Orig]" Condition="AI_INSTALL" Ordering="3" Options="2"/>
|
||||
<ROW Dialog_="FolderDlg" Control_="Next" Event="DoAction" Argument="CheckBoxesScript" Condition="AI_INSTALL" Ordering="205"/>
|
||||
<ROW Dialog_="FatalError" Control_="Finish" Event="DoAction" Argument="AI_AiBackupCleanup" Condition="1" Ordering="102"/>
|
||||
<ROW Dialog_="UserExit" Control_="Finish" Event="DoAction" Argument="AI_AiBackupCleanup" Condition="1" Ordering="101"/>
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiCreateFolderComponent">
|
||||
<ROW Directory_="Symphony_Dir" Component_="Symphony" ManualDelete="false"/>
|
||||
<ROW Directory_="node_modules_Dir" Component_="node_modules" ManualDelete="false"/>
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiCustActComponent">
|
||||
<ROW Action="AI_AiBackupCleanup" Type="1" Source="ResourceCleaner.dll" Target="OnAiBackupCleanup" WithoutSeq="true"/>
|
||||
<ROW Action="AI_AiBackupImmediate" Type="1" Source="ResourceCleaner.dll" Target="OnAiBackupImmediate"/>
|
||||
<ROW Action="AI_AiBackupRollback" Type="11521" Source="ResourceCleaner.dll" Target="OnAiBackupRollback"/>
|
||||
<ROW Action="AI_AiRestoreDeferred" Type="11265" Source="ResourceCleaner.dll" Target="OnAiRestoreDeferred"/>
|
||||
<ROW Action="AI_AiRestoreRollback" Type="11521" Source="ResourceCleaner.dll" Target="OnAiRestoreRollback" WithoutSeq="true"/>
|
||||
<ROW Action="AI_AuthorSinglePackage" Type="1" Source="aicustact.dll" Target="AI_AuthorSinglePackage" WithoutSeq="true"/>
|
||||
<ROW Action="AI_DATA_SETTER" Type="51" Source="CustomActionData" Target="Symphony.exe"/>
|
||||
<ROW Action="AI_DATA_SETTER_2" Type="51" Source="CustomActionData" Target="Symphony.exe"/>
|
||||
@ -488,7 +507,7 @@
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiInstExSeqComponent">
|
||||
<ROW Action="AI_DOWNGRADE" Condition="AI_NEWERPRODUCTFOUND AND (UILevel <> 5)" Sequence="210"/>
|
||||
<ROW Action="AI_STORE_LOCATION" Condition="(Not Installed) OR REINSTALL" Sequence="1501"/>
|
||||
<ROW Action="AI_STORE_LOCATION" Condition="(Not Installed) OR REINSTALL" Sequence="1502"/>
|
||||
<ROW Action="AI_PREPARE_UPGRADE" Condition="AI_UPGRADE="No" AND (Not Installed)" Sequence="1399"/>
|
||||
<ROW Action="AI_ResolveKnownFolders" Sequence="53"/>
|
||||
<ROW Action="AI_GetArpIconPath" Sequence="1401"/>
|
||||
@ -500,6 +519,9 @@
|
||||
<ROW Action="AI_TxtUpdaterInstall" Sequence="5101"/>
|
||||
<ROW Action="Symphony.exe" Condition="( NOT Installed ) AND ( MSIINSTALLPERUSER )" Sequence="5935"/>
|
||||
<ROW Action="Symphony.exe_All_User" Condition="( NOT Installed ) AND ( ALLUSERS )" Sequence="5936"/>
|
||||
<ROW Action="AI_AiBackupImmediate" Sequence="1001"/>
|
||||
<ROW Action="AI_AiBackupRollback" Sequence="1501"/>
|
||||
<ROW Action="AI_AiRestoreDeferred" Sequence="6599"/>
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiInstallUISequenceComponent">
|
||||
<ROW Action="AI_ResolveKnownFolders" Sequence="52"/>
|
||||
@ -562,4 +584,4 @@
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.TxtUpdateSetComponent">
|
||||
<ROW Key="Symphony.config" Component="am.pak" FileName="Symphony.config" Directory="config_Dir" Options="17"/>
|
||||
</COMPONENT>
|
||||
</DOCUMENT>
|
||||
</DOCUMENT>
|
||||
|
52
js/aboutApp/about-app.html
Normal file
52
js/aboutApp/about-app.html
Normal file
@ -0,0 +1,52 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>About Symphony</title>
|
||||
<style>
|
||||
html, body {
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
.name {
|
||||
flex: 1;
|
||||
font-size: 1.3em;
|
||||
padding: 10px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.version-text {
|
||||
flex: 1;
|
||||
font-size: 1em;
|
||||
color: #2f2f2f;
|
||||
}
|
||||
|
||||
.copyright-text {
|
||||
flex: 1;
|
||||
padding: 10px;
|
||||
font-size: 0.6em;
|
||||
color: #7f7f7f;
|
||||
}
|
||||
|
||||
.content {
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-top: 20px
|
||||
}
|
||||
|
||||
.logo {
|
||||
margin: auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<img class="logo" src="symphony-logo.png">
|
||||
<span id="app-name" class="name">Symphony</span>
|
||||
<span id="version" class="version-text"></span>
|
||||
<span id="copyright" class="copyright-text"></span>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
93
js/aboutApp/index.js
Normal file
93
js/aboutApp/index.js
Normal file
@ -0,0 +1,93 @@
|
||||
'use strict';
|
||||
|
||||
const electron = require('electron');
|
||||
const BrowserWindow = electron.BrowserWindow;
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const log = require('../log.js');
|
||||
const logLevels = require('../enums/logLevels.js');
|
||||
|
||||
let aboutWindow;
|
||||
|
||||
let windowConfig = {
|
||||
width: 350,
|
||||
height: 260,
|
||||
show: false,
|
||||
modal: true,
|
||||
autoHideMenuBar: true,
|
||||
titleBarStyle: true,
|
||||
resizable: false,
|
||||
webPreferences: {
|
||||
preload: path.join(__dirname, 'renderer.js'),
|
||||
sandbox: true,
|
||||
nodeIntegration: false
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* method to get the HTML template path
|
||||
* @returns {string}
|
||||
*/
|
||||
function getTemplatePath() {
|
||||
let templatePath = path.join(__dirname, 'about-app.html');
|
||||
try {
|
||||
fs.statSync(templatePath).isFile();
|
||||
} catch (err) {
|
||||
log.send(logLevels.ERROR, 'about-window: Could not find template ("' + templatePath + '").');
|
||||
}
|
||||
return 'file://' + templatePath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens the about application window for a specific window
|
||||
* @param {String} windowName - name of the window upon
|
||||
* which this window should show
|
||||
*/
|
||||
function openAboutWindow(windowName) {
|
||||
|
||||
// This prevents creating multiple instances of the
|
||||
// about window
|
||||
if (aboutWindow) {
|
||||
if (aboutWindow.isMinimized()) {
|
||||
aboutWindow.restore();
|
||||
}
|
||||
aboutWindow.focus();
|
||||
return;
|
||||
}
|
||||
let allWindows = BrowserWindow.getAllWindows();
|
||||
allWindows = allWindows.find((window) => { return window.winName === windowName });
|
||||
|
||||
// if we couldn't find any window matching the window name
|
||||
// it will render as a new window
|
||||
if (allWindows) {
|
||||
windowConfig.parent = allWindows;
|
||||
}
|
||||
|
||||
aboutWindow = new BrowserWindow(windowConfig);
|
||||
aboutWindow.setVisibleOnAllWorkspaces(true);
|
||||
aboutWindow.loadURL(getTemplatePath());
|
||||
|
||||
aboutWindow.once('ready-to-show', () => {
|
||||
aboutWindow.show();
|
||||
});
|
||||
|
||||
aboutWindow.on('close', () => {
|
||||
destroyWindow();
|
||||
});
|
||||
|
||||
aboutWindow.on('closed', () => {
|
||||
destroyWindow();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroys a window
|
||||
*/
|
||||
function destroyWindow() {
|
||||
aboutWindow = null;
|
||||
}
|
||||
|
||||
|
||||
module.exports = {
|
||||
openAboutWindow: openAboutWindow
|
||||
};
|
21
js/aboutApp/renderer.js
Normal file
21
js/aboutApp/renderer.js
Normal file
@ -0,0 +1,21 @@
|
||||
'use strict';
|
||||
const { remote } = require('electron');
|
||||
|
||||
renderDom();
|
||||
|
||||
/**
|
||||
* Method that renders application data
|
||||
*/
|
||||
function renderDom() {
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const applicationName = remote.app.getName() || 'Symphony';
|
||||
const version = remote.app.getVersion();
|
||||
let appName = document.getElementById('app-name');
|
||||
let versionText = document.getElementById('version');
|
||||
let copyright = document.getElementById('copyright');
|
||||
|
||||
appName.innerHTML = applicationName;
|
||||
versionText.innerHTML = version ? `Version ${version} (${version})` : null;
|
||||
copyright.innerHTML = `Copyright © ${new Date().getFullYear()} ${applicationName}`
|
||||
});
|
||||
}
|
BIN
js/aboutApp/symphony-logo.png
Normal file
BIN
js/aboutApp/symphony-logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.1 KiB |
@ -56,9 +56,10 @@ function showInFinder(id) {
|
||||
function createDOM(arg) {
|
||||
|
||||
if (arg && arg._id) {
|
||||
let fileDisplayName = getFileDisplayName(arg.fileName);
|
||||
let downloadItemKey = arg._id;
|
||||
|
||||
local.downloadItems.push(arg);
|
||||
let downloadItemKey = arg._id;
|
||||
|
||||
let ul = document.getElementById('download-main');
|
||||
if (ul) {
|
||||
@ -108,7 +109,8 @@ function createDOM(arg) {
|
||||
|
||||
let h2FileName = document.createElement('h2');
|
||||
h2FileName.classList.add('text-cutoff');
|
||||
h2FileName.innerHTML = arg.fileName;
|
||||
h2FileName.innerHTML = fileDisplayName;
|
||||
h2FileName.title = fileDisplayName;
|
||||
fileNameDiv.appendChild(h2FileName);
|
||||
|
||||
let fileProgressTitle = document.createElement('span');
|
||||
@ -194,4 +196,33 @@ function initiate() {
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a file display name for the download item
|
||||
*/
|
||||
function getFileDisplayName(fileName) {
|
||||
let fileList = local.downloadItems;
|
||||
let fileNameCount = 0;
|
||||
let fileDisplayName = fileName;
|
||||
|
||||
/* Check if a file with the same name exists
|
||||
* (akin to the user downloading a file with the same name again)
|
||||
* in the download bar
|
||||
*/
|
||||
for (let i = 0; i < fileList.length; i++) {
|
||||
if (fileName === fileList[i].fileName) {
|
||||
fileNameCount++;
|
||||
}
|
||||
}
|
||||
|
||||
/* If it exists, add a count to the name like how Chrome does */
|
||||
if (fileNameCount) {
|
||||
let extLastIndex = fileDisplayName.lastIndexOf('.');
|
||||
let fileCount = ' (' + fileNameCount + ')';
|
||||
|
||||
fileDisplayName = fileDisplayName.slice(0, extLastIndex) + fileCount + fileDisplayName.slice(extLastIndex);
|
||||
}
|
||||
|
||||
return fileDisplayName;
|
||||
}
|
@ -3,6 +3,7 @@
|
||||
// Third Party Dependencies
|
||||
const electron = require('electron');
|
||||
const app = electron.app;
|
||||
const crashReporter = electron.crashReporter;
|
||||
const nodeURL = require('url');
|
||||
const squirrelStartup = require('electron-squirrel-startup');
|
||||
const AutoLaunch = require('auto-launch');
|
||||
@ -31,6 +32,8 @@ require('./memoryMonitor.js');
|
||||
|
||||
const windowMgr = require('./windowMgr.js');
|
||||
|
||||
crashReporter.start({companyName: 'Symphony', submitURL: 'http://localhost:3000', uploadToServer: false, extra: {'process': 'main'}});
|
||||
|
||||
// only allow a single instance of app.
|
||||
const shouldQuit = app.makeSingleInstance((argv) => {
|
||||
// Someone tried to run a second instance, we should focus our window.
|
||||
|
@ -7,6 +7,7 @@ const isMac = require('../utils/misc.js').isMac;
|
||||
const log = require('../log.js');
|
||||
const logLevels = require('../enums/logLevels.js');
|
||||
const eventEmitter = require('../eventEmitter');
|
||||
const aboutApp = require('../aboutApp');
|
||||
|
||||
let minimizeOnClose = false;
|
||||
let launchOnStartup = false;
|
||||
@ -65,6 +66,13 @@ const template = [{
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Open Crashes Directory',
|
||||
click() {
|
||||
const crashesDirectory = electron.crashReporter.getCrashesDirectory() + '/completed';
|
||||
electron.shell.showItemInFolder(crashesDirectory);
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
@ -97,10 +105,11 @@ const template = [{
|
||||
},
|
||||
{
|
||||
role: 'help',
|
||||
submenu: [{
|
||||
label: 'Learn More',
|
||||
click() { electron.shell.openExternal('https://www.symphony.com'); }
|
||||
}]
|
||||
submenu: [
|
||||
{
|
||||
label: 'Learn More',
|
||||
click() { electron.shell.openExternal('https://www.symphony.com'); }
|
||||
}]
|
||||
}
|
||||
];
|
||||
|
||||
@ -238,6 +247,15 @@ function getTemplate(app) {
|
||||
app.quit();
|
||||
}
|
||||
});
|
||||
|
||||
// This adds About Symphony under help menu for windows
|
||||
template[3].submenu.push({
|
||||
label: 'About Symphony',
|
||||
click(focusedWindow) {
|
||||
let windowName = focusedWindow ? focusedWindow.name : '';
|
||||
aboutApp.openAboutWindow(windowName);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return template;
|
||||
|
@ -11,7 +11,7 @@
|
||||
// also to bring pieces of node.js:
|
||||
// https://github.com/electron/electron/issues/2984
|
||||
//
|
||||
const { ipcRenderer, remote } = require('electron');
|
||||
const { ipcRenderer, remote, crashReporter } = require('electron');
|
||||
|
||||
const throttle = require('../utils/throttle.js');
|
||||
const apiEnums = require('../enums/api.js');
|
||||
@ -26,6 +26,13 @@ require('../downloadManager');
|
||||
// so loading the spellchecker in try catch so that we don't
|
||||
// block other method from loading
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
loadSpellChecker();
|
||||
});
|
||||
|
||||
/**
|
||||
* Loads up the spell checker module
|
||||
*/
|
||||
function loadSpellChecker() {
|
||||
try {
|
||||
/* eslint-disable global-require */
|
||||
const SpellCheckerHelper = require('../spellChecker').SpellCheckHelper;
|
||||
@ -38,7 +45,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
console.error('unable to load the spell checker module, hence, skipping the spell check feature ' + err);
|
||||
/* eslint-enable no-console */
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// hold ref so doesn't get GC'ed
|
||||
const local = {
|
||||
@ -53,6 +60,7 @@ const throttledSetBadgeCount = throttle(1000, function(count) {
|
||||
});
|
||||
});
|
||||
|
||||
crashReporter.start({companyName: 'Symphony', submitURL: 'http://localhost:3000', uploadToServer: false, extra: {'process': 'preload script / renderer'}});
|
||||
createAPI();
|
||||
|
||||
// creates API exposed from electron.
|
||||
@ -109,6 +117,19 @@ function createAPI() {
|
||||
*/
|
||||
ScreenSnippet: remote.require('./screenSnippet/index.js').ScreenSnippet,
|
||||
|
||||
/**
|
||||
* Provides API to crash the renderer process that calls this function
|
||||
* Is only used for demos.
|
||||
*/
|
||||
crashRendererProcess: function () {
|
||||
// For practical purposes, we don't allow
|
||||
// this method to work in non-dev environments
|
||||
if (!process.env.ELECTRON_DEV) {
|
||||
return;
|
||||
}
|
||||
process.crash();
|
||||
},
|
||||
|
||||
/**
|
||||
* Brings window forward and gives focus.
|
||||
* @param {String} windowName Name of window. Note: main window name is 'main'
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
const electron = require('electron');
|
||||
const app = electron.app;
|
||||
const crashReporter = electron.crashReporter;
|
||||
const BrowserWindow = electron.BrowserWindow;
|
||||
const path = require('path');
|
||||
const nodeURL = require('url');
|
||||
@ -16,7 +17,6 @@ const log = require('./log.js');
|
||||
const logLevels = require('./enums/logLevels.js');
|
||||
const notify = require('./notify/electron-notify.js');
|
||||
const eventEmitter = require('./eventEmitter');
|
||||
|
||||
const throttle = require('./utils/throttle.js');
|
||||
const { getConfigField, updateConfigField } = require('./config.js');
|
||||
const { isMac, isNodeEnv } = require('./utils/misc');
|
||||
@ -81,7 +81,7 @@ function createMainWindow(initialUrl) {
|
||||
// failed, use default bounds
|
||||
doCreateMainWindow(initialUrl, null);
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -93,6 +93,7 @@ function doCreateMainWindow(initialUrl, initialBounds) {
|
||||
let url = initialUrl;
|
||||
let key = getGuid();
|
||||
|
||||
crashReporter.start({companyName: 'Symphony', submitURL: 'http://localhost:3000', uploadToServer: false, extra: {'process': 'renderer / main window'}});
|
||||
log.send(logLevels.INFO, 'creating main window url: ' + url);
|
||||
|
||||
let newWinOpts = {
|
||||
@ -180,6 +181,26 @@ function doCreateMainWindow(initialUrl, initialBounds) {
|
||||
loadErrors.showLoadFailure(mainWindow, validatedURL, errorDesc, errorCode, retry, false);
|
||||
});
|
||||
|
||||
// In case a renderer process crashes, provide an
|
||||
// option for the user to either reload or close the window
|
||||
mainWindow.webContents.on('crashed', function () {
|
||||
const options = {
|
||||
type: 'error',
|
||||
title: 'Renderer Process Crashed',
|
||||
message: 'Oops! Looks like we have had a crash. Please reload or close this window.',
|
||||
buttons: ['Reload', 'Close']
|
||||
};
|
||||
|
||||
electron.dialog.showMessageBox(options, function (index) {
|
||||
if (index === 0) {
|
||||
mainWindow.reload();
|
||||
}
|
||||
else {
|
||||
mainWindow.close();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
addWindowKey(key, mainWindow);
|
||||
mainWindow.loadURL(url);
|
||||
|
||||
@ -229,17 +250,7 @@ function doCreateMainWindow(initialUrl, initialBounds) {
|
||||
webContents.send('downloadCompleted', data);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// bug in electron is preventing this from working in sandboxed evt...
|
||||
// https://github.com/electron/electron/issues/8841
|
||||
mainWindow.webContents.on('will-navigate', function(event, willNavUrl) {
|
||||
if (!sandboxed) {
|
||||
return;
|
||||
}
|
||||
event.preventDefault();
|
||||
openUrlInDefaultBrower(willNavUrl);
|
||||
});
|
||||
});
|
||||
|
||||
// open external links in default browser - a tag with href='_blank' or window.open
|
||||
mainWindow.webContents.on('new-window', function (event, newWinUrl,
|
||||
@ -315,17 +326,63 @@ function doCreateMainWindow(initialUrl, initialBounds) {
|
||||
if (browserWin) {
|
||||
log.send(logLevels.INFO, 'loaded pop-out window url: ' + newWinParsedUrl);
|
||||
|
||||
crashReporter.start({companyName: 'Symphony', submitURL: 'http://localhost:3000', uploadToServer: false, extra: {'process': 'renderer / pop out window - winKey -> ' + newWinKey}});
|
||||
|
||||
browserWin.winName = frameName;
|
||||
browserWin.setAlwaysOnTop(alwaysOnTop);
|
||||
|
||||
browserWin.once('closed', function () {
|
||||
let handleChildWindowClosed = () => {
|
||||
removeWindowKey(newWinKey);
|
||||
browserWin.removeListener('move', throttledBoundsChange);
|
||||
browserWin.removeListener('resize', throttledBoundsChange);
|
||||
browserWin.removeListener('resize', throttledBoundsChange);
|
||||
};
|
||||
|
||||
browserWin.once('closed', () => {
|
||||
handleChildWindowClosed();
|
||||
});
|
||||
|
||||
browserWin.on('close', () => {
|
||||
browserWin.webContents.removeListener('new-window', handleChildNewWindowEvent);
|
||||
browserWin.webContents.removeListener('crashed', handleChildWindowCrashEvent);
|
||||
});
|
||||
|
||||
let handleChildWindowCrashEvent = () => {
|
||||
const options = {
|
||||
type: 'error',
|
||||
title: 'Renderer Process Crashed',
|
||||
message: 'Oops! Looks like we have had a crash. Please reload or close this window.',
|
||||
buttons: ['Reload', 'Close']
|
||||
};
|
||||
|
||||
electron.dialog.showMessageBox(options, function (index) {
|
||||
if (index === 0) {
|
||||
browserWin.reload();
|
||||
}
|
||||
else {
|
||||
browserWin.close();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
browserWin.webContents.on('crashed', handleChildWindowCrashEvent);
|
||||
|
||||
let handleChildNewWindowEvent = (childEvent, childWinUrl) => {
|
||||
childEvent.preventDefault();
|
||||
openUrlInDefaultBrowser(childWinUrl);
|
||||
};
|
||||
|
||||
// In case we navigate to an external link from inside a pop-out,
|
||||
// we open that link in an external browser rather than creating
|
||||
// a new window
|
||||
browserWin.webContents.on('new-window', handleChildNewWindowEvent);
|
||||
|
||||
addWindowKey(newWinKey, browserWin);
|
||||
|
||||
// Method that sends bound changes as soon
|
||||
// as a new window is created
|
||||
// issue https://perzoinc.atlassian.net/browse/ELECTRON-172
|
||||
sendChildWinBoundsChange(browserWin);
|
||||
|
||||
// throttle changes so we don't flood client.
|
||||
let throttledBoundsChange = throttle(1000,
|
||||
sendChildWinBoundsChange.bind(null, browserWin));
|
||||
@ -335,7 +392,7 @@ function doCreateMainWindow(initialUrl, initialBounds) {
|
||||
});
|
||||
} else {
|
||||
event.preventDefault();
|
||||
openUrlInDefaultBrower(newWinUrl)
|
||||
openUrlInDefaultBrowser(newWinUrl);
|
||||
}
|
||||
});
|
||||
|
||||
@ -431,7 +488,7 @@ function setIsOnline(status) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Tries finding a window we have created with given name. If founds then
|
||||
* Tries finding a window we have created with given name. If found, then
|
||||
* brings to front and gives focus.
|
||||
* @param {String} windowName Name of target window. Note: main window has
|
||||
* name 'main'.
|
||||
@ -477,8 +534,8 @@ function sendChildWinBoundsChange(window) {
|
||||
* Opens an external url in the system's default browser
|
||||
* @param urlToOpen
|
||||
*/
|
||||
function openUrlInDefaultBrower(urlToOpen) {
|
||||
if (urlToOpen) {
|
||||
function openUrlInDefaultBrowser(urlToOpen) {
|
||||
if (urlToOpen) {
|
||||
electron.shell.openExternal(urlToOpen);
|
||||
}
|
||||
}
|
||||
|
@ -76,7 +76,7 @@
|
||||
"devDependencies": {
|
||||
"browserify": "^14.1.0",
|
||||
"cross-env": "^3.2.4",
|
||||
"electron": "1.7.5",
|
||||
"electron": "1.7.8",
|
||||
"electron-builder": "^13.9.0",
|
||||
"electron-builder-squirrel-windows": "^12.3.0",
|
||||
"electron-packager": "^8.5.2",
|
||||
@ -99,7 +99,7 @@
|
||||
"auto-launch": "^5.0.1",
|
||||
"electron-dl": "^1.9.0",
|
||||
"electron-log": "^2.2.7",
|
||||
"electron-spellchecker": "^1.2.0",
|
||||
"electron-spellchecker": "^1.1.2",
|
||||
"electron-squirrel-startup": "^1.0.0",
|
||||
"filesize": "^3.5.10",
|
||||
"keymirror": "0.1.1",
|
||||
|
@ -10,18 +10,23 @@ describe('download manager', function() {
|
||||
});
|
||||
|
||||
it('should inject download bar element into DOM once download is initiated', function() {
|
||||
electron.ipcRenderer.send('downloadCompleted', { _id: '12345', fileName: 'test', total: 100 });
|
||||
expect(document.getElementsByClassName('text-cutoff')[0].innerHTML).toBe('test');
|
||||
electron.ipcRenderer.send('downloadCompleted', { _id: '12345', fileName: 'test.png', total: 100 });
|
||||
expect(document.getElementsByClassName('text-cutoff')[0].innerHTML).toBe('test.png');
|
||||
expect(document.getElementById('per').innerHTML).toBe('100 Downloaded');
|
||||
});
|
||||
|
||||
it('should inject multiple download items during multiple downloads', function() {
|
||||
electron.ipcRenderer.send('downloadCompleted', { _id: '12345', fileName: 'test', total: 100 });
|
||||
electron.ipcRenderer.send('downloadCompleted', { _id: '67890', fileName: 'test1', total: 200 });
|
||||
electron.ipcRenderer.send('downloadCompleted', { _id: '12345', fileName: 'test.png', total: 100 });
|
||||
electron.ipcRenderer.send('downloadCompleted', { _id: '67890', fileName: 'test.png', total: 200 });
|
||||
|
||||
let fileNames = document.getElementsByClassName('text-cutoff');
|
||||
expect(fileNames[0].innerHTML).toBe('test1');
|
||||
expect(fileNames[1].innerHTML).toBe('test');
|
||||
let fNames = [];
|
||||
|
||||
for (var i = 0; i < fileNames.length; i++) {
|
||||
fNames.push(fileNames[i].innerHTML);
|
||||
}
|
||||
|
||||
expect(fNames).toEqual(expect.arrayContaining(['test (1).png', 'test (2).png']));
|
||||
expect(document.getElementById('per').innerHTML).toBe('100 Downloaded');
|
||||
|
||||
let downloadElements = document.getElementsByClassName('download-element');
|
||||
|
Loading…
Reference in New Issue
Block a user