mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-06-01 15:00:49 +00:00
White theme for web UI
This commit is contained in:
parent
999921bfe4
commit
80207eda36
@ -19,6 +19,7 @@ export class AppComponent implements OnInit {
|
|||||||
private themeService: ThemeService
|
private themeService: ThemeService
|
||||||
) {
|
) {
|
||||||
iconReg.addSvgIcon('gns3', sanitizer.bypassSecurityTrustResourceUrl('./assets/gns3_icon.svg'));
|
iconReg.addSvgIcon('gns3', sanitizer.bypassSecurityTrustResourceUrl('./assets/gns3_icon.svg'));
|
||||||
|
iconReg.addSvgIcon('gns3black', sanitizer.bypassSecurityTrustResourceUrl('./assets/gns3_icon_black.svg'));
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
(resizeEnd)="onResizeEnd($event)">
|
(resizeEnd)="onResizeEnd($event)">
|
||||||
<div class="consoleHeader">
|
<div class="consoleHeader">
|
||||||
<div class="consoleFiltering">
|
<div class="consoleFiltering">
|
||||||
<button class="filterButton" [matMenuTriggerFor]="filterMenu">
|
<button [ngClass]="{lightTheme: isLightThemeEnabled}" class="filterButton" [matMenuTriggerFor]="filterMenu">
|
||||||
Apply filter
|
Apply filter
|
||||||
</button>
|
</button>
|
||||||
<mat-menu #filterMenu="matMenu" xPosition="after">
|
<mat-menu #filterMenu="matMenu" xPosition="after">
|
||||||
@ -34,15 +34,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div #console class="console" [ngStyle]="styleInside">
|
<div [ngClass]="{lightTheme: isLightThemeEnabled}" #console class="console" [ngStyle]="styleInside">
|
||||||
<span class="console-item" *ngFor="let event of filteredEvents">
|
<span class="console-item" *ngFor="let event of filteredEvents">
|
||||||
{{event.message}} <br/>
|
{{event.message}} <br/>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="consoleInput">
|
<div [ngClass]="{lightTheme: isLightThemeEnabled}" class="consoleInput">
|
||||||
<mat-icon class="inputIcon">keyboard_arrow_right</mat-icon>
|
<mat-icon class="inputIcon">keyboard_arrow_right</mat-icon>
|
||||||
<input
|
<input
|
||||||
|
[ngClass]="{lightTheme: isLightThemeEnabled}"
|
||||||
class="commandLine"
|
class="commandLine"
|
||||||
autofocus
|
autofocus
|
||||||
(keydown)="onKeyDown($event)"
|
(keydown)="onKeyDown($event)"
|
||||||
|
@ -12,7 +12,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.lightTheme {
|
.lightTheme {
|
||||||
background: #0d47a1;
|
background: white!important;
|
||||||
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
.filterButton {
|
.filterButton {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
(click)="startConsoleForAllNodes()"
|
(click)="startConsoleForAllNodes()"
|
||||||
class="menu-button"
|
class="menu-button"
|
||||||
>
|
>
|
||||||
<mat-icon class="unmarked">web_asset</mat-icon>
|
<mat-icon>web_asset</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
matTooltip="Start/Resume all nodes"
|
matTooltip="Start/Resume all nodes"
|
||||||
@ -12,7 +12,7 @@
|
|||||||
(click)="startNodes()"
|
(click)="startNodes()"
|
||||||
class="menu-button"
|
class="menu-button"
|
||||||
>
|
>
|
||||||
<mat-icon class="unmarked">play_arrow</mat-icon>
|
<mat-icon>play_arrow</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
matTooltip="Suspend all nodes"
|
matTooltip="Suspend all nodes"
|
||||||
@ -20,7 +20,7 @@
|
|||||||
(click)="suspendNodes()"
|
(click)="suspendNodes()"
|
||||||
class="menu-button"
|
class="menu-button"
|
||||||
>
|
>
|
||||||
<mat-icon class="unmarked">pause</mat-icon>
|
<mat-icon>pause</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
matTooltip="Stop all nodes"
|
matTooltip="Stop all nodes"
|
||||||
@ -28,7 +28,7 @@
|
|||||||
(click)="stopNodes()"
|
(click)="stopNodes()"
|
||||||
class="menu-button"
|
class="menu-button"
|
||||||
>
|
>
|
||||||
<mat-icon class="unmarked">stop</mat-icon>
|
<mat-icon>stop</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
matTooltip="Reload all nodes"
|
matTooltip="Reload all nodes"
|
||||||
@ -36,5 +36,5 @@
|
|||||||
(click)="reloadNodes()"
|
(click)="reloadNodes()"
|
||||||
class="menu-button"
|
class="menu-button"
|
||||||
>
|
>
|
||||||
<mat-icon class="unmarked">replay</mat-icon>
|
<mat-icon>replay</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
|
@ -11,10 +11,6 @@
|
|||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.unmarked {
|
|
||||||
color: white!important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.marked {
|
.marked {
|
||||||
color: #0097a7!important;
|
color: #0097a7!important;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
mat-icon-button
|
mat-icon-button
|
||||||
class="menu-button"
|
class="menu-button"
|
||||||
(click)="addDrawing('text')">
|
(click)="addDrawing('text')">
|
||||||
<mat-icon [ngClass]="{unmarked: !drawTools.isTextChosen, marked: drawTools.isTextChosen}">create</mat-icon>
|
<mat-icon [ngClass]="{unmarkedLight: !drawTools.isTextChosen && isLightThemeEnabled, marked: drawTools.isTextChosen}">create</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<input
|
<input
|
||||||
type="file"
|
type="file"
|
||||||
@ -16,23 +16,23 @@
|
|||||||
mat-icon-button
|
mat-icon-button
|
||||||
class="menu-button"
|
class="menu-button"
|
||||||
(click)="file.click()">
|
(click)="file.click()">
|
||||||
<mat-icon class="unmarked">image</mat-icon>
|
<mat-icon>image</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
matTooltip="Draw a rectangle"
|
matTooltip="Draw a rectangle"
|
||||||
mat-icon-button
|
mat-icon-button
|
||||||
class="menu-button"
|
class="menu-button"
|
||||||
(click)="addDrawing('rectangle')">
|
(click)="addDrawing('rectangle')">
|
||||||
<mat-icon [ngClass]="{unmarked: !drawTools.isRectangleChosen, marked: drawTools.isRectangleChosen}">crop_3_2</mat-icon>
|
<mat-icon [ngClass]="{unmarkedLight: !drawTools.isRectangleChosen && isLightThemeEnabled, marked: drawTools.isRectangleChosen}">crop_3_2</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
matTooltip="Draw an ellipse"
|
matTooltip="Draw an ellipse"
|
||||||
mat-icon-button
|
mat-icon-button
|
||||||
class="menu-button"
|
class="menu-button"
|
||||||
(click)="addDrawing('ellipse')">
|
(click)="addDrawing('ellipse')">
|
||||||
<mat-icon [ngClass]="{unmarked: !drawTools.isEllipseChosen, marked: drawTools.isEllipseChosen}">panorama_fish_eye</mat-icon>
|
<mat-icon [ngClass]="{unmarkedLight: !drawTools.isEllipseChosen && isLightThemeEnabled, marked: drawTools.isEllipseChosen}">panorama_fish_eye</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button *ngIf="!isLightThemeEnabled"
|
||||||
matTooltip="Draw a line"
|
matTooltip="Draw a line"
|
||||||
mat-icon-button class="menu-button"
|
mat-icon-button class="menu-button"
|
||||||
(click)="addDrawing('line')">
|
(click)="addDrawing('line')">
|
||||||
@ -46,12 +46,26 @@
|
|||||||
style="stroke:white;stroke-width:2"/>
|
style="stroke:white;stroke-width:2"/>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
|
<button *ngIf="isLightThemeEnabled"
|
||||||
|
matTooltip="Draw a line"
|
||||||
|
mat-icon-button class="menu-button"
|
||||||
|
(click)="addDrawing('line')">
|
||||||
|
<svg height="40" width="40">
|
||||||
|
<line
|
||||||
|
[ngClass]="{ selected: drawTools.isLineChosen }"
|
||||||
|
x1="30"
|
||||||
|
y1="10"
|
||||||
|
x2="10"
|
||||||
|
y2="30"
|
||||||
|
style="stroke:black;stroke-width:2"/>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
<button
|
<button
|
||||||
matTooltip="Lock or unlock all items"
|
matTooltip="Lock or unlock all items"
|
||||||
mat-icon-button
|
mat-icon-button
|
||||||
class="menu-button"
|
class="menu-button"
|
||||||
(click)="changeLockValue()">
|
(click)="changeLockValue()">
|
||||||
<mat-icon [ngClass]="{unmarked: !isLocked, marked: isLocked}">lock</mat-icon>
|
<mat-icon [ngClass]="{unmarkedLight: !isLocked && isLightThemeEnabled, marked: isLocked}">lock</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
matTooltip="Take a screenshot"
|
matTooltip="Take a screenshot"
|
||||||
@ -59,7 +73,7 @@
|
|||||||
class="menu-button"
|
class="menu-button"
|
||||||
(click)="takeScreenshot()"
|
(click)="takeScreenshot()"
|
||||||
>
|
>
|
||||||
<mat-icon class="unmarked">photo_camera</mat-icon>
|
<mat-icon [ngClass]="{unmarkedLight: !isLocked && isLightThemeEnabled}">photo_camera</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<app-drawing-added
|
<app-drawing-added
|
||||||
[server]="server"
|
[server]="server"
|
||||||
|
@ -27,6 +27,10 @@ mat-divider.divider {
|
|||||||
color: white!important;
|
color: white!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.unmarkedLight {
|
||||||
|
color: black!important;
|
||||||
|
}
|
||||||
|
|
||||||
.marked {
|
.marked {
|
||||||
color: #0097a7!important;
|
color: #0097a7!important;
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ import { ElectronService } from 'ngx-electron';
|
|||||||
import { MatDialog } from '@angular/material';
|
import { MatDialog } from '@angular/material';
|
||||||
import { ScreenshotDialogComponent, Screenshot } from '../screenshot-dialog/screenshot-dialog.component';
|
import { ScreenshotDialogComponent, Screenshot } from '../screenshot-dialog/screenshot-dialog.component';
|
||||||
import { saveAsPng, saveAsJpeg } from 'save-html-as-image';
|
import { saveAsPng, saveAsJpeg } from 'save-html-as-image';
|
||||||
|
import { ThemeService } from '../../../services/theme.service';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -31,16 +32,20 @@ export class ProjectMapMenuComponent implements OnInit, OnDestroy {
|
|||||||
isTextChosen: false
|
isTextChosen: false
|
||||||
};
|
};
|
||||||
public isLocked: boolean = false;
|
public isLocked: boolean = false;
|
||||||
|
public isLightThemeEnabled: boolean = false;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private toolsService: ToolsService,
|
private toolsService: ToolsService,
|
||||||
private mapSettingsService: MapSettingsService,
|
private mapSettingsService: MapSettingsService,
|
||||||
private drawingService: DrawingService,
|
private drawingService: DrawingService,
|
||||||
private symbolService: SymbolService,
|
private symbolService: SymbolService,
|
||||||
private dialog: MatDialog
|
private dialog: MatDialog,
|
||||||
|
private themeService: ThemeService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit() {}
|
ngOnInit() {
|
||||||
|
this.themeService.getActualTheme() === 'light' ? this.isLightThemeEnabled = true : this.isLightThemeEnabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
public takeScreenshot() {
|
public takeScreenshot() {
|
||||||
const dialogRef = this.dialog.open(ScreenshotDialogComponent, {
|
const dialogRef = this.dialog.open(ScreenshotDialogComponent, {
|
||||||
|
@ -33,11 +33,15 @@
|
|||||||
></app-experimental-map>
|
></app-experimental-map>
|
||||||
|
|
||||||
<div class="project-toolbar">
|
<div class="project-toolbar">
|
||||||
<mat-toolbar color="primary" class="project-toolbar">
|
<mat-toolbar color="primary" class="project-toolbar" [ngClass]="{lightTheme: isLightThemeEnabled}">
|
||||||
<mat-toolbar-row>
|
<mat-toolbar-row *ngIf="!isLightThemeEnabled">
|
||||||
<button matTooltip="Open menu" mat-icon-button [matMenuTriggerFor]="mainMenu"><mat-icon svgIcon="gns3"></mat-icon></button>
|
<button matTooltip="Open menu" mat-icon-button [matMenuTriggerFor]="mainMenu"><mat-icon svgIcon="gns3"></mat-icon></button>
|
||||||
</mat-toolbar-row>
|
</mat-toolbar-row>
|
||||||
|
|
||||||
|
<mat-toolbar-row *ngIf="isLightThemeEnabled">
|
||||||
|
<button matTooltip="Open menu" mat-icon-button [matMenuTriggerFor]="mainMenu"><mat-icon svgIcon="gns3black"></mat-icon></button>
|
||||||
|
</mat-toolbar-row>
|
||||||
|
|
||||||
<mat-menu #mainMenu="matMenu" [overlapTrigger]="false">
|
<mat-menu #mainMenu="matMenu" [overlapTrigger]="false">
|
||||||
<button mat-menu-item [routerLink]="['/server', server.id, 'projects']">
|
<button mat-menu-item [routerLink]="['/server', server.id, 'projects']">
|
||||||
<mat-icon>work</mat-icon>
|
<mat-icon>work</mat-icon>
|
||||||
|
@ -21,8 +21,14 @@ g.node:hover {
|
|||||||
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
-webkit-filter: invert(1);
|
||||||
|
filter: invert(1);
|
||||||
|
}
|
||||||
|
|
||||||
.lightTheme {
|
.lightTheme {
|
||||||
background: #0d47a1!important;
|
background: white!important;
|
||||||
|
color: black!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#show-menu-wrapper {
|
#show-menu-wrapper {
|
||||||
@ -98,7 +104,7 @@ mat-divider.divider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.unmarked {
|
.unmarked {
|
||||||
color: white!important;
|
color: black!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.marked {
|
.marked {
|
||||||
@ -111,6 +117,7 @@ mat-divider.divider {
|
|||||||
bottom: 20px;
|
bottom: 20px;
|
||||||
right: 20px;
|
right: 20px;
|
||||||
display: grid;
|
display: grid;
|
||||||
|
color: white;
|
||||||
|
|
||||||
.zoom-button {
|
.zoom-button {
|
||||||
outline: none;
|
outline: none;
|
||||||
@ -118,7 +125,7 @@ mat-divider.divider {
|
|||||||
width: 40px;
|
width: 40px;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border: none;
|
border: none;
|
||||||
color: white;
|
color: black;
|
||||||
font-size: 1.25rem;
|
font-size: 1.25rem;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
||||||
|
@ -12,7 +12,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.lightTheme {
|
.lightTheme {
|
||||||
background: #0d47a1;
|
background: white!important;
|
||||||
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
.summaryHeaderMenu {
|
.summaryHeaderMenu {
|
||||||
|
88
src/assets/gns3_icon_black.svg
Normal file
88
src/assets/gns3_icon_black.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 11 KiB |
Loading…
x
Reference in New Issue
Block a user