Skip to content

fix notification icons #642

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -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'
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand All @@ -28,15 +29,15 @@ 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'
)}
onClick={this.onHide}
/>
<li
className="clear-all"
className={codicon('clear-all', true)}
title={nls.localize(
'vscode/notificationsCommands/clearAllNotifications',
'Clear All'
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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
Expand All @@ -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')
Expand All @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down