Skip to content

Commit f0d9894

Browse files
authored
Fix notification icons (#642)
1 parent 59e4c57 commit f0d9894

File tree

5 files changed

+15
-9
lines changed

5 files changed

+15
-9
lines changed

Diff for: arduino-ide-extension/src/browser/serial/monitor/monitor-view-contribution.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22
import { injectable, inject } from 'inversify';
3-
import { AbstractViewContribution } from '@theia/core/lib/browser';
3+
import { AbstractViewContribution, codicon } from '@theia/core/lib/browser';
44
import { MonitorWidget } from './monitor-widget';
55
import { MenuModelRegistry, Command, CommandRegistry } from '@theia/core';
66
import {
@@ -32,7 +32,7 @@ export namespace SerialMonitor {
3232
{
3333
id: 'serial-monitor-clear-output',
3434
label: 'Clear Output',
35-
iconClass: 'clear-all',
35+
iconClass: codicon('clear-all'),
3636
},
3737
'vscode/output.contribution/clearOutput.label'
3838
);

Diff for: arduino-ide-extension/src/browser/serial/serial-connection-manager.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ export class SerialConnectionManager {
354354
this.messageService.warn(
355355
nls.localize(
356356
'arduino/serial/reconnect',
357-
'Reconnecting {0} to {1} in {2] seconds...',
357+
'Reconnecting {0} to {1} in {2} seconds...',
358358
Board.toString(board, {
359359
useFqbn: false,
360360
}),

Diff for: arduino-ide-extension/src/browser/theia/messages/notification-center-component.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import * as React from 'react';
22
import { NotificationComponent } from './notification-component';
33
import { NotificationCenterComponent as TheiaNotificationCenterComponent } from '@theia/messages/lib/browser/notification-center-component';
44
import { nls } from '@theia/core/lib/common';
5+
import { codicon } from '@theia/core/lib/browser';
56

67
const PerfectScrollbar = require('react-perfect-scrollbar');
78

@@ -28,15 +29,15 @@ export class NotificationCenterComponent extends TheiaNotificationCenterComponen
2829
<div className="theia-notification-center-header-actions">
2930
<ul className="theia-notification-actions">
3031
<li
31-
className="collapse"
32+
className={codicon('chevron-down', true)}
3233
title={nls.localize(
3334
'vscode/notificationsStatus/hideNotifications',
3435
'Hide Notification Center'
3536
)}
3637
onClick={this.onHide}
3738
/>
3839
<li
39-
className="clear-all"
40+
className={codicon('clear-all', true)}
4041
title={nls.localize(
4142
'vscode/notificationsCommands/clearAllNotifications',
4243
'Clear All'

Diff for: arduino-ide-extension/src/browser/theia/messages/notification-component.tsx

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as React from 'react';
22
import { NotificationComponent as TheiaNotificationComponent } from '@theia/messages/lib/browser/notification-component';
33
import { nls } from '@theia/core/lib/common';
4+
import { codicon } from '@theia/core/lib/browser';
45

56
export class NotificationComponent extends TheiaNotificationComponent {
67
render(): React.ReactNode {
@@ -15,7 +16,7 @@ export class NotificationComponent extends TheiaNotificationComponent {
1516
>
1617
<div className="theia-notification-list-item-content-main">
1718
<div
18-
className={`theia-notification-icon theia-notification-icon-${type}`}
19+
className={`theia-notification-icon ${codicon(type)} ${type}`}
1920
/>
2021
<div className="theia-notification-message">
2122
<span
@@ -26,7 +27,11 @@ export class NotificationComponent extends TheiaNotificationComponent {
2627
<ul className="theia-notification-actions">
2728
{expandable && (
2829
<li
29-
className={collapsed ? 'expand' : 'collapse'}
30+
className={
31+
codicon('chevron-down') + collapsed
32+
? ' expand'
33+
: ' collapse'
34+
}
3035
title={
3136
collapsed
3237
? nls.localize('theia/messages/expand', 'Expand')
@@ -38,7 +43,7 @@ export class NotificationComponent extends TheiaNotificationComponent {
3843
)}
3944
{!this.isProgress && (
4045
<li
41-
className="clear"
46+
className={codicon('close', true)}
4247
title={nls.localize('vscode/abstractTree/clear', 'Clear')}
4348
data-message-id={messageId}
4449
onClick={this.onClear}

Diff for: i18n/en.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@
274274
"disconnected": "Disconnected {0} from {1}.",
275275
"unexpectedError": "Unexpected error. Reconnecting {0} on port {1}.",
276276
"failedReconnect": "Failed to reconnect {0} to serial port after 10 consecutive attempts. The {1} serial port is busy.",
277-
"reconnect": "Reconnecting {0} to {1} in {2] seconds..."
277+
"reconnect": "Reconnecting {0} to {1} in {2} seconds..."
278278
},
279279
"component": {
280280
"uninstall": "Uninstall",

0 commit comments

Comments
 (0)