Fix some dark mode styling
This commit is contained in:
parent
826f01d1ab
commit
a9dd16cc64
@ -18,6 +18,7 @@ export class CodeComponent extends EditorNodeContract implements OnInit {
|
|||||||
public notAvailableOffline = false;
|
public notAvailableOffline = false;
|
||||||
|
|
||||||
public editorOptions = {
|
public editorOptions = {
|
||||||
|
theme: this.isDark() ? 'vs-dark' : 'vs',
|
||||||
language: 'javascript',
|
language: 'javascript',
|
||||||
uri: v4(),
|
uri: v4(),
|
||||||
readOnly: false,
|
readOnly: false,
|
||||||
@ -100,6 +101,10 @@ export class CodeComponent extends EditorNodeContract implements OnInit {
|
|||||||
public readonly api: ApiService,
|
public readonly api: ApiService,
|
||||||
) { super(); }
|
) { super(); }
|
||||||
|
|
||||||
|
public isDark() {
|
||||||
|
return document.body.classList.contains('dark');
|
||||||
|
}
|
||||||
|
|
||||||
public isDirty(): boolean | Promise<boolean> {
|
public isDirty(): boolean | Promise<boolean> {
|
||||||
return this.dirty;
|
return this.dirty;
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
<div class="grid-wrapper">
|
<div class="grid-wrapper">
|
||||||
<ag-grid-angular
|
<ag-grid-angular
|
||||||
style="width: 100%; height: 500px;"
|
style="width: 100%; height: 500px;"
|
||||||
class="ag-theme-balham"
|
[ngClass]="isDark() ? 'ag-theme-balham-dark' : 'ag-theme-balham'"
|
||||||
[rowData]="rowData"
|
[rowData]="rowData"
|
||||||
[columnDefs]="columnDefs"
|
[columnDefs]="columnDefs"
|
||||||
suppressMovableColumns="true"
|
suppressMovableColumns="true"
|
||||||
|
@ -33,6 +33,10 @@ export class DatabaseComponent extends EditorNodeContract implements OnInit {
|
|||||||
public notAvailableOffline = false;
|
public notAvailableOffline = false;
|
||||||
protected dbId!: string;
|
protected dbId!: string;
|
||||||
|
|
||||||
|
public isDark() {
|
||||||
|
return document.body.classList.contains('dark');
|
||||||
|
}
|
||||||
|
|
||||||
public get readonly() {
|
public get readonly() {
|
||||||
return !this.node || !this.editorService.canEdit();
|
return !this.node || !this.editorService.canEdit();
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<div class="container"
|
<div [ngClass]="isDark() ? 'container dark' : 'container'"
|
||||||
(dblclick)="onFocusIn($event)">
|
(dblclick)="onFocusIn($event)">
|
||||||
<div class="toolbar-base" *ngIf="isFocused">
|
<div class="toolbar-base" *ngIf="isFocused">
|
||||||
<button class="toolbar-button" title="Bold" (click)="documentCommand('bold')">
|
<button class="toolbar-button" title="Bold" (click)="documentCommand('bold')">
|
||||||
|
@ -34,3 +34,13 @@
|
|||||||
margin: 0 5px;
|
margin: 0 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.container.dark {
|
||||||
|
.editable-base.focused {
|
||||||
|
background: #404040 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toolbar-base .toolbar-button:hover {
|
||||||
|
background: #404040;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -27,6 +27,10 @@ export class NormComponent extends EditorNodeContract implements OnInit {
|
|||||||
this.savedValue = this.initialValue;
|
this.savedValue = this.initialValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public isDark() {
|
||||||
|
return document.body.classList.contains('dark');
|
||||||
|
}
|
||||||
|
|
||||||
public isDirty(): boolean | Promise<boolean> {
|
public isDirty(): boolean | Promise<boolean> {
|
||||||
return this.dirtyOverride || this.contents !== this.savedValue;
|
return this.dirtyOverride || this.contents !== this.savedValue;
|
||||||
}
|
}
|
||||||
|
@ -63,3 +63,6 @@ ion-icon.invisible {
|
|||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body.dark {
|
||||||
|
}
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
@import '~@circlon/angular-tree-component/css/angular-tree-component.css';
|
@import '~@circlon/angular-tree-component/css/angular-tree-component.css';
|
||||||
@import "~ag-grid-community/dist/styles/ag-grid.css";
|
@import "~ag-grid-community/dist/styles/ag-grid.css";
|
||||||
@import "~ag-grid-community/dist/styles/ag-theme-balham.css";
|
@import "~ag-grid-community/dist/styles/ag-theme-balham.css";
|
||||||
|
@import "~ag-grid-community/dist/styles/ag-theme-balham-dark.css";
|
||||||
@import "~@fortawesome/fontawesome-free/css/all.min.css";
|
@import "~@fortawesome/fontawesome-free/css/all.min.css";
|
||||||
@import "~@fortawesome/fontawesome-free/css/brands.min.css";
|
@import "~@fortawesome/fontawesome-free/css/brands.min.css";
|
||||||
|
|
||||||
@ -134,3 +135,18 @@ hr {
|
|||||||
.clear-btn {
|
.clear-btn {
|
||||||
background: rgba(0,0,0,0);
|
background: rgba(0,0,0,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ============== DARK MODE FIXES ============== */
|
||||||
|
body.dark {
|
||||||
|
.node-content-wrapper:hover {
|
||||||
|
background: rgba(35,35,80,0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
ion-item, ion-title, ion-button {
|
||||||
|
color: white !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
ion-input {
|
||||||
|
--color: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user