Skip to content

Commit abfc808

Browse files
Neel ShanmugamNeel Shanmugam
Neel Shanmugam
authored and
Neel Shanmugam
committed
added changes back
1 parent 26123f7 commit abfc808

File tree

5 files changed

+50
-67
lines changed

5 files changed

+50
-67
lines changed

Diff for: README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ The application uses unidentifiable global keyboard shortcuts that won't be dete
9090
1. Clone the repository:
9191

9292
```bash
93-
git clone https://github.com/ibttf/interview-coder-frontend.git
94-
cd interview-coder-frontend
93+
git clone https://github.com/ibttf/interview-coder.git
94+
cd interview-coder
9595
```
9696

9797
2. Install dependencies:

Diff for: dist/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"
99
rel="stylesheet"
1010
/>
11-
<script type="module" crossorigin src="./assets/main-D8gMM1NL.js"></script>
12-
<link rel="stylesheet" crossorigin href="./assets/main-Doq6FR1q.css">
11+
<script type="module" crossorigin src="./assets/main-2QmFps01.js"></script>
12+
<link rel="stylesheet" crossorigin href="./assets/main-Co4UhaGe.css">
1313
</head>
1414
<body>
1515
<div id="root"></div>

Diff for: electron/autoUpdater.ts

+32-42
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,50 @@
11
import { autoUpdater } from "electron-updater"
2-
import { app, dialog } from "electron"
3-
import log from "electron-log"
2+
import { BrowserWindow, ipcMain } from "electron"
43

54
export function initAutoUpdater() {
6-
// Configure logging
7-
log.transports.file.level = "info"
8-
autoUpdater.logger = log
5+
// Configure auto updater
6+
autoUpdater.autoDownload = false
7+
autoUpdater.autoInstallOnAppQuit = true
98

10-
// Check for updates immediately when app starts
9+
// Check for updates immediately
1110
autoUpdater.checkForUpdates()
1211

13-
// Check for updates every 30 minutes
12+
// Set up update checking interval (every 1 hour)
1413
setInterval(() => {
1514
autoUpdater.checkForUpdates()
16-
}, 30 * 60 * 1000)
15+
}, 60 * 60 * 1000)
1716

18-
// Listen for update available
17+
// Event handlers
1918
autoUpdater.on("update-available", (info) => {
20-
dialog
21-
.showMessageBox({
22-
type: "info",
23-
title: "Update Available",
24-
message: `A new version (${info.version}) is available. Would you like to update now?`,
25-
buttons: ["Yes", "No"],
26-
defaultId: 0,
27-
cancelId: 1
28-
})
29-
.then(({ response }) => {
30-
if (response === 0) {
31-
autoUpdater.downloadUpdate()
32-
}
33-
})
19+
// Notify renderer process about available update
20+
BrowserWindow.getAllWindows().forEach((window) => {
21+
window.webContents.send("update-available", info)
22+
})
3423
})
3524

36-
// Listen for update downloaded
3725
autoUpdater.on("update-downloaded", (info) => {
38-
dialog
39-
.showMessageBox({
40-
type: "info",
41-
title: "Update Ready",
42-
message: `Version ${info.version} has been downloaded. The application will now restart to install the update.`,
43-
buttons: ["Okay"],
44-
defaultId: 0
45-
})
46-
.then(() => {
47-
autoUpdater.quitAndInstall(false, true)
48-
})
26+
// Notify renderer process that update is ready to install
27+
BrowserWindow.getAllWindows().forEach((window) => {
28+
window.webContents.send("update-downloaded", info)
29+
})
4930
})
5031

51-
// Handle errors
5232
autoUpdater.on("error", (err) => {
53-
log.error("AutoUpdater error:", err)
54-
dialog.showErrorBox(
55-
"Update Error",
56-
"An error occurred while updating the application. " +
57-
"Please try again later or download the latest version manually."
58-
)
33+
console.error("Auto updater error:", err)
34+
})
35+
36+
// Handle IPC messages from renderer
37+
ipcMain.handle("start-update", async () => {
38+
try {
39+
await autoUpdater.downloadUpdate()
40+
return { success: true }
41+
} catch (error) {
42+
console.error("Failed to start update:", error)
43+
return { success: false, error: error.message }
44+
}
45+
})
46+
47+
ipcMain.handle("install-update", () => {
48+
autoUpdater.quitAndInstall()
5949
})
6050
}

Diff for: package.json

+12-20
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"watch": "tsc -p electron/tsconfig.json --watch"
1414
},
1515
"build": {
16-
"appId": "com.electron.interview-coder",
16+
"appId": "interview.coder.id",
1717
"productName": "Interview Coder",
1818
"files": [
1919
"dist/**/*",
@@ -26,12 +26,10 @@
2626
"buildResources": "assets"
2727
},
2828
"mac": {
29-
"category": "public.app-category.utilities",
29+
"category": "public.app-category.developer-tools",
3030
"target": [
31-
{
32-
"target": "dmg",
33-
"arch": "universal"
34-
}
31+
"dmg",
32+
"zip"
3533
],
3634
"icon": "assets/icons/mac/icon.icns",
3735
"hardenedRuntime": true,
@@ -41,32 +39,26 @@
4139
},
4240
"win": {
4341
"target": [
44-
"nsis",
45-
"portable"
42+
"nsis"
4643
],
4744
"icon": "assets/icons/win/icon.ico"
4845
},
4946
"linux": {
5047
"target": [
51-
"AppImage",
52-
"deb"
48+
"AppImage"
5349
],
5450
"icon": "assets/icons/png/icon-256x256.png"
5551
},
56-
"publish": [
57-
{
58-
"provider": "github",
59-
"owner": "ibttf",
60-
"repo": "interview-coder",
61-
"private": false,
62-
"releaseType": "release"
63-
}
64-
]
52+
"publish": {
53+
"provider": "github",
54+
"owner": "ibttf",
55+
"repo": "interview-coder"
56+
}
6557
},
6658
"keywords": [],
6759
"author": "",
6860
"license": "ISC",
69-
"description": "An invisibledesktop application to help you pass your technical interviews.",
61+
"description": "An invisible desktop application to help you pass your technical interviews.",
7062
"devDependencies": {
7163
"@types/color": "^4.2.0",
7264
"@types/diff": "^6.0.0",

Diff for: src/components/ApiKeyAuth.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ const ApiKeyAuth: React.FC<ApiKeyAuthProps> = ({ onApiKeySubmit }) => {
6464
</CardTitle>
6565
<CardDescription className="text-center text-gray-500">
6666
Please enter your OpenAI API key to continue. Your key will not be
67-
stored, so keep it in a safe place to copy it for next time.
67+
stored, so keep it in a safe place to copy it for next time. Press
68+
Cmd + B to hide/show the window.
6869
</CardDescription>
6970
</CardHeader>
7071
<CardContent>

0 commit comments

Comments
 (0)