提交 93795d96 编写于 作者: M meganrogge

:broom:

上级 a4b183f5
......@@ -10,10 +10,6 @@ export class NotificationRegistry {
static _notifications: INotificationItem[] = [];
constructor() { }
getDefaultNotifications(): INotificationItem[] {
return Registry.knows('notifications') ? Registry.as('notifications') : [];
}
static registerNotification(notification: INotificationItem): void {
this._notifications.push(notification);
}
......
......@@ -3,13 +3,10 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { INotificationService, INotificationHandle, NoOpNotification, Severity, INotification, IPromptChoice, IPromptOptions, IStatusMessageOptions, NotificationsFilter, INotificationItem } from 'vs/platform/notification/common/notification';
import { INotificationService, INotificationHandle, NoOpNotification, Severity, INotification, IPromptChoice, IPromptOptions, IStatusMessageOptions, NotificationsFilter } from 'vs/platform/notification/common/notification';
import { Disposable, IDisposable } from 'vs/base/common/lifecycle';
export class TestNotificationService implements INotificationService {
getNotifications(): INotificationItem[] {
return [];
}
declare readonly _serviceBrand: undefined;
......
......@@ -9,7 +9,7 @@ import { localize } from 'vs/nls';
import { Action, IAction, ActionRunner, WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification } from 'vs/base/common/actions';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { INotificationService } from 'vs/platform/notification/common/notification';
import { CLEAR_NOTIFICATION, EXPAND_NOTIFICATION, COLLAPSE_NOTIFICATION, CLEAR_ALL_NOTIFICATIONS, HIDE_NOTIFICATIONS_CENTER, MANAGE_NOTIFICATIONS_CENTER } from 'vs/workbench/browser/parts/notifications/notificationsCommands';
import { CLEAR_NOTIFICATION, EXPAND_NOTIFICATION, COLLAPSE_NOTIFICATION, CLEAR_ALL_NOTIFICATIONS, HIDE_NOTIFICATIONS_CENTER, MANAGE_NOTIFICATIONS } from 'vs/workbench/browser/parts/notifications/notificationsCommands';
import { ICommandService } from 'vs/platform/commands/common/commands';
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
import { Codicon } from 'vs/base/common/codicons';
......@@ -79,7 +79,7 @@ export class HideNotificationsCenterAction extends Action {
export class ManageNotificationsAction extends Action {
static readonly ID = MANAGE_NOTIFICATIONS_CENTER;
static readonly ID = MANAGE_NOTIFICATIONS;
static readonly LABEL = localize('manageNotifications', "Manage Notifications");
constructor(
......@@ -91,7 +91,7 @@ export class ManageNotificationsAction extends Action {
}
async run(): Promise<void> {
this.commandService.executeCommand(MANAGE_NOTIFICATIONS_CENTER);
this.commandService.executeCommand(MANAGE_NOTIFICATIONS);
}
}
......
......@@ -18,7 +18,7 @@ import { IPreferencesService } from 'vs/workbench/services/preferences/common/pr
// Center
export const SHOW_NOTIFICATIONS_CENTER = 'notifications.showList';
export const HIDE_NOTIFICATIONS_CENTER = 'notifications.hideList';
export const MANAGE_NOTIFICATIONS_CENTER = 'notifications.manage';
export const MANAGE_NOTIFICATIONS = 'notifications.manage';
const TOGGLE_NOTIFICATIONS_CENTER = 'notifications.toggleList';
// Toasts
......@@ -94,7 +94,7 @@ export function registerNotificationCommands(center: INotificationsCenterControl
// Manage Notifications
KeybindingsRegistry.registerCommandAndKeybindingRule({
id: MANAGE_NOTIFICATIONS_CENTER,
id: MANAGE_NOTIFICATIONS,
weight: KeybindingWeight.WorkbenchContrib + 50,
when: NotificationsCenterVisibleContext,
primary: KeyCode.Enter,
......
......@@ -58,7 +58,7 @@ export class UserDataSyncTrigger extends Disposable implements IWorkbenchContrib
return 'keybindingsEditor';
}
if (editorInput instanceof NotificationsEditorInput) {
return 'keybindingsEditor';
return 'notificationsEditor';
}
const resource = editorInput.resource;
if (isEqual(resource, this.environmentService.settingsResource)) {
......@@ -67,6 +67,9 @@ export class UserDataSyncTrigger extends Disposable implements IWorkbenchContrib
if (isEqual(resource, this.environmentService.keybindingsResource)) {
return 'keybindingsEditor';
}
if (isEqual(resource, this.environmentService.notificationsResource)) {
return 'notificationsEditor';
}
return undefined;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册