Skip to content

Commit

Permalink
Publish version v0.0.26 (#396)
Browse files Browse the repository at this point in the history
* Publish version v0.0.26

* Fix analytics preference
  • Loading branch information
Kitenite authored Sep 23, 2024
1 parent 090b275 commit ab181a5
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export enum MainChannels {
CLOSE_TUNNEL = 'close-tunnel',

// Analytics
ANLYTICS_PREF_SET = 'analytics-pref-set',
UPDATE_ANALYTICS_PREFERENCE = 'update-analytics-preference',
SEND_ANALYTICS = 'send-analytics',

// Ast
Expand Down
3 changes: 2 additions & 1 deletion app/electron/main/events/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import analytics from '../analytics';
import { MainChannels } from '/common/constants';

export function listenForAnalyticsMessages() {
ipcMain.on(MainChannels.ANLYTICS_PREF_SET, (e: Electron.IpcMainInvokeEvent, args) => {
ipcMain.on(MainChannels.UPDATE_ANALYTICS_PREFERENCE, (e: Electron.IpcMainInvokeEvent, args) => {
// TODO: Handle this in update user settings. Check for enabledAnalytics.
const analyticsPref = args as boolean;
analytics.toggleSetting(analyticsPref);
});
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"productName": "Onlook",
"name": "@onlook/onlook",
"version": "0.0.25",
"version": "0.0.26",
"homepage": "https://onlook.dev",
"main": "dist-electron/main/index.js",
"description": "The first-ever devtool for designers",
Expand Down
2 changes: 1 addition & 1 deletion app/src/components/Announcement/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function Announcement() {
function handleOpenChange(value: boolean) {
setOpen(false);
if (!value) {
window.api.send(MainChannels.ANLYTICS_PREF_SET, checked);
window.api.send(MainChannels.UPDATE_ANALYTICS_PREFERENCE, checked);
}
}

Expand Down
2 changes: 1 addition & 1 deletion app/src/routes/projects/SettingsTab/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default function SettingsTab() {
}

function updateAnalytics(enabled: boolean) {
window.api.invoke(MainChannels.UPDATE_USER_SETTINGS, { enableAnalytics: enabled });
window.api.send(MainChannels.UPDATE_ANALYTICS_PREFERENCE, enabled);
setIsAnalyticsEnabled(enabled);
}

Expand Down

0 comments on commit ab181a5

Please sign in to comment.