mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-10-23 03:31:56 +00:00
https error handling in domain
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
window.location.href = 'https://' + data["domain"];
|
||||
} else {
|
||||
dialogs.prompt('Enter the URL for your Zulip server', function(url) {
|
||||
url = url.replace(/^https?:\/\//,'')
|
||||
db.push("/domain", url);
|
||||
window.location.href = 'https://' + url ;
|
||||
})
|
||||
|
@@ -11,7 +11,10 @@ function addDomain() {
|
||||
const ipcRenderer = require('electron').ipcRenderer;
|
||||
const JsonDB = require('node-json-db');
|
||||
const db = new JsonDB('domain', true, true);
|
||||
const newDomain = document.getElementById('url').value;
|
||||
let newDomain = document.getElementById('url').value;
|
||||
|
||||
newDomain = newDomain.replace(/^https?:\/\//,'')
|
||||
|
||||
const domain = 'https://' + newDomain;
|
||||
|
||||
document.getElementById('urladded').innerHTML = newDomain + ' Added';
|
||||
|
Reference in New Issue
Block a user