This repository has been archived by the owner on Aug 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add Dark mode + some rewrites (#248)
* chore: start on scss rewrite * chore: rewrite done, added themes * chore: almost done with themes * chore: almost done with themes.... * chore: finished themes * chore: fix other merge conflicts * fix: make CONNECT_PYTHON_ROBOT button primary * chore: prettier * chore: fix some mistakes * chore: fix select color * chore: fix all issues * chore: fix last issues * chore: prettier * fix: oops * chore: fix last issues... (again) * chore: prettier * fix: more contrast to file explorer names * chore: fix color of second selection screen * chore: last header border color * chore: last few styling issues * chore: prettier * fix: oops * fix: modal -> dialog * chore: remove change of color on file explorer * fix: background overrides all props, also when none * fix: duplicate keys * chore: fix last styling issue * chore: prettier * fix: change text color of upload log
- Loading branch information
Showing
33 changed files
with
544 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 22 additions & 3 deletions
25
src/app/modules/blockly-editor/components/code-view/code-view.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,36 @@ | ||
import { Component } from "@angular/core"; | ||
import { | ||
AfterViewInit, | ||
ChangeDetectorRef, | ||
Component, | ||
OnInit, | ||
} from "@angular/core"; | ||
import { CodeEditorState } from "../../../../state/code-editor.state"; | ||
import { editor } from "monaco-editor"; | ||
import IStandaloneEditorConstructionOptions = editor.IStandaloneEditorConstructionOptions; | ||
import { AppState } from "../../../../state/app.state"; | ||
|
||
@Component({ | ||
selector: "app-code-view", | ||
templateUrl: "./code-view.component.html", | ||
styleUrls: ["./code-view.component.scss"], | ||
}) | ||
export class CodeViewComponent { | ||
editorOptions = { | ||
editorOptions: IStandaloneEditorConstructionOptions = { | ||
language: "cpp", | ||
readOnly: true, | ||
automaticLayout: true, | ||
theme: "vs", | ||
}; | ||
|
||
constructor(public codeEditor: CodeEditorState) {} | ||
constructor( | ||
private cdr: ChangeDetectorRef, | ||
public codeEditor: CodeEditorState, | ||
private appState: AppState, | ||
) { | ||
// check if we are currently in dark mode | ||
const isDarkMode = this.appState.selectedTheme === "dark"; | ||
if (isDarkMode) { | ||
this.editorOptions.theme = "vs-dark"; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.