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

fix: prevent snoretoast shortcut, set notif title (#2720) #6000

Merged
merged 1 commit into from Nov 14, 2020
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 packages/@vue/cli-ui/apollo-server/util/notification.js
Expand Up @@ -6,8 +6,16 @@ const builtinIcons = {
error: path.resolve(__dirname, '../../src/assets/error.png')
}

// https://github.com/mikaelbr/node-notifier/issues/154
// Specify appID to prevent SnoreToast shortcut installation.
// SnoreToast actually uses it as the string in the notification's
// title bar (different from title heading inside notification).
// This only has an effect in Windows.
const snoreToastOptions = notifier.Notification === notifier.WindowsToaster && { appID: 'Vue UI' }
Copy link
Contributor Author

@tony19 tony19 Oct 24, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

notifier.Notification is set to WindowsToaster, which uses SnoreToast

I only set appID for SnoreToast to avoid any effects on other notifiers that might also have an appID parameter.


exports.notify = ({ title, message, icon }) => {
notifier.notify({
...snoreToastOptions,
title,
message,
icon: builtinIcons[icon] || icon
Expand Down