diff --git a/electron/changelog.json b/electron/changelog.json index ee1ca42..fe67944 100644 --- a/electron/changelog.json +++ b/electron/changelog.json @@ -133,5 +133,10 @@ "title": "Release Notes for 1.1.6", "date": "10/13/2023", "notes": "New Feature:\r\n- Added live support chat." + }, + "1.1.7": { + "title": "Release Notes for 1.1.7", + "date": "10/19/2023", + "notes": "Bug Fixes:\r\n- Minor bug fixes and improvements." } } diff --git a/electron/ipc-main-handler.js b/electron/ipc-main-handler.js index 9a73250..058214c 100644 --- a/electron/ipc-main-handler.js +++ b/electron/ipc-main-handler.js @@ -1,4 +1,4 @@ -const { ipcMain, app: electronApp } = require("electron"); +const { ipcMain, app: electronApp, app } = require("electron"); const { default: ipcTypes } = require("../src/ipc.types"); const { store } = require("./electron-store"); @@ -63,3 +63,7 @@ ipcMain.on(ipcTypes.app.toMain.log.warn, (event, ...obj) => { ipcMain.on(ipcTypes.app.toMain.log.error, (event, ...obj) => { log.error(obj); }); + +ipcMain.on(ipcTypes.app.toMain.getAppVersion, (event, obj) => { + event.sender.send(ipcTypes.app.toRenderer.appVersion, app.getVersion()); +}); diff --git a/electron/main.js b/electron/main.js index 4bd0671..d31606c 100644 --- a/electron/main.js +++ b/electron/main.js @@ -271,7 +271,7 @@ function createTray() { mainWindow.show(); mainWindow.maximize(); }); - appIcon.setToolTip("ImEX RPS"); + appIcon.setToolTip(`ImEX RPS ${app.getVersion()}`); appIcon.setContextMenu(contextMenu); return appIcon; } diff --git a/package.json b/package.json index 431eaa3..a318525 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "productName": "ImEX RPS", "author": "ImEX Systems Inc. ", "description": "ImEX RPS", - "version": "1.1.6", + "version": "1.1.7", "main": "electron/main.js", "homepage": "./", "dependencies": { diff --git a/src/ipc.types.js b/src/ipc.types.js index 943b3ac..8fb41a4 100644 --- a/src/ipc.types.js +++ b/src/ipc.types.js @@ -13,7 +13,8 @@ exports.default = { downloadUpdates: "app_downloadUpdates", installUpdates: "app_installupdates", getReleaseNotes: "app_getReleaseNotes", - importJob:"app_importJob", + getAppVersion: "app_getApVersion", + importJob: "app_importJob", log: { info: "app_logInfo", debug: "app_logDebug", @@ -27,6 +28,7 @@ exports.default = { downloadProgress: "app_downloadProgress", signOut: "app_signOut", setReleaseNotes: "app_setReleaseNotes", + appVersion: "app_appVersion", }, }, store: { diff --git a/src/ipc/ipc-renderer-handler.js b/src/ipc/ipc-renderer-handler.js index 74ba9a7..c668530 100644 --- a/src/ipc/ipc-renderer-handler.js +++ b/src/ipc/ipc-renderer-handler.js @@ -7,10 +7,10 @@ import { setWatchedPaths, setWatcherStatus, } from "../redux/application/application.actions"; -import { store } from "../redux/store"; -import { GetR4PDateWithClaim, UpsertEstimate } from "./ipc-estimate-utils"; import { setScanEstimateList } from "../redux/scan/scan.actions"; +import { store } from "../redux/store"; import { signOutStart } from "../redux/user/user.actions"; +import { GetR4PDateWithClaim, UpsertEstimate } from "./ipc-estimate-utils"; const { ipcRenderer } = window; console.log("----Initializing IPC Listeners in React App."); @@ -100,3 +100,14 @@ ipcRenderer.on( store.dispatch(setReleaseNotes(releaseNotes)); } ); + +ipcRenderer.on( + ipcTypes.default.app.toRenderer.appVersion, + async (event, appversion) => { + window.$crisp.push([ + "set", + "session:data", + [[["rps-version", appversion]]], + ]); + } +); diff --git a/src/redux/user/user.sagas.js b/src/redux/user/user.sagas.js index 24bf2fc..24c14b5 100644 --- a/src/redux/user/user.sagas.js +++ b/src/redux/user/user.sagas.js @@ -1,17 +1,18 @@ import { message } from "antd"; import moment from "moment"; //import LogRocket from "logrocket"; +import * as Sentry from "@sentry/electron"; import { all, call, delay, put, takeLatest } from "redux-saga/effects"; import { auth, getCurrentUser, updateCurrentUser, } from "../../firebase/firebase.utils"; +import client from "../../graphql/GraphQLClient"; import { QUERY_BODYSHOP, QUERY_NOTIFICATIONS, } from "../../graphql/bodyshop.queries"; -import client from "../../graphql/GraphQLClient"; import { UPSERT_USER } from "../../graphql/user.queries"; import ipcTypes from "../../ipc.types"; import { @@ -29,7 +30,6 @@ import { updateUserDetailsSuccess, } from "./user.actions"; import UserActionTypes from "./user.types"; -import * as Sentry from "@sentry/electron"; const { ipcRenderer } = window; @@ -164,8 +164,9 @@ export function* signInSuccessSaga({ payload }) { "user:nickname", [payload.displayName || payload.email], ]); - + window.$crisp.push(["set", "user:email", [payload.email]]); window.$crisp.push(["set", "session:segments", [["rps-user"]]]); + ipcRenderer.send(ipcTypes.default.app.toMain.getAppVersion); Sentry.setUser({ email: payload.email,