Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions packages/@vue/cli-ui/apollo-server/util/notification.js
Original file line number Diff line number Diff line change
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