Skip to content

Commit 3e2d228

Browse files
authored
feat: UI polish and fixes (#952)
1 parent ed773de commit 3e2d228

26 files changed

Lines changed: 787 additions & 716 deletions

.env.example

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,3 @@ APPLE_CODESIGN_KEYCHAIN_PASSWORD="xxx"
1010
VITE_POSTHOG_API_KEY=xxx
1111
VITE_POSTHOG_API_HOST=xxx
1212
VITE_POSTHOG_UI_HOST=xxx
13-
14-
# PostHog Survey IDs (optional)
15-
VITE_POSTHOG_BUG_SURVEY_ID=
16-
VITE_POSTHOG_FEEDBACK_SURVEY_ID=

apps/twig/src/main/services/updates/schemas.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,12 @@ export type UpdatesStatusPayload = {
3535
error?: string;
3636
};
3737

38+
export type UpdateReadyPayload = {
39+
version: string | null;
40+
};
41+
3842
export interface UpdatesEvents {
39-
[UpdatesEvent.Ready]: true;
43+
[UpdatesEvent.Ready]: UpdateReadyPayload;
4044
[UpdatesEvent.Status]: UpdatesStatusPayload;
4145
[UpdatesEvent.CheckFromMenu]: true;
4246
}

apps/twig/src/main/services/updates/service.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ describe("UpdatesService", () => {
451451
downloadedHandler({}, "Release notes here", "v2.0.0");
452452
}
453453

454-
expect(readyHandler).toHaveBeenCalledWith(true);
454+
expect(readyHandler).toHaveBeenCalledWith({ version: "v2.0.0" });
455455
});
456456

457457
it("handles error event and emits status with error", () => {

apps/twig/src/main/services/updates/service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ export class UpdatesService extends TypedEventEmitter<UpdatesEvents> {
237237
log.info("Notifying user that update is ready", {
238238
downloadedVersion: this.downloadedVersion,
239239
});
240-
this.emit(UpdatesEvent.Ready, true);
240+
this.emit(UpdatesEvent.Ready, { version: this.downloadedVersion });
241241
this.pendingNotification = false;
242242
}
243243
}

apps/twig/src/renderer/components/CampfireToggle.tsx

Lines changed: 0 additions & 22 deletions
This file was deleted.

apps/twig/src/renderer/components/FeedbackToggle.tsx

Lines changed: 0 additions & 52 deletions
This file was deleted.

apps/twig/src/renderer/components/KeyboardShortcutsSheet.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
getShortcutsByCategory,
66
type ShortcutCategory,
77
} from "@renderer/constants/keyboard-shortcuts";
8+
import { isMac } from "@utils/platform";
89
import { useMemo } from "react";
910

1011
interface KeyboardShortcutsSheetProps {
@@ -134,8 +135,6 @@ export function KeyboardShortcutsList() {
134135

135136
function SingleShortcutKeys({ keys }: { keys: string }) {
136137
const formatted = formatHotkey(keys);
137-
const isMac =
138-
typeof navigator !== "undefined" && /Mac/.test(navigator.platform);
139138

140139
if (isMac) {
141140
return (

apps/twig/src/renderer/components/SettingsToggle.tsx

Lines changed: 0 additions & 23 deletions
This file was deleted.

apps/twig/src/renderer/components/StatusBar.tsx

Lines changed: 0 additions & 55 deletions
This file was deleted.

apps/twig/src/renderer/components/StatusBarMenu.tsx

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)