Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

Commit

Permalink
Changed error and success messages
Browse files Browse the repository at this point in the history
  • Loading branch information
iskaktoltay committed Oct 9, 2024
1 parent 6c01b69 commit 5eba7b2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions frontend/apps/desktop/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ ipcMain.on(

let success: {success: boolean; message: string} = {
success: true,
message: `Export successful at: ${filePath}`,
message: `Successfully exported documents to: ${filePath}.`,
}

for (const {title, markdown} of documents) {
Expand Down Expand Up @@ -280,7 +280,7 @@ ipcMain.on(
} catch (err) {
success = {
success: false,
message: `Error processing media files: ${err.message || err}`,
message: `Error processing media files: ${err.message || err}.`,
}
error('Error processing media files:', err)
}
Expand All @@ -293,7 +293,7 @@ ipcMain.on(
success: false,
message: `Error saving document "${title}": ${
err.message || err
}`,
}.`,
}
error('Error saving file:', err)
return
Expand All @@ -316,7 +316,7 @@ ipcMain.on(
} else {
event.sender.send('export-completed', {
success: false,
message: 'Export cancelled',
message: 'Export has been cancelled.',
})
}
},
Expand Down
8 changes: 4 additions & 4 deletions frontend/apps/desktop/src/save-markdown-file.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export async function saveMarkdownFile(
let updatedMarkdownContent = markdownContent
let success: {success: boolean; message: string} = {
success: true,
message: `Export successful at: ${filePath}`,
message: `Successfully exported documents to: ${filePath}.`,
}

const uploadMediaFile = ({
Expand Down Expand Up @@ -116,7 +116,7 @@ export async function saveMarkdownFile(
} catch (err) {
success = {
success: false,
message: `Error processing media files: ${err.message || err}`,
message: `Error processing media files: ${err.message || err}.`,
}
error('Error processing media files:', err)
}
Expand All @@ -127,7 +127,7 @@ export async function saveMarkdownFile(
if (err) {
success = {
success: false,
message: `Error saving document "${title}": ${err.message || err}`,
message: `Error saving document "${title}": ${err.message || err}.`,
}
error('Error saving file:', err)
return
Expand All @@ -148,7 +148,7 @@ export async function saveMarkdownFile(
} else {
event.sender.send('export-completed', {
success: false,
message: 'Export cancelled',
message: 'Export has been cancelled.',
})
}
}

0 comments on commit 5eba7b2

Please sign in to comment.