Skip to content

Commit 4f69a43

Browse files
tony19haoqunjiang
authored andcommitted
fix: prevent snoretoast shortcut, set notif title (#2720) (#6000)
This prevents SnoreToast from installing a Start Menu shortcut by specifying an appID. The appID is also used to set the notification's title bar text in Windows 10. That text is now set to "Vue UI", which replaces the default value of "SnoreToast". fixes #2720
1 parent ed2cf22 commit 4f69a43

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/@vue/cli-ui/apollo-server/util/notification.js

+8
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,16 @@ const builtinIcons = {
66
error: path.resolve(__dirname, '../../src/assets/error.png')
77
}
88

9+
// https://github.com/mikaelbr/node-notifier/issues/154
10+
// Specify appID to prevent SnoreToast shortcut installation.
11+
// SnoreToast actually uses it as the string in the notification's
12+
// title bar (different from title heading inside notification).
13+
// This only has an effect in Windows.
14+
const snoreToastOptions = notifier.Notification === notifier.WindowsToaster && { appID: 'Vue UI' }
15+
916
exports.notify = ({ title, message, icon }) => {
1017
notifier.notify({
18+
...snoreToastOptions,
1119
title,
1220
message,
1321
icon: builtinIcons[icon] || icon

0 commit comments

Comments
 (0)