Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 8.0 Beta #1205

Merged
merged 8 commits into from
Sep 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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