|
6 | 6 | import * as vscode from 'vscode' |
7 | 7 | import { ResourceTreeDataProvider, TreeNode } from '../shared/treeview/resourceTreeDataProvider' |
8 | 8 | import { Command, Commands } from '../shared/vscode/commands2' |
9 | | -import { Icon, IconPath, getIcon } from '../shared/icons' |
| 9 | +import { Icon, getIcon } from '../shared/icons' |
10 | 10 | import { contextKey, setContext } from '../shared/vscode/setContext' |
11 | 11 | import { NotificationType, OnReceiveType, ToolkitNotification, getNotificationTelemetryId } from './types' |
12 | 12 | import { ToolkitError } from '../shared/errors' |
@@ -81,10 +81,13 @@ export class NotificationsNode implements TreeNode { |
81 | 81 |
|
82 | 82 | public getChildren() { |
83 | 83 | const buildNode = (n: ToolkitNotification, type: NotificationType) => { |
84 | | - const icon: Icon | IconPath = |
85 | | - type === 'startUp' |
86 | | - ? getIcon('vscode-question') |
87 | | - : { ...getIcon('vscode-alert'), color: new vscode.ThemeColor('errorForeground') } |
| 84 | + const icon: Icon = |
| 85 | + type === 'emergency' |
| 86 | + ? Object.assign(getIcon('vscode-alert') as Icon, { |
| 87 | + color: new vscode.ThemeColor('errorForeground'), |
| 88 | + }) |
| 89 | + : (getIcon('vscode-question') as Icon) |
| 90 | + |
88 | 91 | return this.openNotificationCmd.build(n).asTreeNode({ |
89 | 92 | label: n.uiRenderInstructions.content['en-US'].title, |
90 | 93 | iconPath: icon, |
|
0 commit comments