Remove connection manager menu option.

Converse.js now includes a connection manager option on the login form so this option is not necessary.
This commit is contained in:
Keith Maika 2022-03-25 23:17:38 -04:00
parent 6b9910aa13
commit 2740bac95b
No known key found for this signature in database
GPG Key ID: F71740E8722C75F1
5 changed files with 5 additions and 28 deletions

View File

@ -9,7 +9,7 @@ converse.plugins.add('converse-desktop-credentials', {
api.listen.on('afterResourceBinding', () => {
if (_converse.connection.pass) {
credentials.addCredentials(
converse.connectionManager,
_converse.connection.service,
_converse.bare_jid,
_converse.connection.pass
);

View File

@ -33,7 +33,7 @@ function createWindow () {
}
// Create the browser window.
app.mainWindow = mainWindow = new BrowserWindow(mainWindowOptions)
mainWindow = new BrowserWindow(mainWindowOptions)
mainWindow.maximize();
// Init tray

View File

@ -3,7 +3,6 @@
*/
const {app, Menu, MenuItem, BrowserWindow} = require('electron')
const settingsService = require(__dirname + '/../modules/settings-service')
const prompt = require('electron-prompt');
const menuService = {}
@ -32,26 +31,6 @@ menuService.createMenu = () => {
settingsService.set('minimizeOnClose', converse.getMenuItemById('minimize-on-close').checked);
}
},
{
label: 'Connection Manager...',
click: () => {
let currentValue = settingsService.get('connectionManager') || '';
prompt({
title: 'Connection manager'
, label: 'Connection manager URL:'
, value: currentValue
, resizable: true
, width: 620
, height: 180
}, app.mainWindow).then(function (newValue) {
if (newValue !== null && newValue !== currentValue) {
settingsService.set('connectionManager', newValue === '' ? null : newValue);
app.mainWindow.reload()
}
}).catch(function (ex) {
});
}
},
{
type: 'separator',
},

View File

@ -29,12 +29,11 @@
"eslint": "^8.4.1"
},
"dependencies": {
"converse.js": "conversejs/converse.js#cb0b176",
"converse.js": "conversejs/converse.js#d570b60",
"electron-settings": "^4.0.2",
"github-buttons": "^2.8.0",
"keytar": "^7.3.0",
"open-iconic": "^1.1.1",
"electron-prompt": "^1.7.0"
"open-iconic": "^1.1.1"
},
"build": {
"appId": "com.denry.converse-desktop",

View File

@ -7,8 +7,6 @@ async function initialize () {
let websocket_url, bosh_service_url;
const { connectionManager, login, password } = await getCredentials()
converse.connectionManager = connectionManager;
if (connectionManager?.startsWith('ws')) {
websocket_url = connectionManager
} else if (connectionManager?.startsWith('http')) {
@ -41,6 +39,7 @@ async function initialize () {
view_mode: 'fullscreen',
websocket_url,
whitelisted_plugins: ['converse-debug', 'converse-desktop-credentials', 'converse-desktop-trayicon'],
show_connection_url_input: true
});
}