mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-10-24 16:43:38 +00:00
fixed error handling for domain
This commit is contained in:
@@ -12,13 +12,13 @@ let tray = null;
|
|||||||
let aboutWindow;
|
let aboutWindow;
|
||||||
let domainWindow;
|
let domainWindow;
|
||||||
|
|
||||||
|
const iconPath = path.join(__dirname, '../resources', 'Icon.png');
|
||||||
|
|
||||||
exports.create = win => {
|
exports.create = win => {
|
||||||
if (process.platform === 'darwin' || tray) {
|
if (process.platform === 'darwin' || tray) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const iconPath = path.join(__dirname, '../resources', 'Icon.png');
|
|
||||||
|
|
||||||
const toggleWin = () => {
|
const toggleWin = () => {
|
||||||
if (win.isVisible()) {
|
if (win.isVisible()) {
|
||||||
win.hide();
|
win.hide();
|
||||||
|
|||||||
@@ -9,9 +9,9 @@
|
|||||||
window.location.href = 'https://' + data["domain"];
|
window.location.href = 'https://' + data["domain"];
|
||||||
} else {
|
} else {
|
||||||
dialogs.prompt('Enter the URL for your Zulip server', function(url) {
|
dialogs.prompt('Enter the URL for your Zulip server', function(url) {
|
||||||
url = url.replace(/^https?:\/\//,'')
|
newurl = url.replace(/^https?:\/\//,'')
|
||||||
db.push("/domain", url);
|
db.push("/domain", newurl);
|
||||||
window.location.href = 'https://' + url ;
|
window.location.href = 'https://' + newurl ;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user