@codingame/monaco-vscode-notifications-service-override 2.1.3 → 2.2.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/notifications.js +5 -7
- package/package.json +3 -4
- package/external/rollup-plugin-styles/dist/runtime/inject-css.js +0 -3
- package/vscode/src/vs/workbench/browser/parts/notifications/media/notificationsActions.css.js +0 -6
- package/vscode/src/vs/workbench/browser/parts/notifications/media/notificationsCenter.css.js +0 -6
- package/vscode/src/vs/workbench/browser/parts/notifications/media/notificationsList.css.js +0 -6
- package/vscode/src/vs/workbench/browser/parts/notifications/media/notificationsToasts.css.js +0 -6
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsActions.js +0 -215
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsAlerts.js +0 -75
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCenter.js +0 -309
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsList.js +0 -228
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsStatus.js +0 -220
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsToasts.js +0 -435
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsViewer.js +0 -438
package/notifications.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { NotificationsToasts } from '
|
|
1
|
+
import { NotificationsToasts } from 'vscode/vscode/vs/workbench/browser/parts/notifications/notificationsToasts';
|
|
2
2
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
3
3
|
import { NotificationService } from './vscode/src/vs/workbench/services/notification/common/notificationService.js';
|
|
4
4
|
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification';
|
|
5
5
|
import { getClientArea } from 'vscode/vscode/vs/base/browser/dom';
|
|
6
6
|
import { registerNotificationCommands } from 'vscode/vscode/vs/workbench/browser/parts/notifications/notificationsCommands';
|
|
7
7
|
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
8
|
-
import { NotificationsCenter } from '
|
|
9
|
-
import { NotificationsAlerts } from '
|
|
8
|
+
import { NotificationsCenter } from 'vscode/vscode/vs/workbench/browser/parts/notifications/notificationsCenter';
|
|
9
|
+
import { NotificationsAlerts } from 'vscode/vscode/vs/workbench/browser/parts/notifications/notificationsAlerts';
|
|
10
10
|
import { NotificationsTelemetry } from 'vscode/vscode/vs/workbench/browser/parts/notifications/notificationsTelemetry';
|
|
11
11
|
import { ILayoutService } from 'vscode/vscode/vs/platform/layout/browser/layoutService';
|
|
12
|
-
import { NotificationsStatus } from '
|
|
13
|
-
import getServiceOverride$1 from '@codingame/monaco-vscode-layout-service-override';
|
|
12
|
+
import { NotificationsStatus } from 'vscode/vscode/vs/workbench/browser/parts/notifications/notificationsStatus';
|
|
14
13
|
import { onRenderWorkbench } from 'vscode/lifecycle';
|
|
15
14
|
|
|
16
15
|
onRenderWorkbench(async (accessor) => {
|
|
@@ -36,8 +35,7 @@ onRenderWorkbench(async (accessor) => {
|
|
|
36
35
|
});
|
|
37
36
|
function getServiceOverride() {
|
|
38
37
|
return {
|
|
39
|
-
[( INotificationService.toString())]: new SyncDescriptor(NotificationService, undefined, true)
|
|
40
|
-
...getServiceOverride$1()
|
|
38
|
+
[( INotificationService.toString())]: new SyncDescriptor(NotificationService, undefined, true)
|
|
41
39
|
};
|
|
42
40
|
}
|
|
43
41
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-notifications-service-override",
|
|
3
|
-
"version": "2.1
|
|
3
|
+
"version": "2.2.0-next.1",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -18,8 +18,7 @@
|
|
|
18
18
|
"module": "index.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@2.1
|
|
22
|
-
"vscode-marked": "npm:marked@=3.0.2"
|
|
23
|
-
"@codingame/monaco-vscode-layout-service-override": "2.1.3"
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@2.2.0-next.1",
|
|
22
|
+
"vscode-marked": "npm:marked@=3.0.2"
|
|
24
23
|
}
|
|
25
24
|
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=( Object.keys(r.attributes)),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
|
2
|
-
|
|
3
|
-
export { n as default };
|
package/vscode/src/vs/workbench/browser/parts/notifications/media/notificationsActions.css.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import n from '../../../../../../../../external/rollup-plugin-styles/dist/runtime/inject-css.js';
|
|
2
|
-
|
|
3
|
-
var css = ".monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-toolbar-container .action-item,.monaco-workbench>.notifications-center>.notifications-center-header>.notifications-center-header-toolbar .action-item{margin-right:4px}.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-toolbar-container .action-item:first-child,.monaco-workbench>.notifications-center>.notifications-center-header>.notifications-center-header-toolbar .action-item:first-child{margin-left:4px}";
|
|
4
|
-
n(css,{});
|
|
5
|
-
|
|
6
|
-
export { css, css as default };
|
package/vscode/src/vs/workbench/browser/parts/notifications/media/notificationsCenter.css.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import n from '../../../../../../../../external/rollup-plugin-styles/dist/runtime/inject-css.js';
|
|
2
|
-
|
|
3
|
-
var css = ".monaco-workbench>.notifications-center{border-radius:4px;bottom:31px;display:none;overflow:hidden;position:absolute;right:8px;z-index:1000}.monaco-workbench.nostatusbar>.notifications-center{bottom:8px}.monaco-workbench>.notifications-center.visible{display:block}.monaco-workbench>.notifications-center>.notifications-center-header{align-items:center;display:flex;height:35px;padding-left:8px;padding-right:5px}.monaco-workbench>.notifications-center>.notifications-center-header>.notifications-center-header-title{font-size:11px;text-transform:uppercase}.monaco-workbench>.notifications-center>.notifications-center-header>.notifications-center-header-toolbar{flex:1}.monaco-workbench>.notifications-center>.notifications-center-header>.notifications-center-header-toolbar .actions-container{justify-content:flex-end}.monaco-workbench>.notifications-center .notifications-list-container .monaco-list-row[data-last-element=false]>.notification-list-item{border-bottom:1px solid var(--vscode-notifications-border)}.monaco-workbench>.notifications-center .notifications-list-container,.monaco-workbench>.notifications-center .notifications-list-container .monaco-scrollable-element,.monaco-workbench>.notifications-center .notifications-list-container .notification-list-item{border-radius:0}.monaco-workbench>.notifications-center .codicon.codicon-error{color:var(--vscode-notificationsErrorIcon-foreground)!important}.monaco-workbench>.notifications-center .codicon.codicon-warning{color:var(--vscode-notificationsWarningIcon-foreground)!important}.monaco-workbench>.notifications-center .codicon.codicon-info{color:var(--vscode-notificationsInfoIcon-foreground)!important}";
|
|
4
|
-
n(css,{});
|
|
5
|
-
|
|
6
|
-
export { css, css as default };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import n from '../../../../../../../../external/rollup-plugin-styles/dist/runtime/inject-css.js';
|
|
2
|
-
|
|
3
|
-
var css = ".monaco-workbench .notifications-list-container{background:var(--vscode-notifications-background);border-radius:inherit;color:var(--vscode-notifications-foreground);outline-color:var(--vscode-contrastBorder)}.monaco-workbench .notifications-list-container .notification-list-item{border-radius:4px;box-sizing:border-box;display:flex;flex-direction:column;flex-direction:column-reverse;height:100%;padding:10px 5px}.monaco-workbench .notifications-list-container .notification-offset-helper{word-wrap:break-word;line-height:22px;opacity:0;position:absolute}.monaco-workbench .notifications-list-container .monaco-scrollable-element{border-radius:4px}.monaco-workbench .notifications-list-container .notification-list-item>.notification-list-item-main-row{display:flex;flex-grow:1}.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-icon{align-items:center;background-position:50%;background-repeat:no-repeat;display:flex;flex:0 0 16px;font-size:18px;height:22px;margin-left:4px;margin-right:4px}.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-message{flex:1;line-height:22px;overflow:hidden;text-overflow:ellipsis;user-select:text;-webkit-user-select:text}.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-message a{color:var(--vscode-notificationLink-foreground)}.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-message a:focus{outline-color:var(--vscode-focusBorder);outline-style:solid;outline-width:1px}.monaco-workbench .notifications-list-container .notification-list-item.expanded .notification-list-item-message{word-wrap:break-word;white-space:normal}.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-toolbar-container{display:none;height:22px}.monaco-workbench .notifications-list-container .monaco-list-row.focused .notification-list-item .notification-list-item-toolbar-container,.monaco-workbench .notifications-list-container .monaco-list:focus-within .notification-list-item .notification-list-item-toolbar-container,.monaco-workbench .notifications-list-container .notification-list-item.expanded .notification-list-item-toolbar-container,.monaco-workbench .notifications-list-container .notification-list-item:hover .notification-list-item-toolbar-container{display:block}.monaco-workbench .notifications-list-container .notification-list-item>.notification-list-item-details-row{align-items:center;display:none;overflow:hidden;padding-left:5px}.monaco-workbench .notifications-list-container .notification-list-item.expanded>.notification-list-item-details-row{display:flex}.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-source{flex:1;font-size:12px;overflow:hidden;text-overflow:ellipsis}.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-buttons-container{display:flex;overflow:hidden}.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-buttons-container>.monaco-button,.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-buttons-container>.monaco-button-dropdown{margin:4px 5px}.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-buttons-container .monaco-button{outline-offset:2px!important}.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-buttons-container .monaco-text-button{display:inline-block;font-size:12px;overflow:hidden;padding:4px 10px;text-overflow:ellipsis;width:fit-content}.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-buttons-container .monaco-dropdown-button{padding:5px}.monaco-workbench .notifications-list-container .progress-bit{bottom:0}";
|
|
4
|
-
n(css,{});
|
|
5
|
-
|
|
6
|
-
export { css, css as default };
|
package/vscode/src/vs/workbench/browser/parts/notifications/media/notificationsToasts.css.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import n from '../../../../../../../../external/rollup-plugin-styles/dist/runtime/inject-css.js';
|
|
2
|
-
|
|
3
|
-
var css = ".monaco-workbench>.notifications-toasts{bottom:26px;display:none;overflow:hidden;position:absolute;right:3px;z-index:1000}.monaco-workbench.nostatusbar>.notifications-toasts{bottom:3px}.monaco-workbench>.notifications-toasts.visible{display:flex;flex-direction:column}.monaco-workbench>.notifications-toasts .notification-toast-container{overflow:hidden}.monaco-workbench>.notifications-toasts .notification-toast-container>.notification-toast{border-radius:4px;margin:8px;opacity:0;transform:translate3d(0,100%,0);transition:transform .3s ease-out,opacity .3s ease-out}.monaco-workbench.reduce-motion>.notifications-toasts .notification-toast-container>.notification-toast{transition:transform 0ms ease-out,opacity 0ms ease-out}.monaco-workbench>.notifications-toasts .notification-toast-container>.notification-toast.notification-fade-in{opacity:1;transform:none}.monaco-workbench>.notifications-toasts .notification-toast-container>.notification-toast.notification-fade-in-done{opacity:1;transform:none;transition:none}.monaco-workbench>.notifications-toasts .codicon.codicon-error{color:var(--vscode-notificationsErrorIcon-foreground)!important}.monaco-workbench>.notifications-toasts .codicon.codicon-warning{color:var(--vscode-notificationsWarningIcon-foreground)!important}.monaco-workbench>.notifications-toasts .codicon.codicon-info{color:var(--vscode-notificationsInfoIcon-foreground)!important}";
|
|
4
|
-
n(css,{});
|
|
5
|
-
|
|
6
|
-
export { css, css as default };
|
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import './media/notificationsActions.css.js';
|
|
3
|
-
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
4
|
-
import { Action } from 'vscode/vscode/vs/base/common/actions';
|
|
5
|
-
import { CLEAR_NOTIFICATION, CLEAR_ALL_NOTIFICATIONS, TOGGLE_DO_NOT_DISTURB_MODE, TOGGLE_DO_NOT_DISTURB_MODE_BY_SOURCE, HIDE_NOTIFICATIONS_CENTER, EXPAND_NOTIFICATION, COLLAPSE_NOTIFICATION } from 'vscode/vscode/vs/workbench/browser/parts/notifications/notificationsCommands';
|
|
6
|
-
import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands';
|
|
7
|
-
import { IClipboardService } from 'vscode/vscode/vs/platform/clipboard/common/clipboardService';
|
|
8
|
-
import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
|
|
9
|
-
import { registerIcon } from 'vscode/vscode/vs/platform/theme/common/iconRegistry';
|
|
10
|
-
import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
|
|
11
|
-
|
|
12
|
-
const clearIcon = registerIcon('notifications-clear', Codicon.close, ( localizeWithPath(
|
|
13
|
-
'vs/workbench/browser/parts/notifications/notificationsActions',
|
|
14
|
-
'clearIcon',
|
|
15
|
-
'Icon for the clear action in notifications.'
|
|
16
|
-
)));
|
|
17
|
-
const clearAllIcon = registerIcon('notifications-clear-all', Codicon.clearAll, ( localizeWithPath(
|
|
18
|
-
'vs/workbench/browser/parts/notifications/notificationsActions',
|
|
19
|
-
'clearAllIcon',
|
|
20
|
-
'Icon for the clear all action in notifications.'
|
|
21
|
-
)));
|
|
22
|
-
const hideIcon = registerIcon('notifications-hide', Codicon.chevronDown, ( localizeWithPath(
|
|
23
|
-
'vs/workbench/browser/parts/notifications/notificationsActions',
|
|
24
|
-
'hideIcon',
|
|
25
|
-
'Icon for the hide action in notifications.'
|
|
26
|
-
)));
|
|
27
|
-
const expandIcon = registerIcon('notifications-expand', Codicon.chevronUp, ( localizeWithPath(
|
|
28
|
-
'vs/workbench/browser/parts/notifications/notificationsActions',
|
|
29
|
-
'expandIcon',
|
|
30
|
-
'Icon for the expand action in notifications.'
|
|
31
|
-
)));
|
|
32
|
-
const collapseIcon = registerIcon('notifications-collapse', Codicon.chevronDown, ( localizeWithPath(
|
|
33
|
-
'vs/workbench/browser/parts/notifications/notificationsActions',
|
|
34
|
-
'collapseIcon',
|
|
35
|
-
'Icon for the collapse action in notifications.'
|
|
36
|
-
)));
|
|
37
|
-
const configureIcon = registerIcon('notifications-configure', Codicon.gear, ( localizeWithPath(
|
|
38
|
-
'vs/workbench/browser/parts/notifications/notificationsActions',
|
|
39
|
-
'configureIcon',
|
|
40
|
-
'Icon for the configure action in notifications.'
|
|
41
|
-
)));
|
|
42
|
-
const doNotDisturbIcon = registerIcon('notifications-do-not-disturb', Codicon.bellSlash, ( localizeWithPath(
|
|
43
|
-
'vs/workbench/browser/parts/notifications/notificationsActions',
|
|
44
|
-
'doNotDisturbIcon',
|
|
45
|
-
'Icon for the mute all action in notifications.'
|
|
46
|
-
)));
|
|
47
|
-
let ClearNotificationAction = class ClearNotificationAction extends Action {
|
|
48
|
-
static { this.ID = CLEAR_NOTIFICATION; }
|
|
49
|
-
static { this.LABEL = ( localizeWithPath(
|
|
50
|
-
'vs/workbench/browser/parts/notifications/notificationsActions',
|
|
51
|
-
'clearNotification',
|
|
52
|
-
"Clear Notification"
|
|
53
|
-
)); }
|
|
54
|
-
constructor(id, label, commandService) {
|
|
55
|
-
super(id, label, ThemeIcon.asClassName(clearIcon));
|
|
56
|
-
this.commandService = commandService;
|
|
57
|
-
}
|
|
58
|
-
async run(notification) {
|
|
59
|
-
this.commandService.executeCommand(CLEAR_NOTIFICATION, notification);
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
ClearNotificationAction = ( __decorate([
|
|
63
|
-
( __param(2, ICommandService))
|
|
64
|
-
], ClearNotificationAction));
|
|
65
|
-
let ClearAllNotificationsAction = class ClearAllNotificationsAction extends Action {
|
|
66
|
-
static { this.ID = CLEAR_ALL_NOTIFICATIONS; }
|
|
67
|
-
static { this.LABEL = ( localizeWithPath(
|
|
68
|
-
'vs/workbench/browser/parts/notifications/notificationsActions',
|
|
69
|
-
'clearNotifications',
|
|
70
|
-
"Clear All Notifications"
|
|
71
|
-
)); }
|
|
72
|
-
constructor(id, label, commandService) {
|
|
73
|
-
super(id, label, ThemeIcon.asClassName(clearAllIcon));
|
|
74
|
-
this.commandService = commandService;
|
|
75
|
-
}
|
|
76
|
-
async run() {
|
|
77
|
-
this.commandService.executeCommand(CLEAR_ALL_NOTIFICATIONS);
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
ClearAllNotificationsAction = ( __decorate([
|
|
81
|
-
( __param(2, ICommandService))
|
|
82
|
-
], ClearAllNotificationsAction));
|
|
83
|
-
let ToggleDoNotDisturbAction = class ToggleDoNotDisturbAction extends Action {
|
|
84
|
-
static { this.ID = TOGGLE_DO_NOT_DISTURB_MODE; }
|
|
85
|
-
static { this.LABEL = ( localizeWithPath(
|
|
86
|
-
'vs/workbench/browser/parts/notifications/notificationsActions',
|
|
87
|
-
'toggleDoNotDisturbMode',
|
|
88
|
-
"Toggle Do Not Disturb Mode"
|
|
89
|
-
)); }
|
|
90
|
-
constructor(id, label, commandService) {
|
|
91
|
-
super(id, label, ThemeIcon.asClassName(doNotDisturbIcon));
|
|
92
|
-
this.commandService = commandService;
|
|
93
|
-
}
|
|
94
|
-
async run() {
|
|
95
|
-
this.commandService.executeCommand(TOGGLE_DO_NOT_DISTURB_MODE);
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
ToggleDoNotDisturbAction = ( __decorate([
|
|
99
|
-
( __param(2, ICommandService))
|
|
100
|
-
], ToggleDoNotDisturbAction));
|
|
101
|
-
let ToggleDoNotDisturbBySourceAction = class ToggleDoNotDisturbBySourceAction extends Action {
|
|
102
|
-
static { this.ID = TOGGLE_DO_NOT_DISTURB_MODE_BY_SOURCE; }
|
|
103
|
-
static { this.LABEL = ( localizeWithPath(
|
|
104
|
-
'vs/workbench/browser/parts/notifications/notificationsActions',
|
|
105
|
-
'toggleDoNotDisturbModeBySource',
|
|
106
|
-
"Toggle Do Not Disturb Mode By Source..."
|
|
107
|
-
)); }
|
|
108
|
-
constructor(id, label, commandService) {
|
|
109
|
-
super(id, label);
|
|
110
|
-
this.commandService = commandService;
|
|
111
|
-
}
|
|
112
|
-
async run() {
|
|
113
|
-
this.commandService.executeCommand(TOGGLE_DO_NOT_DISTURB_MODE_BY_SOURCE);
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
ToggleDoNotDisturbBySourceAction = ( __decorate([
|
|
117
|
-
( __param(2, ICommandService))
|
|
118
|
-
], ToggleDoNotDisturbBySourceAction));
|
|
119
|
-
class ConfigureDoNotDisturbAction extends Action {
|
|
120
|
-
static { this.ID = 'workbench.action.configureDoNotDisturbMode'; }
|
|
121
|
-
static { this.LABEL = ( localizeWithPath(
|
|
122
|
-
'vs/workbench/browser/parts/notifications/notificationsActions',
|
|
123
|
-
'configureDoNotDisturbMode',
|
|
124
|
-
"Configure Do Not Disturb..."
|
|
125
|
-
)); }
|
|
126
|
-
constructor(id, label) {
|
|
127
|
-
super(id, label, ThemeIcon.asClassName(doNotDisturbIcon));
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
let HideNotificationsCenterAction = class HideNotificationsCenterAction extends Action {
|
|
131
|
-
static { this.ID = HIDE_NOTIFICATIONS_CENTER; }
|
|
132
|
-
static { this.LABEL = ( localizeWithPath(
|
|
133
|
-
'vs/workbench/browser/parts/notifications/notificationsActions',
|
|
134
|
-
'hideNotificationsCenter',
|
|
135
|
-
"Hide Notifications"
|
|
136
|
-
)); }
|
|
137
|
-
constructor(id, label, commandService) {
|
|
138
|
-
super(id, label, ThemeIcon.asClassName(hideIcon));
|
|
139
|
-
this.commandService = commandService;
|
|
140
|
-
}
|
|
141
|
-
async run() {
|
|
142
|
-
this.commandService.executeCommand(HIDE_NOTIFICATIONS_CENTER);
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
HideNotificationsCenterAction = ( __decorate([
|
|
146
|
-
( __param(2, ICommandService))
|
|
147
|
-
], HideNotificationsCenterAction));
|
|
148
|
-
let ExpandNotificationAction = class ExpandNotificationAction extends Action {
|
|
149
|
-
static { this.ID = EXPAND_NOTIFICATION; }
|
|
150
|
-
static { this.LABEL = ( localizeWithPath(
|
|
151
|
-
'vs/workbench/browser/parts/notifications/notificationsActions',
|
|
152
|
-
'expandNotification',
|
|
153
|
-
"Expand Notification"
|
|
154
|
-
)); }
|
|
155
|
-
constructor(id, label, commandService) {
|
|
156
|
-
super(id, label, ThemeIcon.asClassName(expandIcon));
|
|
157
|
-
this.commandService = commandService;
|
|
158
|
-
}
|
|
159
|
-
async run(notification) {
|
|
160
|
-
this.commandService.executeCommand(EXPAND_NOTIFICATION, notification);
|
|
161
|
-
}
|
|
162
|
-
};
|
|
163
|
-
ExpandNotificationAction = ( __decorate([
|
|
164
|
-
( __param(2, ICommandService))
|
|
165
|
-
], ExpandNotificationAction));
|
|
166
|
-
let CollapseNotificationAction = class CollapseNotificationAction extends Action {
|
|
167
|
-
static { this.ID = COLLAPSE_NOTIFICATION; }
|
|
168
|
-
static { this.LABEL = ( localizeWithPath(
|
|
169
|
-
'vs/workbench/browser/parts/notifications/notificationsActions',
|
|
170
|
-
'collapseNotification',
|
|
171
|
-
"Collapse Notification"
|
|
172
|
-
)); }
|
|
173
|
-
constructor(id, label, commandService) {
|
|
174
|
-
super(id, label, ThemeIcon.asClassName(collapseIcon));
|
|
175
|
-
this.commandService = commandService;
|
|
176
|
-
}
|
|
177
|
-
async run(notification) {
|
|
178
|
-
this.commandService.executeCommand(COLLAPSE_NOTIFICATION, notification);
|
|
179
|
-
}
|
|
180
|
-
};
|
|
181
|
-
CollapseNotificationAction = ( __decorate([
|
|
182
|
-
( __param(2, ICommandService))
|
|
183
|
-
], CollapseNotificationAction));
|
|
184
|
-
class ConfigureNotificationAction extends Action {
|
|
185
|
-
static { this.ID = 'workbench.action.configureNotification'; }
|
|
186
|
-
static { this.LABEL = ( localizeWithPath(
|
|
187
|
-
'vs/workbench/browser/parts/notifications/notificationsActions',
|
|
188
|
-
'configureNotification',
|
|
189
|
-
"More Actions..."
|
|
190
|
-
)); }
|
|
191
|
-
constructor(id, label, notification) {
|
|
192
|
-
super(id, label, ThemeIcon.asClassName(configureIcon));
|
|
193
|
-
this.notification = notification;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
let CopyNotificationMessageAction = class CopyNotificationMessageAction extends Action {
|
|
197
|
-
static { this.ID = 'workbench.action.copyNotificationMessage'; }
|
|
198
|
-
static { this.LABEL = ( localizeWithPath(
|
|
199
|
-
'vs/workbench/browser/parts/notifications/notificationsActions',
|
|
200
|
-
'copyNotification',
|
|
201
|
-
"Copy Text"
|
|
202
|
-
)); }
|
|
203
|
-
constructor(id, label, clipboardService) {
|
|
204
|
-
super(id, label);
|
|
205
|
-
this.clipboardService = clipboardService;
|
|
206
|
-
}
|
|
207
|
-
run(notification) {
|
|
208
|
-
return this.clipboardService.writeText(notification.message.raw);
|
|
209
|
-
}
|
|
210
|
-
};
|
|
211
|
-
CopyNotificationMessageAction = ( __decorate([
|
|
212
|
-
( __param(2, IClipboardService))
|
|
213
|
-
], CopyNotificationMessageAction));
|
|
214
|
-
|
|
215
|
-
export { ClearAllNotificationsAction, ClearNotificationAction, CollapseNotificationAction, ConfigureDoNotDisturbAction, ConfigureNotificationAction, CopyNotificationMessageAction, ExpandNotificationAction, HideNotificationsCenterAction, ToggleDoNotDisturbAction, ToggleDoNotDisturbBySourceAction };
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { alert } from 'vscode/vscode/vs/base/browser/ui/aria/aria';
|
|
2
|
-
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
3
|
-
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
|
-
import { toErrorMessage } from 'vscode/vscode/vs/base/common/errorMessage';
|
|
5
|
-
import { Severity, NotificationPriority } from 'vscode/vscode/vs/platform/notification/common/notification';
|
|
6
|
-
import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
7
|
-
|
|
8
|
-
class NotificationsAlerts extends Disposable {
|
|
9
|
-
constructor(model) {
|
|
10
|
-
super();
|
|
11
|
-
this.model = model;
|
|
12
|
-
for (const notification of model.notifications) {
|
|
13
|
-
this.triggerAriaAlert(notification);
|
|
14
|
-
}
|
|
15
|
-
this.registerListeners();
|
|
16
|
-
}
|
|
17
|
-
registerListeners() {
|
|
18
|
-
this._register(this.model.onDidChangeNotification(e => this.onDidChangeNotification(e)));
|
|
19
|
-
}
|
|
20
|
-
onDidChangeNotification(e) {
|
|
21
|
-
if (e.kind === 0 ) {
|
|
22
|
-
this.triggerAriaAlert(e.item);
|
|
23
|
-
if (e.item.severity === Severity.Error) {
|
|
24
|
-
if (e.item.message.original instanceof Error) {
|
|
25
|
-
console.error(e.item.message.original);
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
console.error(toErrorMessage(( e.item.message.linkedText.toString()), true));
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
triggerAriaAlert(notification) {
|
|
34
|
-
if (notification.priority === NotificationPriority.SILENT) {
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
const listener = notification.onDidChangeContent(e => {
|
|
38
|
-
if (e.kind === 1 ) {
|
|
39
|
-
this.doTriggerAriaAlert(notification);
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
Event.once(notification.onDidClose)(() => listener.dispose());
|
|
43
|
-
this.doTriggerAriaAlert(notification);
|
|
44
|
-
}
|
|
45
|
-
doTriggerAriaAlert(notification) {
|
|
46
|
-
let alertText;
|
|
47
|
-
if (notification.severity === Severity.Error) {
|
|
48
|
-
alertText = ( localizeWithPath(
|
|
49
|
-
'vs/workbench/browser/parts/notifications/notificationsAlerts',
|
|
50
|
-
'alertErrorMessage',
|
|
51
|
-
"Error: {0}",
|
|
52
|
-
( notification.message.linkedText.toString())
|
|
53
|
-
));
|
|
54
|
-
}
|
|
55
|
-
else if (notification.severity === Severity.Warning) {
|
|
56
|
-
alertText = ( localizeWithPath(
|
|
57
|
-
'vs/workbench/browser/parts/notifications/notificationsAlerts',
|
|
58
|
-
'alertWarningMessage',
|
|
59
|
-
"Warning: {0}",
|
|
60
|
-
( notification.message.linkedText.toString())
|
|
61
|
-
));
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
alertText = ( localizeWithPath(
|
|
65
|
-
'vs/workbench/browser/parts/notifications/notificationsAlerts',
|
|
66
|
-
'alertInfoMessage',
|
|
67
|
-
"Info: {0}",
|
|
68
|
-
( notification.message.linkedText.toString())
|
|
69
|
-
));
|
|
70
|
-
}
|
|
71
|
-
alert(alertText);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export { NotificationsAlerts };
|