Fix notification icons (#642)

This commit is contained in:
Francesco Stasi 2021-11-30 17:24:29 +01:00 committed by GitHub
parent 59e4c57ecd
commit f0d9894a16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 9 deletions

View File

@ -1,6 +1,6 @@
import * as React from 'react';
import { injectable, inject } from 'inversify';
import { AbstractViewContribution } from '@theia/core/lib/browser';
import { AbstractViewContribution, codicon } from '@theia/core/lib/browser';
import { MonitorWidget } from './monitor-widget';
import { MenuModelRegistry, Command, CommandRegistry } from '@theia/core';
import {
@ -32,7 +32,7 @@ export namespace SerialMonitor {
{
id: 'serial-monitor-clear-output',
label: 'Clear Output',
iconClass: 'clear-all',
iconClass: codicon('clear-all'),
},
'vscode/output.contribution/clearOutput.label'
);

View File

@ -354,7 +354,7 @@ export class SerialConnectionManager {
this.messageService.warn(
nls.localize(
'arduino/serial/reconnect',
'Reconnecting {0} to {1} in {2] seconds...',
'Reconnecting {0} to {1} in {2} seconds...',
Board.toString(board, {
useFqbn: false,
}),

View File

@ -2,6 +2,7 @@ import * as React from 'react';
import { NotificationComponent } from './notification-component';
import { NotificationCenterComponent as TheiaNotificationCenterComponent } from '@theia/messages/lib/browser/notification-center-component';
import { nls } from '@theia/core/lib/common';
import { codicon } from '@theia/core/lib/browser';
const PerfectScrollbar = require('react-perfect-scrollbar');
@ -28,7 +29,7 @@ export class NotificationCenterComponent extends TheiaNotificationCenterComponen
<div className="theia-notification-center-header-actions">
<ul className="theia-notification-actions">
<li
className="collapse"
className={codicon('chevron-down', true)}
title={nls.localize(
'vscode/notificationsStatus/hideNotifications',
'Hide Notification Center'
@ -36,7 +37,7 @@ export class NotificationCenterComponent extends TheiaNotificationCenterComponen
onClick={this.onHide}
/>
<li
className="clear-all"
className={codicon('clear-all', true)}
title={nls.localize(
'vscode/notificationsCommands/clearAllNotifications',
'Clear All'

View File

@ -1,6 +1,7 @@
import * as React from 'react';
import { NotificationComponent as TheiaNotificationComponent } from '@theia/messages/lib/browser/notification-component';
import { nls } from '@theia/core/lib/common';
import { codicon } from '@theia/core/lib/browser';
export class NotificationComponent extends TheiaNotificationComponent {
render(): React.ReactNode {
@ -15,7 +16,7 @@ export class NotificationComponent extends TheiaNotificationComponent {
>
<div className="theia-notification-list-item-content-main">
<div
className={`theia-notification-icon theia-notification-icon-${type}`}
className={`theia-notification-icon ${codicon(type)} ${type}`}
/>
<div className="theia-notification-message">
<span
@ -26,7 +27,11 @@ export class NotificationComponent extends TheiaNotificationComponent {
<ul className="theia-notification-actions">
{expandable && (
<li
className={collapsed ? 'expand' : 'collapse'}
className={
codicon('chevron-down') + collapsed
? ' expand'
: ' collapse'
}
title={
collapsed
? nls.localize('theia/messages/expand', 'Expand')
@ -38,7 +43,7 @@ export class NotificationComponent extends TheiaNotificationComponent {
)}
{!this.isProgress && (
<li
className="clear"
className={codicon('close', true)}
title={nls.localize('vscode/abstractTree/clear', 'Clear')}
data-message-id={messageId}
onClick={this.onClear}

View File

@ -274,7 +274,7 @@
"disconnected": "Disconnected {0} from {1}.",
"unexpectedError": "Unexpected error. Reconnecting {0} on port {1}.",
"failedReconnect": "Failed to reconnect {0} to serial port after 10 consecutive attempts. The {1} serial port is busy.",
"reconnect": "Reconnecting {0} to {1} in {2] seconds..."
"reconnect": "Reconnecting {0} to {1} in {2} seconds..."
},
"component": {
"uninstall": "Uninstall",