mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-27 01:11:13 -06:00
adds getVersionInfo api (#91)
* adds getVersionInfo api * fix mixed up names
This commit is contained in:
parent
a64053823b
commit
c851c7b886
@ -57,7 +57,13 @@
|
||||
<p>Get Media Sources:</p>
|
||||
<button id='get-sources'>get entire desktop</button>
|
||||
<br>
|
||||
<video id='video'/>
|
||||
<video id='video'></video>
|
||||
|
||||
<hr>
|
||||
<p>Get Version Info:</p>
|
||||
<button id='get-version'>get version info</button>
|
||||
<br>
|
||||
Version Info:<span id='info'></span>
|
||||
</body>
|
||||
<script>
|
||||
var notfEl = document.getElementById('notf');
|
||||
@ -187,6 +193,15 @@
|
||||
console.log(e)
|
||||
}
|
||||
|
||||
var getSources = document.getElementById('get-version');
|
||||
getSources.addEventListener('click', function() {
|
||||
ssf.getVersionInfo().then(function(verInfo) {
|
||||
var verEl = document.getElementById('info');
|
||||
verEl.innerText = '\napi ver=' + verInfo.apiVer +
|
||||
'\ncontainer identifier=' + verInfo.containerIdentifier +
|
||||
'\ncontainer ver=' + verInfo.containerVer
|
||||
})
|
||||
});
|
||||
|
||||
</script>
|
||||
</html>
|
||||
|
@ -58,8 +58,19 @@ function createAPI() {
|
||||
// API exposed to renderer process.
|
||||
//
|
||||
window.ssf = {
|
||||
// api version
|
||||
version: '1.0.0',
|
||||
getVersionInfo: function() {
|
||||
return new Promise(function(resolve) {
|
||||
var appName = remote.app.getName();
|
||||
var appVer = remote.app.getVersion();
|
||||
|
||||
const verInfo = {
|
||||
containerIdentifier: appName,
|
||||
containerVer: appVer,
|
||||
apiVer: '1.0.0'
|
||||
}
|
||||
resolve(verInfo);
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* sets the count on the tray icon to the given number.
|
||||
|
Loading…
Reference in New Issue
Block a user