Skip to content

Commit

Permalink
some listener messages was wrong in dictation so I corrected it to do…
Browse files Browse the repository at this point in the history
… the event handling right
  • Loading branch information
devomid committed May 30, 2024
1 parent 0deb955 commit 7c7fd91
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"author": "Omid Azad",
"main": "src/start.js",
"name": "frontend",
"version": "2.1.1",
"version": "2.1.2",
"private": false,
"dependencies": {
"@emotion/react": "^11.11.4",
Expand Down
2 changes: 1 addition & 1 deletion src/dialogs/about.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const About = ({ open, setOpen }) => {
SSP Price Calculation Utility{'\n'}
created and developed by: Omid Azad{'\n'}
Date created: May 5th 2024{'\n'}
Ver 2.1.1
Ver 2.1.2
</Typography>
</Box>
</Box>
Expand Down
11 changes: 9 additions & 2 deletions src/dialogs/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,26 @@ const UpdateModal = ({open, setOpen}) => {
const [speed, setSpeed] = useState(0);

ipcRenderer.on('updateMsg', (event, message) => {
if (message.type === 'availaible'){
if (message.type === 'available'){
setText('ورژن شما به روز نیست. کمی صبر کنید تا بروزرسانی انجام شود')
}
});

ipcRenderer.on('updateMsg', (event, message) => {
if (message.type === 'notAvailable'){
if (message.type === 'notAvalable'){
setText('ورژن شما به روز است و احتیاجی به بروزرسانی نیست')
setTimeout(() => {
setOpen(false)
}, 1500);
}
});

ipcRenderer.on('updateMsg', (event, message) => {
if (message.type === 'success') {
setText('دانلود ورژن جدید با موفقیت انجام شد')
}
})


ipcRenderer.on('updateMsg', (event, message) => {
if (message.type === 'error'){
Expand Down
4 changes: 2 additions & 2 deletions src/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ autoUpdater.on("checking-for-update", () => {
})

autoUpdater.on("update-available", () => {
mainWindow.webContents.send('updateMsg', {type: 'availaible'})
mainWindow.webContents.send('updateMsg', {type: 'available'})
})

autoUpdater.on('update-not-available', () => {
mainWindow.webContents.send('updateMsg', {type: 'notAvailable'})
mainWindow.webContents.send('updateMsg', {type: 'notAvalable'})
})

autoUpdater.on('error', (err) => {
Expand Down

0 comments on commit 7c7fd91

Please sign in to comment.