Compare commits

...

10 Commits

Author SHA1 Message Date
Anders Kaseorg
588d32fd22 release: New release v5.9.3.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-04-28 20:25:15 -07:00
Anders Kaseorg
1c471fe624 Upgrade dependencies, including Electron 18.2.0.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-04-28 20:06:46 -07:00
Anders Kaseorg
52486d687d Allow the autoupdater to quit the app normally.
Forcing it to quit would prematurely terminate the update on some
platforms.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-04-28 19:51:07 -07:00
Anders Kaseorg
73441d791c release: New release v5.9.2.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-04-20 21:23:00 -07:00
Anders Kaseorg
1bb6423721 Upgrade dependencies, including Electron 18.1.0.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-04-20 19:26:47 -07:00
Anders Kaseorg
d6775d64a3 release: New release v5.9.1.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-04-08 17:20:31 -07:00
Anders Kaseorg
e1326eae91 sentry: Update DSN.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-04-08 17:18:48 -07:00
Anders Kaseorg
b93955b28f Upgrade dependencies, including Electron 18.0.3.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-04-08 17:10:59 -07:00
Anders Kaseorg
e3452bda22 Simplify if (…) classList.add(…) else classList.remove(…) anti-pattern.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-04-02 14:34:58 -07:00
Anders Kaseorg
0aab691b44 Switch to released @electron/remote.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-04-01 21:04:51 -07:00
12 changed files with 689 additions and 514 deletions

View File

@@ -1,7 +1,6 @@
import {shell} from "electron/common"; import {shell} from "electron/common";
import {app, dialog, session} from "electron/main"; import {app, dialog, session} from "electron/main";
import process from "node:process"; import process from "node:process";
import util from "node:util";
import log from "electron-log"; import log from "electron-log";
import type {UpdateDownloadedEvent, UpdateInfo} from "electron-updater"; import type {UpdateDownloadedEvent, UpdateInfo} from "electron-updater";
@@ -11,7 +10,11 @@ import * as ConfigUtil from "../common/config-util";
import {linuxUpdateNotification} from "./linuxupdater"; // Required only in case of linux import {linuxUpdateNotification} from "./linuxupdater"; // Required only in case of linux
const sleep = util.promisify(setTimeout); let quitting = false;
export function shouldQuitForUpdate(): boolean {
return quitting;
}
export async function appUpdater(updateFromMenu = false): Promise<void> { export async function appUpdater(updateFromMenu = false): Promise<void> {
// Don't initiate auto-updates in development // Don't initiate auto-updates in development
@@ -104,10 +107,8 @@ Current Version: ${app.getVersion()}`,
detail: "It will be installed the next time you restart the application", detail: "It will be installed the next time you restart the application",
}); });
if (response === 0) { if (response === 0) {
await sleep(1000); quitting = true;
autoUpdater.quitAndInstall(); autoUpdater.quitAndInstall();
// Force app to quit. This is just a workaround, ideally autoUpdater.quitAndInstall() should relaunch the app.
app.quit();
} }
}); });
// Init for updates // Init for updates

View File

@@ -10,7 +10,7 @@ import * as ConfigUtil from "../common/config-util";
import type {RendererMessage} from "../common/typed-ipc"; import type {RendererMessage} from "../common/typed-ipc";
import type {MenuProps} from "../common/types"; import type {MenuProps} from "../common/types";
import {appUpdater} from "./autoupdater"; import {appUpdater, shouldQuitForUpdate} from "./autoupdater";
import * as BadgeSettings from "./badge-settings"; import * as BadgeSettings from "./badge-settings";
import handleExternalLink from "./handle-external-link"; import handleExternalLink from "./handle-external-link";
import * as AppMenu from "./menu"; import * as AppMenu from "./menu";
@@ -91,7 +91,7 @@ function createMainWindow(): BrowserWindow {
app.quit(); app.quit();
} }
if (!isQuitting) { if (!isQuitting && !shouldQuitForUpdate()) {
event.preventDefault(); event.preventDefault();
if (process.platform === "darwin") { if (process.platform === "darwin") {

View File

@@ -6,7 +6,7 @@ import {getConfigItem} from "../common/config-util";
export const sentryInit = (): void => { export const sentryInit = (): void => {
Sentry.init({ Sentry.init({
dsn: "https://628dc2f2864243a08ead72e63f94c7b1@sentry.io/204668", dsn: "https://628dc2f2864243a08ead72e63f94c7b1@o48127.ingest.sentry.io/204668",
// Don't report errors in development or if disabled by the user. // Don't report errors in development or if disabled by the user.
beforeSend: (event) => beforeSend: (event) =>

View File

@@ -59,13 +59,8 @@ export default class ServerTab extends Tab {
} }
updateBadge(count: number): void { updateBadge(count: number): void {
if (count > 0) { this.$badge.textContent = count > 999 ? "1K+" : count.toString();
const formattedCount = count > 999 ? "1K+" : count.toString(); this.$badge.classList.toggle("active", count > 0);
this.$badge.textContent = formattedCount;
this.$badge.classList.add("active");
} else {
this.$badge.classList.remove("active");
}
} }
generateShortcutText(): string { generateShortcutText(): string {

View File

@@ -206,11 +206,7 @@ export default class WebView {
} }
// To show or hide the loading indicator in the the active tab // To show or hide the loading indicator in the the active tab
if (this.loading) { this.$webviewsContainer.toggle("loaded", !this.loading);
this.$webviewsContainer.remove("loaded");
} else {
this.$webviewsContainer.add("loaded");
}
this.$el.classList.add("active"); this.$el.classList.add("active");
this.focus(); this.focus();
@@ -293,11 +289,7 @@ export default class WebView {
const $backButton = document.querySelector( const $backButton = document.querySelector(
"#actions-container #back-action", "#actions-container #back-action",
)!; )!;
if (this.getWebContents().canGoBack()) { $backButton.classList.toggle("disable", !this.getWebContents().canGoBack());
$backButton.classList.remove("disable");
} else {
$backButton.classList.add("disable");
}
} }
forward(): void { forward(): void {

View File

@@ -699,13 +699,8 @@ export class ServerManagerView {
} }
showLoading(loading: boolean): void { showLoading(loading: boolean): void {
if (!loading) { this.$reloadButton.classList.toggle("hidden", loading);
this.$reloadButton.removeAttribute("style"); this.$loadingIndicator.classList.toggle("hidden", !loading);
this.$loadingIndicator.style.display = "none";
} else if (loading) {
this.$reloadButton.style.display = "none";
this.$loadingIndicator.removeAttribute("style");
}
} }
async destroyTab(name: string, index: number): Promise<void> { async destroyTab(name: string, index: number): Promise<void> {
@@ -772,11 +767,7 @@ export class ServerManagerView {
} }
toggleSidebar(show: boolean): void { toggleSidebar(show: boolean): void {
if (show) { this.$sidebar.classList.toggle("sidebar-hide", !show);
this.$sidebar.classList.remove("sidebar-hide");
} else {
this.$sidebar.classList.add("sidebar-hide");
}
} }
// Toggles the dnd button icon. // Toggles the dnd button icon.

View File

@@ -58,10 +58,9 @@ export function initFindAccounts(props: FindAccountsProps): void {
}); });
$serverUrlField.addEventListener("input", () => { $serverUrlField.addEventListener("input", () => {
if ($serverUrlField.value) { $serverUrlField.classList.toggle(
$serverUrlField.classList.remove("invalid-input-value"); "invalid-input-value",
} else { $serverUrlField.value === "",
$serverUrlField.classList.add("invalid-input-value"); );
}
}); });
} }

View File

@@ -83,11 +83,7 @@ export function initNetworkSection({$root}: NetworkSectionProps): void {
}); });
function toggleManualProxySettings(option: boolean): void { function toggleManualProxySettings(option: boolean): void {
if (option) { $manualProxyBlock.classList.toggle("hidden", !option);
$manualProxyBlock.classList.remove("hidden");
} else {
$manualProxyBlock.classList.add("hidden");
}
} }
function updateProxyOption(): void { function updateProxyOption(): void {

View File

@@ -30,7 +30,7 @@
<i class="material-icons md-48">notifications</i> <i class="material-icons md-48">notifications</i>
<span id="dnd-tooltip" style="display: none">Do Not Disturb</span> <span id="dnd-tooltip" style="display: none">Do Not Disturb</span>
</div> </div>
<div class="action-button" id="reload-action"> <div class="action-button hidden" id="reload-action">
<i class="material-icons md-48">refresh</i> <i class="material-icons md-48">refresh</i>
<span id="reload-tooltip" style="display: none">Reload</span> <span id="reload-tooltip" style="display: none">Reload</span>
</div> </div>

View File

@@ -2,6 +2,29 @@
All notable changes to the Zulip desktop app are documented in this file. All notable changes to the Zulip desktop app are documented in this file.
### v5.9.3 --2022-04-28
**Fixes**:
- Fixed a bug in the automatic updater that would sometimes close the application instead of updating it.
(As with most updater fixes, this fix will take effect when updating _from_ 5.9.3. If you're having trouble updating _to_ 5.9.3, a workaround is to click **Install Later** rather than **Install and Relaunch**, then **Quit** from the menu bar and re-open the application manually.)
**Dependencies**:
- Upgraded all dependencies, including Electron 18.2.0.
### v5.9.2 --2022-04-20
**Dependencies**:
- Upgraded all dependencies, including Electron 18.1.0. This fixes an upstream Electron bug that crashed the application when accessibility tools such as screen readers and grammar assistants are in use.
### v5.9.1 --2022-04-08
**Dependencies**:
- Upgraded all dependencies, including Electron 18.0.3.
### v5.9.0 --2022-04-01 ### v5.9.0 --2022-04-01
**Fixes**: **Fixes**:

1104
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
{ {
"name": "zulip", "name": "zulip",
"productName": "Zulip", "productName": "Zulip",
"version": "5.9.0", "version": "5.9.3",
"main": "./app/main", "main": "./app/main",
"description": "Zulip Desktop App", "description": "Zulip Desktop App",
"license": "Apache-2.0", "license": "Apache-2.0",
@@ -146,14 +146,14 @@
"InstantMessaging" "InstantMessaging"
], ],
"dependencies": { "dependencies": {
"@electron/remote": "github:andersk/electron-remote#2.0.6-fixes", "@electron/remote": "^2.0.8",
"@sentry/electron": "^3.0.3", "@sentry/electron": "^3.0.3",
"@yaireo/tagify": "^4.5.0", "@yaireo/tagify": "^4.5.0",
"adm-zip": "^0.5.5", "adm-zip": "^0.5.5",
"auto-launch": "^5.0.5", "auto-launch": "^5.0.5",
"backoff": "^2.5.0", "backoff": "^2.5.0",
"electron-log": "^4.3.5", "electron-log": "^4.3.5",
"electron-updater": "^4.6.5", "electron-updater": "^5.0.1",
"electron-window-state": "^5.0.3", "electron-window-state": "^5.0.3",
"escape-goat": "^3.0.0", "escape-goat": "^3.0.0",
"get-stream": "^6.0.1", "get-stream": "^6.0.1",