Skip to content

Commit

Permalink
Merge pull request #1205 from KhalisFoundation/dev
Browse files Browse the repository at this point in the history
Update 8.0 Beta
  • Loading branch information
maneetpaul authored Sep 21, 2020
2 parents 3d6c5d0 + 3cbcb79 commit 27cb32c
Show file tree
Hide file tree
Showing 17 changed files with 297 additions and 245 deletions.
5 changes: 4 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
"plugins": ["prettier"],
"rules": {
"no-mixed-operators": "off",
"prettier/prettier": ["error"]
"prettier/prettier": ["error"],
"import/prefer-default-export": "off",
"no-plusplus": "off",
"class-methods-use-this": "off"
},
"settings": {
"import/core-modules": "electron"
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
## New Updates

### 7.7 - _August 25, 2020_
### 8.0 - _September 22, 2020_

![](./assets/img/help_images/desktop-nirbaan.jpg)

### Improved:

- Added Zoom Overlay feature
- Added new Nirbaan theme
- Added font size controls in Bani Controller
- Updated Sundar Gutka icon
Expand Down
19 changes: 18 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const op = require('openport');
const i18n = require('i18next');
const i18nBackend = require('i18next-node-fs-backend');
const os = require('os');
const fetch = require('node-fetch');

// eslint-disable-next-line import/no-unresolved
const Store = require('./www/js/store.js');
Expand Down Expand Up @@ -331,7 +332,9 @@ function createBroadcastFiles(arg) {
}
}

const showLine = (line, socket = io) => {
let seq = Math.floor(Math.random() * 100);

const showLine = async (line, socket = io) => {
const overlayPrefs = store.get('obs');
const lineWithSettings = line;
lineWithSettings.languageSettings = {
Expand All @@ -343,6 +346,19 @@ const showLine = (line, socket = io) => {
if (!lineWithSettings.fromScroll) {
socket.emit('show-line', payload);
}
const zoomToken = store.get('userPrefs.app.zoomToken');
if (zoomToken) {
try {
await fetch(`${zoomToken}&seq=${seq}`, {
method: 'POST',
body: `${line.Line.Unicode}\n`,
});
seq += 1;
} catch (e) {
// TODO: zoom recommends retrying 4XX responses.
log(e);
}
}
};

const updateOverlayVars = () => {
Expand Down Expand Up @@ -420,6 +436,7 @@ app.on('ready', () => {

// Reset the global state
store.set('GlobalState', null);
store.set('userPrefs.app.zoomToken', '');

store.setUserPref('toolbar.language-settings', null);
if (!userId) {
Expand Down
Loading

0 comments on commit 27cb32c

Please sign in to comment.