Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: notify query execute successfully when app is not focused. #1855

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions apps/studio/src/components/TabQueryEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1100,6 +1100,14 @@
const queryStartTime = new Date()
const results = await this.runningQuery.execute()
const queryEndTime = new Date()

// https://github.com/beekeeper-studio/beekeeper-studio/issues/1435
if (!document.hasFocus() && window.Notification && Notification.permission === "granted") {
new window.Notification("Query Complete", {
body: `${this.tab.title} has been executed successfully.`,
});
}

// eslint-disable-next-line
// @ts-ignore
this.executeTime = queryEndTime - queryStartTime
Expand Down