Add wiz theme
This commit is contained in:
@@ -69,7 +69,7 @@ export default class BlockScene {
|
||||
}
|
||||
|
||||
setColorFunction(colorFunction: ((tx: TxView) => Color) | null): void {
|
||||
this.theme.theme !== 'default' ? this.getColor = colorFunction || contrastColorFunction : this.getColor = colorFunction || defaultColorFunction;
|
||||
this.theme.theme === 'contrast' ? this.getColor = colorFunction || contrastColorFunction : this.getColor = colorFunction || defaultColorFunction;
|
||||
this.updateAllColors();
|
||||
}
|
||||
|
||||
@@ -246,7 +246,7 @@ export default class BlockScene {
|
||||
this.flip = flip;
|
||||
this.vertexArray = vertexArray;
|
||||
this.highlightingEnabled = highlighting;
|
||||
theme.theme !== 'default' ? this.getColor = colorFunction || contrastColorFunction : this.getColor = colorFunction || defaultColorFunction;
|
||||
theme.theme === 'contrast' ? this.getColor = colorFunction || contrastColorFunction : this.getColor = colorFunction || defaultColorFunction;
|
||||
this.theme = theme;
|
||||
|
||||
this.scene = {
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
<select formControlName="theme" class="custom-select custom-select-sm form-control-secondary form-control mx-auto" (change)="changeTheme()">
|
||||
<option value="default" i18n="mempool-goggles.classic">Classic</option>
|
||||
<option value="contrast">BlueMatt</option>
|
||||
<option value="wiz">Wiz</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,7 @@ import { ThemeService } from '../../services/theme.service';
|
||||
})
|
||||
export class ThemeSelectorComponent implements OnInit {
|
||||
themeForm: UntypedFormGroup;
|
||||
themes = ['default', 'contrast'];
|
||||
themes = ['default', 'contrast', 'wiz'];
|
||||
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
|
||||
@@ -22,9 +22,7 @@ export class ThemeService {
|
||||
apply(theme) {
|
||||
this.theme = theme;
|
||||
if (theme !== 'default') {
|
||||
if (theme === 'contrast') {
|
||||
this.mempoolFeeColors = contrastMempoolFeeColors;
|
||||
}
|
||||
theme === 'contrast' ? this.mempoolFeeColors = contrastMempoolFeeColors : this.mempoolFeeColors = defaultMempoolFeeColors;
|
||||
try {
|
||||
if (!this.style) {
|
||||
this.style = document.createElement('link');
|
||||
|
||||
Reference in New Issue
Block a user