add high contrast theme

This commit is contained in:
Mononaut authored and natsoni committed 2024-04-06 15:56:53 +09:00
1 parent 1ca05a029a
commit 79dd263fb1
54 files changed
+446 -149

No files matched your search

+11 -7
View File
@@ -46,13 +46,17 @@ export class ThemeService {
this.mempoolFeeColors = contrastMempoolFeeColors;
this.auditColors = contrastAuditColors;
}
if (!this.style) {
this.style = document.createElement('link');
this.style.rel = 'stylesheet';
this.style.href = `theme-${theme}.css`;
document.head.appendChild(this.style);
} else {
this.style.href = `theme-${theme}.css`;
try {
if (!this.style) {
this.style = document.createElement('link');
this.style.rel = 'stylesheet';
this.style.href = `${theme}.css`;
document.head.appendChild(this.style);
} else {
this.style.href = `${theme}.css`;
}
} catch (err) {
console.log('failed to apply theme stylesheet: ', err);
}
} else {
this.mempoolFeeColors = defaultMempoolFeeColors;