Skip to content

Commit

Permalink
Merge pull request #1653 from nextcloud/bugfix/noid/less-pushy-warning
Browse files Browse the repository at this point in the history
Less pushy warning
  • Loading branch information
nickvergessen authored Mar 25, 2019
2 parents 11f5a9d + 70e9554 commit 23f4c29
Show file tree
Hide file tree
Showing 15 changed files with 105 additions and 164 deletions.
46 changes: 14 additions & 32 deletions js/admin/allowed-groups.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/admin/allowed-groups.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions js/admin/commands.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/admin/commands.js.map

Large diffs are not rendered by default.

40 changes: 15 additions & 25 deletions js/admin/signaling-server.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/admin/signaling-server.js.map

Large diffs are not rendered by default.

40 changes: 15 additions & 25 deletions js/admin/stun-server.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/admin/stun-server.js.map

Large diffs are not rendered by default.

40 changes: 15 additions & 25 deletions js/admin/turn-server.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/admin/turn-server.js.map

Large diffs are not rendered by default.

11 changes: 1 addition & 10 deletions js/signaling.js
Original file line number Diff line number Diff line change
Expand Up @@ -557,16 +557,7 @@
}

var warning = t('spreed', 'Calls with more than 4 participants without an external signaling server can experience connectivity issues and cause high load on participating devices.');

var isHTML = false;
if (OC.isUserAdmin()) {
warning += "\n" + t('spreed', 'Set up an external signaling server for a better call experience.');

isHTML = true;
warning = '<a href="' + OC.generateUrl('settings/admin/talk') + '" target="_blank">' + warning + '</a>';
}

OC.Notification.showTemporary(warning, { timeout: 30, type: 'warning', isHTML: isHTML});
OC.Notification.showTemporary(warning, { timeout: 30, type: 'warning' });
};

OCA.Talk.Signaling.Internal.prototype._doLeaveRoom = function(token) {
Expand Down
46 changes: 23 additions & 23 deletions vue/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"crypto-js": "^3.1.9-1",
"debounce": "^1.2.0",
"nextcloud-axios": "^0.1.3",
"nextcloud-vue": "^0.9.2",
"nextcloud-vue": "^0.9.3",
"vue": "^2.6.10",
"vue-fragment": "^1.5.0"
},
Expand All @@ -26,7 +26,7 @@
],
"devDependencies": {
"@babel/core": "^7.4.0",
"@babel/preset-env": "^7.4.1",
"@babel/preset-env": "^7.4.2",
"babel-eslint": "^10.0.1",
"babel-loader": "^8.0.5",
"css-loader": "^2.1.1",
Expand Down
15 changes: 1 addition & 14 deletions vue/src/views/SignalingServers.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

<p class="settings-hint">
{{ t('spreed', 'An external signaling server should optionally be used for larger installations. Leave empty to use the internal signaling server.') }}
<span v-html="warningDescription" />
<span v-if="!servers.length">{{ t('spreed', 'Please note that calls with more than 4 participants without external signaling server, participants can experience connectivity issues and cause high load on participating devices.') }}</span>
</p>

<div v-if="!servers.length" class="signaling-warning">
Expand Down Expand Up @@ -94,19 +94,6 @@ export default {
}
},

computed: {
warningDescription() {
if (this.servers.length > 0) {
return ''
}

return t('spreed', 'Please note that calls with more than 4 participants without external signaling server, participants can experience connectivity issues and cause high load on participating devices. Learn more about external signaling and other benefits of the Nextcloud Talk High Performance Back-end on {link}.', {
link: '<a href="https://nextcloud.com/talk/" class="external" '
+ 'rel="noreferrer noopener" target="_blank">nextcloud.com/talk ↗</a>'
}, undefined, { escape: false })
}
},

beforeMount() {
const state = OCP.InitialState.loadState('talk', 'signaling_servers')
this.servers = state.servers
Expand Down
11 changes: 11 additions & 0 deletions vue/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,17 @@ module.exports = {
options: {
name: '[name].[ext]?[hash]'
}
},
{
/**
* Fixes lodash registering globally and therefore replacing server's underscore
*
* https://github.com/lodash/lodash/issues/1798#issuecomment-233804586
* https://github.com/webpack/webpack/issues/3017#issuecomment-285954512
*/
parser: {
amd: false
}
}
]
},
Expand Down

0 comments on commit 23f4c29

Please sign in to comment.