Compare commits

...

4 Commits

Author SHA1 Message Date
Mononaut
420cac42aa add high contrast theme 2023-01-03 05:24:14 -06:00
Mononaut
1b68f32adc add theme selector to main dashboard 2023-01-03 05:07:51 -06:00
Mononaut
f2f6e3769a implement theme switching service 2023-01-03 05:07:51 -06:00
Mononaut
f9f8bd25f8 convert to CSS variables 2023-01-03 05:07:51 -06:00
113 changed files with 980 additions and 395 deletions

View File

@@ -162,6 +162,11 @@
],
"styles": [
"src/styles.scss",
{
"input": "src/theme-contrast.scss",
"bundleName": "contrast",
"inject": false
},
"node_modules/@fortawesome/fontawesome-svg-core/styles.css"
],
"vendorChunk": true,

View File

@@ -1,4 +1,4 @@
export const mempoolFeeColors = [
export const defaultMempoolFeeColors = [
'557d00',
'5d7d01',
'637d02',
@@ -31,6 +31,39 @@ export const mempoolFeeColors = [
'b9254b',
];
export const contrastMempoolFeeColors = [
'0082e6',
'0984df',
'1285d9',
'1a87d2',
'2388cb',
'2c8ac5',
'358bbe',
'3e8db7',
'468eb0',
'4f90aa',
'5892a3',
'61939c',
'6a9596',
'72968f',
'7b9888',
'849982',
'8d9b7b',
'959c74',
'9e9e6e',
'a79f67',
'b0a160',
'b9a35a',
'c1a453',
'caa64c',
'd3a745',
'dca93f',
'e5aa38',
'edac31',
'f6ad2b',
'ffaf24',
];
export const chartColors = [
"#D81B60",
"#8E24AA",

View File

@@ -15,6 +15,7 @@ import { SharedModule } from './shared/shared.module';
import { StorageService } from './services/storage.service';
import { HttpCacheInterceptor } from './services/http-cache.interceptor';
import { LanguageService } from './services/language.service';
import { ThemeService } from './services/theme.service';
import { FiatShortenerPipe } from './shared/pipes/fiat-shortener.pipe';
import { ShortenStringPipe } from './shared/pipes/shorten-string-pipe/shorten-string.pipe';
import { CapAddressPipe } from './shared/pipes/cap-address-pipe/cap-address-pipe';
@@ -30,6 +31,7 @@ const providers = [
StorageService,
EnterpriseService,
LanguageService,
ThemeService,
ShortenStringPipe,
FiatShortenerPipe,
CapAddressPipe,

View File

@@ -61,18 +61,18 @@
}
.big-fiat {
color: #3bcc49;
color: var(--green);
font-size: 26px;
}
.card {
background-color: #1d1f31;
background-color: var(--bg);
height: 100%;
}
.card-title {
color: #4a68b9;
color: var(--title-fg);
font-size: 1rem;
}
@@ -85,7 +85,7 @@
.progress {
display: inline-flex;
width: 100%;
background-color: #2d3348;
background-color: var(--secondary);
height: 1.1rem;
}

View File

@@ -3,7 +3,7 @@
width: 150px;
}
.mobile-even tr:nth-of-type(even) {
background-color: #181b2d;
background-color: var(--stat-box-bg);
}
.mobile-even tr:nth-of-type(odd) {
background-color: inherit;

View File

@@ -12,15 +12,15 @@
}
.green {
color:#28a745;
color: var(--green);
}
.red {
color:#dc3545;
color: var(--red);
}
.grey {
color:#6c757d;
color: var(--grey);
}
@media (max-width: 767.98px) {

View File

@@ -1,3 +1,3 @@
.green-color {
color: #3bcc49;
color: var(--green);
}

View File

@@ -1,3 +1,3 @@
.green-color {
color: #3bcc49;
color: var(--green);
}

View File

@@ -4,6 +4,7 @@ import { Router, NavigationEnd } from '@angular/router';
import { StateService } from '../../services/state.service';
import { OpenGraphService } from '../../services/opengraph.service';
import { NgbTooltipConfig } from '@ng-bootstrap/ng-bootstrap';
import { ThemeService } from 'src/app/services/theme.service';
@Component({
selector: 'app-root',
@@ -19,6 +20,7 @@ export class AppComponent implements OnInit {
private stateService: StateService,
private openGraphService: OpenGraphService,
private location: Location,
private theme: ThemeService,
tooltipConfig: NgbTooltipConfig,
@Inject(LOCALE_ID) private locale: string,
) {

View File

@@ -19,7 +19,7 @@
}
.card {
background-color: #1d1f31;
background-color: var(--bg);
width: 200px;
height: 200px;
align-items: center;

View File

@@ -7,7 +7,7 @@
}
.card {
background-color: #1d1f31;
background-color: var(--bg);
width: 200px;
height: 200px;
align-items: center;

View File

@@ -1,5 +1,5 @@
li.nav-item.active {
background-color: #653b9c;
background-color: var(--tertiary);
}
fa-icon {
@@ -95,23 +95,23 @@ nav {
}
.mainnet.active {
background-color: #653b9c;
background-color: var(--tertiary);
}
.liquid.active {
background-color: #116761;
background-color: var(--liquid);
}
.liquidtestnet.active {
background-color: #494a4a;
background-color: var(--liquidtestnet);
}
.testnet.active {
background-color: #1d486f;
background-color: var(--testnet);
}
.signet.active {
background-color: #6f1d5d;
background-color: var(--signet);
}
.dropdown-divider {

View File

@@ -170,7 +170,7 @@ export class BlockFeeRatesGraphComponent implements OnInit {
borderRadius: 4,
shadowColor: 'rgba(0, 0, 0, 0.5)',
textStyle: {
color: '#b1b1b1',
color: 'var(--tooltip-grey)',
align: 'left',
},
borderColor: '#000',
@@ -238,7 +238,7 @@ export class BlockFeeRatesGraphComponent implements OnInit {
splitLine: {
lineStyle: {
type: 'dotted',
color: '#ffffff66',
color: 'var(--transparent-fg)',
opacity: 0.25,
}
},
@@ -305,7 +305,7 @@ export class BlockFeeRatesGraphComponent implements OnInit {
const now = new Date();
// @ts-ignore
this.chartOptions.grid.bottom = 40;
this.chartOptions.backgroundColor = '#11131f';
this.chartOptions.backgroundColor = 'var(--active-bg)';
this.chartInstance.setOption(this.chartOptions);
download(this.chartInstance.getDataURL({
pixelRatio: 2,

View File

@@ -142,7 +142,7 @@ export class BlockFeesGraphComponent implements OnInit {
borderRadius: 4,
shadowColor: 'rgba(0, 0, 0, 0.5)',
textStyle: {
color: '#b1b1b1',
color: 'var(--tooltip-grey)',
align: 'left',
},
borderColor: '#000',
@@ -205,7 +205,7 @@ export class BlockFeesGraphComponent implements OnInit {
splitLine: {
lineStyle: {
type: 'dotted',
color: '#ffffff66',
color: 'var(--transparent-fg)',
opacity: 0.25,
}
},
@@ -296,7 +296,7 @@ export class BlockFeesGraphComponent implements OnInit {
const now = new Date();
// @ts-ignore
this.chartOptions.grid.bottom = 40;
this.chartOptions.backgroundColor = '#11131f';
this.chartOptions.backgroundColor = 'var(--active-bg)';
this.chartInstance.setOption(this.chartOptions);
download(this.chartInstance.getDataURL({
pixelRatio: 2,

View File

@@ -2,7 +2,7 @@
position: relative;
width: 100%;
padding-bottom: 100%;
background: #181b2d;
background: var(--stat-box-bg);
display: flex;
justify-content: center;
align-items: center;

View File

@@ -5,6 +5,8 @@ import BlockScene from './block-scene';
import TxSprite from './tx-sprite';
import TxView from './tx-view';
import { Position } from './sprite-types';
import { ThemeService } from 'src/app/services/theme.service';
import { Subscription } from 'rxjs';
@Component({
selector: 'app-block-overview-graph',
@@ -26,6 +28,7 @@ export class BlockOverviewGraphComponent implements AfterViewInit, OnDestroy, On
@ViewChild('blockCanvas')
canvas: ElementRef<HTMLCanvasElement>;
themeChangedSubscription: Subscription;
gl: WebGLRenderingContext;
animationFrameRequest: number;
@@ -48,6 +51,7 @@ export class BlockOverviewGraphComponent implements AfterViewInit, OnDestroy, On
constructor(
readonly ngZone: NgZone,
readonly elRef: ElementRef,
private themeService: ThemeService,
) {
this.vertexArray = new FastVertexArray(512, TxSprite.dataSize);
}
@@ -59,6 +63,11 @@ export class BlockOverviewGraphComponent implements AfterViewInit, OnDestroy, On
this.initCanvas();
this.resizeCanvas();
this.themeChangedSubscription = this.themeService.themeChanged$.subscribe(() => {
// force full re-render
this.resizeCanvas();
});
}
ngOnChanges(changes): void {
@@ -79,6 +88,7 @@ export class BlockOverviewGraphComponent implements AfterViewInit, OnDestroy, On
}
this.canvas.nativeElement.removeEventListener('webglcontextlost', this.handleContextLost);
this.canvas.nativeElement.removeEventListener('webglcontextrestored', this.handleContextRestored);
this.themeChangedSubscription.unsubscribe();
}
clear(direction): void {
@@ -195,7 +205,7 @@ export class BlockOverviewGraphComponent implements AfterViewInit, OnDestroy, On
this.start();
} else {
this.scene = new BlockScene({ width: this.displayWidth, height: this.displayHeight, resolution: this.resolution,
blockLimit: this.blockLimit, orientation: this.orientation, flip: this.flip, vertexArray: this.vertexArray });
blockLimit: this.blockLimit, orientation: this.orientation, flip: this.flip, vertexArray: this.vertexArray, theme: this.themeService });
this.start();
}
}

View File

@@ -2,11 +2,13 @@ import { FastVertexArray } from './fast-vertex-array';
import TxView from './tx-view';
import { TransactionStripped } from '../../interfaces/websocket.interface';
import { Position, Square, ViewUpdateParams } from './sprite-types';
import { ThemeService } from 'src/app/services/theme.service';
export default class BlockScene {
scene: { count: number, offset: { x: number, y: number}};
vertexArray: FastVertexArray;
txs: { [key: string]: TxView };
theme: ThemeService;
orientation: string;
flip: boolean;
width: number;
@@ -22,11 +24,11 @@ export default class BlockScene {
animateUntil = 0;
dirty: boolean;
constructor({ width, height, resolution, blockLimit, orientation, flip, vertexArray }:
constructor({ width, height, resolution, blockLimit, orientation, flip, vertexArray, theme }:
{ width: number, height: number, resolution: number, blockLimit: number,
orientation: string, flip: boolean, vertexArray: FastVertexArray }
orientation: string, flip: boolean, vertexArray: FastVertexArray, theme: ThemeService }
) {
this.init({ width, height, resolution, blockLimit, orientation, flip, vertexArray });
this.init({ width, height, resolution, blockLimit, orientation, flip, vertexArray, theme });
}
resize({ width = this.width, height = this.height, animate = true }: { width?: number, height?: number, animate: boolean }): void {
@@ -67,7 +69,7 @@ export default class BlockScene {
});
this.layout = new BlockLayout({ width: this.gridWidth, height: this.gridHeight });
txs.forEach(tx => {
const txView = new TxView(tx, this.vertexArray);
const txView = new TxView(tx, this.vertexArray, this.theme);
this.txs[tx.txid] = txView;
this.place(txView);
this.saveGridToScreenPosition(txView);
@@ -114,7 +116,7 @@ export default class BlockScene {
});
txs.forEach(tx => {
if (!this.txs[tx.txid]) {
this.txs[tx.txid] = new TxView(tx, this.vertexArray);
this.txs[tx.txid] = new TxView(tx, this.vertexArray, this.theme);
}
});
@@ -156,7 +158,7 @@ export default class BlockScene {
if (resetLayout) {
add.forEach(tx => {
if (!this.txs[tx.txid]) {
this.txs[tx.txid] = new TxView(tx, this.vertexArray);
this.txs[tx.txid] = new TxView(tx, this.vertexArray, this.theme);
}
});
this.layout = new BlockLayout({ width: this.gridWidth, height: this.gridHeight });
@@ -166,7 +168,7 @@ export default class BlockScene {
} else {
// try to insert new txs directly
const remaining = [];
add.map(tx => new TxView(tx, this.vertexArray)).sort(feeRateDescending).forEach(tx => {
add.map(tx => new TxView(tx, this.vertexArray, this.theme)).sort(feeRateDescending).forEach(tx => {
if (!this.tryInsertByFee(tx)) {
remaining.push(tx);
}
@@ -192,13 +194,14 @@ export default class BlockScene {
this.animateUntil = Math.max(this.animateUntil, tx.setHover(value));
}
private init({ width, height, resolution, blockLimit, orientation, flip, vertexArray }:
private init({ width, height, resolution, blockLimit, orientation, flip, vertexArray, theme }:
{ width: number, height: number, resolution: number, blockLimit: number,
orientation: string, flip: boolean, vertexArray: FastVertexArray }
orientation: string, flip: boolean, vertexArray: FastVertexArray, theme: ThemeService }
): void {
this.orientation = orientation;
this.flip = flip;
this.vertexArray = vertexArray;
this.theme = theme;
this.scene = {
count: 0,

View File

@@ -2,20 +2,10 @@ import TxSprite from './tx-sprite';
import { FastVertexArray } from './fast-vertex-array';
import { TransactionStripped } from '../../interfaces/websocket.interface';
import { SpriteUpdateParams, Square, Color, ViewUpdateParams } from './sprite-types';
import { feeLevels, mempoolFeeColors } from '../../app.constants';
import BlockScene from './block-scene';
import { feeLevels } from '../../app.constants';
import { ThemeService } from 'src/app/services/theme.service';
const hoverTransitionTime = 300;
const defaultHoverColor = hexToColor('1bd8f4');
const feeColors = mempoolFeeColors.map(hexToColor);
const auditFeeColors = feeColors.map((color) => darken(desaturate(color, 0.3), 0.9));
const auditColors = {
censored: hexToColor('f344df'),
missing: darken(desaturate(hexToColor('f344df'), 0.3), 0.7),
added: hexToColor('0099ff'),
selected: darken(desaturate(hexToColor('0099ff'), 0.3), 0.7),
}
// convert from this class's update format to TxSprite's update format
function toSpriteUpdate(params: ViewUpdateParams): SpriteUpdateParams {
@@ -37,6 +27,7 @@ export default class TxView implements TransactionStripped {
feerate: number;
status?: 'found' | 'missing' | 'fresh' | 'added' | 'censored' | 'selected';
context?: 'projected' | 'actual';
theme: ThemeService;
initialised: boolean;
vertexArray: FastVertexArray;
@@ -49,7 +40,7 @@ export default class TxView implements TransactionStripped {
dirty: boolean;
constructor(tx: TransactionStripped, vertexArray: FastVertexArray) {
constructor(tx: TransactionStripped, vertexArray: FastVertexArray, theme: ThemeService) {
this.context = tx.context;
this.txid = tx.txid;
this.fee = tx.fee;
@@ -59,6 +50,7 @@ export default class TxView implements TransactionStripped {
this.status = tx.status;
this.initialised = false;
this.vertexArray = vertexArray;
this.theme = theme;
this.hover = false;
@@ -131,10 +123,10 @@ export default class TxView implements TransactionStripped {
// Temporarily override the tx color
// returns minimum transition end time
setHover(hoverOn: boolean, color: Color | void = defaultHoverColor): number {
setHover(hoverOn: boolean, color: Color | void): number {
if (hoverOn) {
this.hover = true;
this.hoverColor = color;
this.hoverColor = color || this.theme.defaultHoverColor;
this.sprite.update({
...this.hoverColor,
@@ -155,22 +147,22 @@ export default class TxView implements TransactionStripped {
getColor(): Color {
const feeLevelIndex = feeLevels.findIndex((feeLvl) => Math.max(1, this.feerate) < feeLvl) - 1;
const feeLevelColor = feeColors[feeLevelIndex] || feeColors[mempoolFeeColors.length - 1];
const feeLevelColor = this.theme.feeColors[feeLevelIndex] || this.theme.feeColors[this.theme.mempoolFeeColors.length - 1];
// Block audit
switch(this.status) {
case 'censored':
return auditColors.censored;
return this.theme.auditColors.censored;
case 'missing':
return auditColors.missing;
return this.theme.auditColors.missing;
case 'fresh':
return auditColors.missing;
return this.theme.auditColors.missing;
case 'added':
return auditColors.added;
return this.theme.auditColors.added;
case 'selected':
return auditColors.selected;
return this.theme.auditColors.selected;
case 'found':
if (this.context === 'projected') {
return auditFeeColors[feeLevelIndex] || auditFeeColors[mempoolFeeColors.length - 1];
return this.theme.auditFeeColors[feeLevelIndex] || this.theme.auditFeeColors[this.theme.mempoolFeeColors.length - 1];
} else {
return feeLevelColor;
}
@@ -179,31 +171,3 @@ export default class TxView implements TransactionStripped {
}
}
}
function hexToColor(hex: string): Color {
return {
r: parseInt(hex.slice(0, 2), 16) / 255,
g: parseInt(hex.slice(2, 4), 16) / 255,
b: parseInt(hex.slice(4, 6), 16) / 255,
a: 1
};
}
function desaturate(color: Color, amount: number): Color {
const gray = (color.r + color.g + color.b) / 6;
return {
r: color.r + ((gray - color.r) * amount),
g: color.g + ((gray - color.g) * amount),
b: color.b + ((gray - color.b) * amount),
a: color.a,
};
}
function darken(color: Color, amount: number): Color {
return {
r: color.r * amount,
g: color.g * amount,
b: color.b * amount,
a: color.a,
}
}

View File

@@ -3,7 +3,7 @@
background: rgba(#11131f, 0.95);
border-radius: 4px;
box-shadow: 1px 1px 10px rgba(0,0,0,0.5);
color: #b1b1b1;
color: var(--tooltip-grey);
display: flex;
flex-direction: column;
justify-content: space-between;

View File

@@ -130,7 +130,7 @@ export class BlockPredictionGraphComponent implements OnInit {
borderRadius: 4,
shadowColor: 'rgba(0, 0, 0, 0.5)',
textStyle: {
color: '#b1b1b1',
color: 'var(--tooltip-grey)',
align: 'left',
},
borderColor: '#000',
@@ -177,7 +177,7 @@ export class BlockPredictionGraphComponent implements OnInit {
splitLine: {
lineStyle: {
type: 'dotted',
color: '#ffffff66',
color: 'var(--transparent-fg)',
opacity: 0.25,
}
},
@@ -289,7 +289,7 @@ export class BlockPredictionGraphComponent implements OnInit {
const now = new Date();
// @ts-ignore
this.chartOptions.grid.bottom = 40;
this.chartOptions.backgroundColor = '#11131f';
this.chartOptions.backgroundColor = 'var(--active-bg)';
this.chartInstance.setOption(this.chartOptions);
download(this.chartInstance.getDataURL({
pixelRatio: 2,

View File

@@ -142,7 +142,7 @@ export class BlockRewardsGraphComponent implements OnInit {
borderRadius: 4,
shadowColor: 'rgba(0, 0, 0, 0.5)',
textStyle: {
color: '#b1b1b1',
color: 'var(--tooltip-grey)',
align: 'left',
},
borderColor: '#000',
@@ -211,7 +211,7 @@ export class BlockRewardsGraphComponent implements OnInit {
splitLine: {
lineStyle: {
type: 'dotted',
color: '#ffffff66',
color: 'var(--transparent-fg)',
opacity: 0.25,
}
},
@@ -307,7 +307,7 @@ export class BlockRewardsGraphComponent implements OnInit {
const now = new Date();
// @ts-ignore
this.chartOptions.grid.bottom = 40;
this.chartOptions.backgroundColor = '#11131f';
this.chartOptions.backgroundColor = 'var(--active-bg)';
this.chartInstance.setOption(this.chartOptions);
download(this.chartInstance.getDataURL({
pixelRatio: 2,

View File

@@ -141,7 +141,7 @@ export class BlockSizesWeightsGraphComponent implements OnInit {
borderRadius: 4,
shadowColor: 'rgba(0, 0, 0, 0.5)',
textStyle: {
color: '#b1b1b1',
color: 'var(--tooltip-grey)',
align: 'left',
},
borderColor: '#000',
@@ -214,7 +214,7 @@ export class BlockSizesWeightsGraphComponent implements OnInit {
splitLine: {
lineStyle: {
type: 'dotted',
color: '#ffffff66',
color: 'var(--transparent-fg)',
opacity: 0.25,
}
},
@@ -236,7 +236,7 @@ export class BlockSizesWeightsGraphComponent implements OnInit {
symbol: 'none',
lineStyle: {
type: 'solid',
color: '#ffffff66',
color: 'var(--transparent-fg)',
opacity: 1,
width: 1,
},
@@ -314,7 +314,7 @@ export class BlockSizesWeightsGraphComponent implements OnInit {
const now = new Date();
// @ts-ignore
this.chartOptions.grid.bottom = 40;
this.chartOptions.backgroundColor = '#11131f';
this.chartOptions.backgroundColor = 'var(--active-bg)';
this.chartInstance.setOption(this.chartOptions);
download(this.chartInstance.getDataURL({
pixelRatio: 2,

View File

@@ -118,9 +118,7 @@ h1 {
}
a {
color: #1ad8f4;
&:hover, &:focus {
color: #09a3ba;
display: inline-block;
}
}
@@ -196,7 +194,7 @@ h1 {
cursor: pointer;
&.active {
background: #24273e;
background: var(--box-bg);
}
&.active, &:hover {

View File

@@ -97,7 +97,7 @@
}
.black-background {
background-color: #11131f;
background-color: var(--active-bg);
z-index: 100;
position: relative;
}

View File

@@ -37,12 +37,12 @@ export class BlockchainBlocksComponent implements OnInit, OnDestroy {
timeLtr: boolean;
gradientColors = {
'': ['#9339f4', '#105fb0'],
bisq: ['#9339f4', '#105fb0'],
liquid: ['#116761', '#183550'],
'liquidtestnet': ['#494a4a', '#272e46'],
testnet: ['#1d486f', '#183550'],
signet: ['#6f1d5d', '#471850'],
'': ['var(--mainnet-alt)', 'var(--primary)'],
bisq: ['var(--mainnet-alt)', 'var(--primary)'],
liquid: ['var(--liquid)', 'var(--testnet-alt)'],
'liquidtestnet': ['var(--liquidtestnet)', 'var(--liquidtestnet-alt)'],
testnet: ['var(--testnet)', 'var(--testnet-alt)'],
signet: ['var(--signet)', 'var(--signet-alt)'],
};
constructor(
@@ -181,7 +181,7 @@ export class BlockchainBlocksComponent implements OnInit, OnDestroy {
left: addLeft + 155 * this.blocks.indexOf(block) + 'px',
background: `repeating-linear-gradient(
#2d3348,
#2d3348 ${greenBackgroundHeight}%,
var(--secondary) ${greenBackgroundHeight}%,
${this.gradientColors[this.network][0]} ${Math.max(greenBackgroundHeight, 0)}%,
${this.gradientColors[this.network][1]} 100%
)`,
@@ -198,7 +198,7 @@ export class BlockchainBlocksComponent implements OnInit, OnDestroy {
return {
left: addLeft + 155 * this.emptyBlocks.indexOf(block) + 'px',
background: "#2d3348",
background: "var(--secondary)",
};
}

View File

@@ -67,7 +67,7 @@
}
.black-background {
background-color: #11131f;
background-color: var(--active-bg);
z-index: 100;
position: relative;
}

View File

@@ -36,7 +36,7 @@ tr, td, th {
}
.progress {
background-color: #2d3348;
background-color: var(--secondary);
}
.pool {

View File

@@ -43,7 +43,7 @@
<h5 class="card-title" i18n="difficulty-box.current-period">Current Period</h5>
<div class="card-text">{{ epochData.progress | number: '1.2-2' }} <span class="symbol">%</span></div>
<div class="progress small-bar">
<div class="progress-bar" role="progressbar" style="width: 15%; background-color: #105fb0" [ngStyle]="{'width': epochData.base}">&nbsp;</div>
<div class="progress-bar" role="progressbar" style="width: 15%; background-color: var(--primary)" [ngStyle]="{'width': epochData.base}">&nbsp;</div>
</div>
</div>
<div class="item" *ngIf="showHalving">

View File

@@ -4,7 +4,7 @@
justify-content: space-around;
height: 76px;
.shared-block {
color: #ffffff66;
color: var(--transparent-fg);
font-size: 12px;
}
.item {
@@ -77,19 +77,19 @@
}
.card {
background-color: #1d1f31;
background-color: var(--bg);
height: 100%;
}
.card-title {
color: #4a68b9;
color: var(--title-fg);
font-size: 1rem;
}
.progress {
display: inline-flex;
width: 100%;
background-color: #2d3348;
background-color: var(--secondary);
height: 1.1rem;
max-width: 180px;
}

View File

@@ -43,24 +43,24 @@ export class DifficultyComponent implements OnInit {
])
.pipe(
map(([block, da]) => {
let colorAdjustments = '#ffffff66';
let colorAdjustments = 'var(--transparent-fg)';
if (da.difficultyChange > 0) {
colorAdjustments = '#3bcc49';
colorAdjustments = 'var(--green)';
}
if (da.difficultyChange < 0) {
colorAdjustments = '#dc3545';
colorAdjustments = 'var(--red)';
}
let colorPreviousAdjustments = '#dc3545';
let colorPreviousAdjustments = 'var(--red)';
if (da.previousRetarget) {
if (da.previousRetarget >= 0) {
colorPreviousAdjustments = '#3bcc49';
colorPreviousAdjustments = 'var(--green)';
}
if (da.previousRetarget === 0) {
colorPreviousAdjustments = '#ffffff66';
colorPreviousAdjustments = 'var(--transparent-fg)';
}
} else {
colorPreviousAdjustments = '#ffffff66';
colorPreviousAdjustments = 'var(--transparent-fg)';
}
const blocksUntilHalving = 210000 - (block.height % 210000);

View File

@@ -45,7 +45,7 @@ export class FeeDistributionGraphComponent implements OnInit, OnChanges {
splitLine: {
lineStyle: {
type: 'dotted',
color: '#ffffff66',
color: 'var(--transparent-fg)',
opacity: 0.25,
}
}

View File

@@ -1,5 +1,5 @@
.card-title {
color: #4a68b9;
color: var(--title-fg);
font-size: 10px;
margin-bottom: 4px;
font-size: 1rem;
@@ -36,7 +36,7 @@
margin-bottom: 0;
}
.card-text span {
color: #ffffff66;
color: var(--transparent-fg);
font-size: 12px;
top: 0px;
}
@@ -79,6 +79,7 @@
display: flex;
flex-direction: row;
transition: background-color 1s;
color: var(--color-fg);
&.priority {
@media (767px < width < 992px), (width < 576px) {
width: 100%;

View File

@@ -1,9 +1,10 @@
import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';
import { Component, OnInit, ChangeDetectionStrategy, OnDestroy, ChangeDetectorRef } from '@angular/core';
import { StateService } from '../../services/state.service';
import { Observable } from 'rxjs';
import { Observable, Subscription } from 'rxjs';
import { Recommendedfees } from '../../interfaces/websocket.interface';
import { feeLevels, mempoolFeeColors } from '../../app.constants';
import { feeLevels } from '../../app.constants';
import { tap } from 'rxjs/operators';
import { ThemeService } from 'src/app/services/theme.service';
@Component({
selector: 'app-fees-box',
@@ -11,14 +12,18 @@ import { tap } from 'rxjs/operators';
styleUrls: ['./fees-box.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class FeesBoxComponent implements OnInit {
export class FeesBoxComponent implements OnInit, OnDestroy {
isLoadingWebSocket$: Observable<boolean>;
recommendedFees$: Observable<Recommendedfees>;
themeSubscription: Subscription;
gradient = 'linear-gradient(to right, #2e324e, #2e324e)';
noPriority = '#2e324e';
fees: Recommendedfees;
constructor(
private stateService: StateService
private stateService: StateService,
private themeService: ThemeService,
private cd: ChangeDetectorRef,
) { }
ngOnInit(): void {
@@ -26,18 +31,32 @@ export class FeesBoxComponent implements OnInit {
this.recommendedFees$ = this.stateService.recommendedFees$
.pipe(
tap((fees) => {
let feeLevelIndex = feeLevels.slice().reverse().findIndex((feeLvl) => fees.minimumFee >= feeLvl);
feeLevelIndex = feeLevelIndex >= 0 ? feeLevels.length - feeLevelIndex : feeLevelIndex;
const startColor = '#' + (mempoolFeeColors[feeLevelIndex - 1] || mempoolFeeColors[mempoolFeeColors.length - 1]);
feeLevelIndex = feeLevels.slice().reverse().findIndex((feeLvl) => fees.fastestFee >= feeLvl);
feeLevelIndex = feeLevelIndex >= 0 ? feeLevels.length - feeLevelIndex : feeLevelIndex;
const endColor = '#' + (mempoolFeeColors[feeLevelIndex - 1] || mempoolFeeColors[mempoolFeeColors.length - 1]);
this.gradient = `linear-gradient(to right, ${startColor}, ${endColor})`;
this.noPriority = startColor;
this.fees = fees;
this.setFeeGradient();
}
)
);
this.themeSubscription = this.themeService.themeChanged$.subscribe(() => {
this.setFeeGradient();
})
}
setFeeGradient() {
let feeLevelIndex = feeLevels.slice().reverse().findIndex((feeLvl) => this.fees.minimumFee >= feeLvl);
feeLevelIndex = feeLevelIndex >= 0 ? feeLevels.length - feeLevelIndex : feeLevelIndex;
const startColor = '#' + (this.themeService.mempoolFeeColors[feeLevelIndex - 1] || this.themeService.mempoolFeeColors[this.themeService.mempoolFeeColors.length - 1]);
feeLevelIndex = feeLevels.slice().reverse().findIndex((feeLvl) => this.fees.fastestFee >= feeLvl);
feeLevelIndex = feeLevelIndex >= 0 ? feeLevels.length - feeLevelIndex : feeLevelIndex;
const endColor = '#' + (this.themeService.mempoolFeeColors[feeLevelIndex - 1] || this.themeService.mempoolFeeColors[this.themeService.mempoolFeeColors.length - 1]);
this.gradient = `linear-gradient(to right, ${startColor}, ${endColor})`;
this.noPriority = startColor;
this.cd.markForCheck();
}
ngOnDestroy(): void {
this.themeSubscription.unsubscribe();
}
}

View File

@@ -3,7 +3,7 @@
bottom: 0;
width: 100%;
height: 60px;
background-color: #1d1f31;
background-color: var(--bg);
box-shadow: 15px 15px 15px 15px #000;
z-index: 10;
}
@@ -34,16 +34,8 @@
}
}
.txPerSecond {
color: #4a9ff4;
}
.mempoolSize {
color: #4a68b9;
}
.unconfirmedTx {
color: #f14d80;
color: var(--title-fg);
}
.info-block {
@@ -55,7 +47,7 @@
.progress {
display: inline-flex;
width: 160px;
background-color: #2d3348;
background-color: var(--secondary);
height: 1.1rem;
}

View File

@@ -115,12 +115,12 @@
}
.card-title {
font-size: 1rem;
color: #4a68b9;
color: var(--title-fg);
}
.card-text {
font-size: 18px;
span {
color: #ffffff66;
color: var(--transparent-fg);
font-size: 12px;
}
}

View File

@@ -210,7 +210,7 @@ export class HashrateChartComponent implements OnInit {
borderRadius: 4,
shadowColor: 'rgba(0, 0, 0, 0.5)',
textStyle: {
color: '#b1b1b1',
color: 'var(--tooltip-grey)',
align: 'left',
},
borderColor: '#000',
@@ -325,7 +325,7 @@ export class HashrateChartComponent implements OnInit {
splitLine: {
lineStyle: {
type: 'dotted',
color: '#ffffff66',
color: 'var(--transparent-fg)',
opacity: 0.25,
}
},
@@ -436,7 +436,7 @@ export class HashrateChartComponent implements OnInit {
const now = new Date();
// @ts-ignore
this.chartOptions.grid.bottom = 30;
this.chartOptions.backgroundColor = '#11131f';
this.chartOptions.backgroundColor = 'var(--active-bg)';
this.chartInstance.setOption(this.chartOptions);
download(this.chartInstance.getDataURL({
pixelRatio: 2,

View File

@@ -189,7 +189,7 @@ export class HashrateChartPoolsComponent implements OnInit {
borderRadius: 4,
shadowColor: 'rgba(0, 0, 0, 0.5)',
textStyle: {
color: '#b1b1b1',
color: 'var(--tooltip-grey)',
align: 'left',
},
borderColor: '#000',
@@ -271,7 +271,7 @@ export class HashrateChartPoolsComponent implements OnInit {
const now = new Date();
// @ts-ignore
this.chartOptions.grid.bottom = 30;
this.chartOptions.backgroundColor = '#11131f';
this.chartOptions.backgroundColor = 'var(--active-bg)';
this.chartInstance.setOption(this.chartOptions);
download(this.chartInstance.getDataURL({
pixelRatio: 2,

View File

@@ -151,7 +151,7 @@ export class IncomingTransactionsGraphComponent implements OnInit, OnChanges {
splitLine: {
lineStyle: {
type: 'dotted',
color: '#ffffff66',
color: 'var(--transparent-fg)',
opacity: 0.25,
}
}
@@ -239,7 +239,7 @@ export class IncomingTransactionsGraphComponent implements OnInit, OnChanges {
const now = new Date();
// @ts-ignore
this.mempoolStatsChartOption.grid.height = prevHeight + 20;
this.mempoolStatsChartOption.backgroundColor = '#11131f';
this.mempoolStatsChartOption.backgroundColor = 'var(--active-bg)';
this.chartInstance.setOption(this.mempoolStatsChartOption);
download(this.chartInstance.getDataURL({
pixelRatio: 2,

View File

@@ -99,7 +99,7 @@ export class LbtcPegsGraphComponent implements OnInit, OnChanges {
type: 'line',
},
formatter: (params: any) => {
const colorSpan = (color: string) => `<span class="indicator" style="background-color: #116761;"></span>`;
const colorSpan = (color: string) => `<span class="indicator" style="background-color: var(--liquid);"></span>`;
let itemFormatted = '<div class="title">' + params[0].axisValue + '</div>';
params.map((item: any, index: number) => {
if (index < 26) {
@@ -131,7 +131,7 @@ export class LbtcPegsGraphComponent implements OnInit, OnChanges {
splitLine: {
lineStyle: {
type: 'dotted',
color: '#ffffff66',
color: 'var(--transparent-fg)',
opacity: 0.25,
}
}
@@ -145,11 +145,11 @@ export class LbtcPegsGraphComponent implements OnInit, OnChanges {
showSymbol: false,
areaStyle: {
opacity: 0.2,
color: '#116761',
color: 'var(--liquid)',
},
lineStyle: {
width: 3,
color: '#116761',
color: 'var(--liquid)',
},
},
],

View File

@@ -1,5 +1,5 @@
li.nav-item.active {
background-color: #653b9c;
background-color: var(--tertiary);
}
fa-icon {
@@ -34,7 +34,7 @@ li.nav-item {
}
.navbar-nav {
background: #212121;
background: var(--navbar-bg);
bottom: 0;
box-shadow: 0px 0px 15px 0px #000;
flex-direction: row;
@@ -95,23 +95,23 @@ nav {
}
.mainnet.active {
background-color: #653b9c;
background-color: var(--tertiary);
}
.liquid.active {
background-color: #116761;
background-color: var(--liquid);
}
.liquidtestnet.active {
background-color: #494a4a;
background-color: var(--liquidtestnet);
}
.testnet.active {
background-color: #1d486f;
background-color: var(--testnet);
}
.signet.active {
background-color: #6f1d5d;
background-color: var(--signet);
}
.dropdown-divider {

View File

@@ -18,7 +18,7 @@
flex-direction: row;
justify-content: space-between;
align-items: center;
background: #11131f;
background: var(--active-bg);
text-align: start;
font-size: 1.8em;
}

View File

@@ -1,5 +1,5 @@
li.nav-item.active {
background-color: #653b9c;
background-color: var(--tertiary);
}
fa-icon {
@@ -40,7 +40,7 @@ li.nav-item {
}
.navbar-nav {
background: #212121;
background: var(--navbar-bg);
bottom: 0;
box-shadow: 0px 0px 15px 0px #000;
flex-direction: row;
@@ -110,23 +110,23 @@ nav {
}
.mainnet.active {
background-color: #653b9c;
background-color: var(--tertiary);
}
.liquid.active {
background-color: #116761;
background-color: var(--liquid);
}
.liquidtestnet.active {
background-color: #494a4a;
background-color: var(--liquidtestnet);
}
.testnet.active {
background-color: #1d486f;
background-color: var(--testnet);
}
.signet.active {
background-color: #6f1d5d;
background-color: var(--signet);
}
.dropdown-divider {

View File

@@ -1,5 +1,5 @@
.progress {
background-color: #2d3348;
background-color: var(--secondary);
position: relative;
top: 5px;
}

View File

@@ -101,7 +101,7 @@
}
.black-background {
background-color: #11131f;
background-color: var(--active-bg);
z-index: 100;
position: relative;
}

View File

@@ -4,11 +4,12 @@ import { MempoolBlock } from '../../interfaces/websocket.interface';
import { StateService } from '../../services/state.service';
import { Router } from '@angular/router';
import { take, map, switchMap } from 'rxjs/operators';
import { feeLevels, mempoolFeeColors } from '../../app.constants';
import { feeLevels } from '../../app.constants';
import { specialBlocks } from '../../app.constants';
import { RelativeUrlPipe } from '../../shared/pipes/relative-url/relative-url.pipe';
import { Location } from '@angular/common';
import { DifficultyAdjustment } from '../../interfaces/node-api.interface';
import { ThemeService } from 'src/app/services/theme.service';
@Component({
selector: 'app-mempool-blocks',
@@ -58,6 +59,7 @@ export class MempoolBlocksComponent implements OnInit, OnDestroy {
constructor(
private router: Router,
public stateService: StateService,
private themeService: ThemeService,
private cd: ChangeDetectorRef,
private relativeUrlPipe: RelativeUrlPipe,
private location: Location
@@ -245,7 +247,7 @@ export class MempoolBlocksComponent implements OnInit, OnDestroy {
trimmedFeeRange.forEach((fee: number) => {
let feeLevelIndex = feeLevels.slice().reverse().findIndex((feeLvl) => fee >= feeLvl);
feeLevelIndex = feeLevelIndex >= 0 ? feeLevels.length - feeLevelIndex : feeLevelIndex;
gradientColors.push(mempoolFeeColors[feeLevelIndex - 1] || mempoolFeeColors[mempoolFeeColors.length - 1]);
gradientColors.push(this.themeService.mempoolFeeColors[feeLevelIndex - 1] || this.themeService.mempoolFeeColors[this.themeService.mempoolFeeColors.length - 1]);
});
gradientColors.forEach((color, i, gc) => {

View File

@@ -347,7 +347,7 @@ export class MempoolGraphComponent implements OnInit, OnChanges {
splitLine: {
lineStyle: {
type: 'dotted',
color: '#ffffff66',
color: 'var(--transparent-fg)',
opacity: 0.25,
}
}
@@ -396,7 +396,7 @@ export class MempoolGraphComponent implements OnInit, OnChanges {
const now = new Date();
// @ts-ignore
this.mempoolVsizeFeesOptions.grid.height = prevHeight + 20;
this.mempoolVsizeFeesOptions.backgroundColor = '#11131f';
this.mempoolVsizeFeesOptions.backgroundColor = 'var(--active-bg)';
this.chartInstance.setOption(this.mempoolVsizeFeesOptions);
download(this.chartInstance.getDataURL({
pixelRatio: 2,

View File

@@ -52,7 +52,7 @@
<a class="title-link" href="" [routerLink]="['/blocks' | relativeUrl]">
<h5 class="card-title d-inline" i18n="dashboard.latest-blocks">Latest blocks</h5>
<span>&nbsp;</span>
<fa-icon [icon]="['fas', 'external-link-alt']" [fixedWidth]="true" style="vertical-align: 'text-top'; font-size: 13px; color: '#4a68b9'"></fa-icon>
<fa-icon [icon]="['fas', 'external-link-alt']" [fixedWidth]="true" style="vertical-align: 'text-top'; font-size: 13px; color: 'var(--title-fg)'"></fa-icon>
</a>
<app-blocks-list [attr.data-cy]="'latest-blocks'" [widget]=true></app-blocks-list>
</div>
@@ -66,7 +66,7 @@
<a class="title-link" href="" [routerLink]="['/graphs/mining/hashrate-difficulty' | relativeUrl]">
<h5 class="card-title d-inline" i18n="dashboard.adjustments">Adjustments</h5>
<span>&nbsp;</span>
<fa-icon [icon]="['fas', 'external-link-alt']" [fixedWidth]="true" style="vertical-align: 'text-top'; font-size: 13px; color: '#4a68b9'"></fa-icon>
<fa-icon [icon]="['fas', 'external-link-alt']" [fixedWidth]="true" style="vertical-align: 'text-top'; font-size: 13px; color: 'var(--title-fg)'"></fa-icon>
</a>
<app-difficulty-adjustments-table [attr.data-cy]="'difficulty-adjustments-table'"></app-difficulty-adjustments-table>
</div>

View File

@@ -11,7 +11,7 @@
}
.card {
background-color: #1d1f31;
background-color: var(--bg);
}
.graph-card {
@@ -23,10 +23,10 @@
.card-title {
font-size: 1rem;
color: #4a68b9;
color: var(--title-fg);
}
.card-title > a {
color: #4a68b9;
color: var(--title-fg);
}
.card-body.pool-ranking {

View File

@@ -118,7 +118,7 @@
}
.card-title {
font-size: 1rem;
color: #4a68b9;
color: var(--title-fg);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@@ -126,7 +126,7 @@
.card-text {
font-size: 18px;
span {
color: #ffffff66;
color: var(--transparent-fg);
font-size: 12px;
}
}

View File

@@ -144,7 +144,7 @@ export class PoolRankingComponent implements OnInit {
name: pool.name + ((isMobile() || this.widget) ? `` : ` (${pool.share}%)`),
label: {
overflow: 'none',
color: '#b1b1b1',
color: 'var(--tooltip-grey)',
alignTo: 'edge',
edgeDistance: edgeDistance,
},
@@ -154,7 +154,7 @@ export class PoolRankingComponent implements OnInit {
borderRadius: 4,
shadowColor: 'rgba(0, 0, 0, 0.5)',
textStyle: {
color: '#b1b1b1',
color: 'var(--tooltip-grey)',
},
borderColor: '#000',
formatter: () => {
@@ -182,7 +182,7 @@ export class PoolRankingComponent implements OnInit {
name: 'Other' + (isMobile() ? `` : ` (${totalShareOther.toFixed(2)}%)`),
label: {
overflow: 'none',
color: '#b1b1b1',
color: 'var(--tooltip-grey)',
alignTo: 'edge',
edgeDistance: edgeDistance
},
@@ -191,7 +191,7 @@ export class PoolRankingComponent implements OnInit {
borderRadius: 4,
shadowColor: 'rgba(0, 0, 0, 0.5)',
textStyle: {
color: '#b1b1b1',
color: 'var(--tooltip-grey)',
},
borderColor: '#000',
formatter: () => {
@@ -301,7 +301,7 @@ export class PoolRankingComponent implements OnInit {
onSaveChart() {
const now = new Date();
this.chartOptions.backgroundColor = '#11131f';
this.chartOptions.backgroundColor = 'var(--active-bg)';
this.chartInstance.setOption(this.chartOptions);
download(this.chartInstance.getDataURL({
pixelRatio: 2,

View File

@@ -17,7 +17,7 @@
justify-content: space-between;
width: 100%;
margin-left: 15px;
background: #181b2d;
background: var(--stat-box-bg);
padding: 0.75rem;
width: 0;
flex-grow: 1;
@@ -43,7 +43,7 @@
.chart {
width: 100%;
height: 315px;
background: #181b2d;
background: var(--stat-box-bg);
}
.row {
@@ -65,7 +65,7 @@
position: absolute;
right: 0;
top: 0;
background: #24273e;
background: var(--box-bg);
&.noimg {
opacity: 0;

View File

@@ -82,7 +82,7 @@ div.scrollable {
}
.progress {
background-color: #2d3348;
background-color: var(--secondary);
}
.coinbase {
@@ -184,7 +184,7 @@ div.scrollable {
}
.block-count-title {
color: #4a68b9;
color: var(--title-fg);
font-size: 14px;
text-align: left;
@media (max-width: 767.98px) {

View File

@@ -145,7 +145,7 @@ export class PoolComponent implements OnInit {
borderRadius: 4,
shadowColor: 'rgba(0, 0, 0, 0.5)',
textStyle: {
color: '#b1b1b1',
color: 'var(--tooltip-grey)',
align: 'left',
},
borderColor: '#000',

View File

@@ -1,5 +1,5 @@
.card-title {
color: #4a68b9;
color: var(--title-fg);
font-size: 10px;
margin-bottom: 4px;
font-size: 1rem;
@@ -50,7 +50,7 @@
margin-bottom: 0;
}
.card-text span {
color: #ffffff66;
color: var(--transparent-fg);
font-size: 12px;
top: 0px;
}

View File

@@ -1,5 +1,5 @@
.card-title {
color: #4a68b9;
color: var(--title-fg);
font-size: 10px;
margin-bottom: 4px;
font-size: 1rem;

View File

@@ -117,7 +117,7 @@
}
.inactive {
.square {
background-color: #ffffff66 !important;
background-color: var(--transparent-fg) !important;
}
.fee-text {
text-decoration: line-through;

View File

@@ -0,0 +1,6 @@
<div [formGroup]="themeForm" class="text-small text-center ml-2">
<select formControlName="theme" class="custom-select custom-select-sm form-control-secondary form-control mx-auto" style="width: 160px;" (change)="changeTheme()">
<option value="default" i18n="theme.mempool-theme">Mempool Theme</option>
<option value="contrast" i18n="theme.high-contrast">High Contrast</option>
</select>
</div>

View File

@@ -0,0 +1,31 @@
import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
import { ThemeService } from '../../services/theme.service';
@Component({
selector: 'app-theme-selector',
templateUrl: './theme-selector.component.html',
styleUrls: ['./theme-selector.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class ThemeSelectorComponent implements OnInit {
themeForm: UntypedFormGroup;
themes = ['default', 'contrast'];
constructor(
private formBuilder: UntypedFormBuilder,
private themeService: ThemeService,
) { }
ngOnInit() {
this.themeForm = this.formBuilder.group({
theme: ['default']
});
this.themeForm.get('theme')?.setValue(this.themeService.theme);
}
changeTheme() {
const newTheme = this.themeForm.get('theme')?.value;
this.themeService.apply(newTheme);
}
}

View File

@@ -54,7 +54,7 @@
}
.label {
color: #ffffff66;
color: var(--transparent-fg);
}
&.pair > *:first-child {
@@ -79,7 +79,7 @@
.graph-wrapper {
position: relative;
background: #181b2d;
background: var(--stat-box-bg);
padding: 10px 0;
padding-bottom: 0;

View File

@@ -55,11 +55,11 @@
}
.arrow-green {
color: #1a9436;
color: var(--success);
}
.arrow-red {
color: #dc3545;
color: var(--red);
}
.container-xl {
@@ -85,7 +85,7 @@
.graph-container {
position: relative;
width: 100%;
background: #181b2d;
background: var(--stat-box-bg);
padding: 10px 0;
padding-bottom: 0;
}

View File

@@ -13,15 +13,15 @@
}
}
.green {
color:#28a745;
color: var(--green);
}
.red {
color:#dc3545;
color: var(--red);
}
.grey {
color:#6c757d;
color: var(--grey);
}
.mobile-bottomcol {
@@ -56,7 +56,7 @@
text-align: right;
}
.sats {
color: #ffffff66;
color: var(--transparent-fg);
font-size: 11px;
}
}
@@ -95,7 +95,7 @@
padding: 0.75rem;
font-size: 12px;
&:first-child {
color: #ffffff66;
color: var(--transparent-fg);
white-space: pre-wrap;
@media (min-width: 476px) {
white-space: nowrap;
@@ -123,7 +123,7 @@ h2 {
}
.highlight {
background-color: #181b2d;
background-color: var(--stat-box-bg);
}
.summary {
@@ -142,7 +142,7 @@ h2 {
}
.grey-info-text {
color:#6c757d;
color: var(--grey);
font-style: italic;
font-size: 12px;
}

View File

@@ -3,7 +3,7 @@
background: rgba(#11131f, 0.95);
border-radius: 4px;
box-shadow: 1px 1px 10px rgba(0,0,0,0.5);
color: #b1b1b1;
color: var(--tooltip-grey);
padding: 10px 15px;
text-align: left;
pointer-events: none;

View File

@@ -69,12 +69,12 @@
<linearGradient id="input-highlight-gradient" x1="0%" y1="0%" x2="100%" y2="0%">
<stop offset="0%" [attr.stop-color]="gradient[0]" />
<stop offset="2%" [attr.stop-color]="gradient[0]" />
<stop offset="30%" stop-color="#1bd8f4" />
<stop offset="30%" stop-color="var(--info)" />
<stop offset="100%" [attr.stop-color]="gradient[1]" />
</linearGradient>
<linearGradient id="output-highlight-gradient" x1="0%" y1="0%" x2="100%" y2="0%">
<stop offset="0%" [attr.stop-color]="gradient[1]" />
<stop offset="70%" stop-color="#1bd8f4" />
<stop offset="70%" stop-color="var(--info)" />
<stop offset="98%" [attr.stop-color]="gradient[0]" />
<stop offset="100%" [attr.stop-color]="gradient[0]" />
</linearGradient>

View File

@@ -30,7 +30,7 @@
stroke: url(#output-highlight-gradient);
}
&.zerovalue {
stroke: #1bd8f4;
stroke: var(--info);
}
}
}

View File

@@ -80,7 +80,7 @@
<a class="title-link" href="" [routerLink]="['/blocks' | relativeUrl]">
<h5 class="card-title d-inline" i18n="dashboard.latest-blocks">Latest blocks</h5>
<span>&nbsp;</span>
<fa-icon [icon]="['fas', 'external-link-alt']" [fixedWidth]="true" style="vertical-align: 'text-top'; font-size: 13px; color: '#4a68b9'"></fa-icon>
<fa-icon [icon]="['fas', 'external-link-alt']" [fixedWidth]="true" style="vertical-align: 'text-top'; font-size: 13px; color: 'var(--title-fg)'"></fa-icon>
</a>
<table class="table lastest-blocks-table">
<thead>
@@ -140,7 +140,10 @@
</div>
</div>
<app-language-selector></app-language-selector>
<div class="pref-selectors">
<app-language-selector></app-language-selector>
<app-theme-selector></app-theme-selector>
</div>
<div class="terms-of-service">
<a [routerLink]="['/terms-of-service']" i18n="shared.terms-of-service|Terms of Service">Terms of Service</a>

View File

@@ -11,12 +11,12 @@
}
.card {
background-color: #1d1f31;
background-color: var(--bg);
height: 100%;
}
.card-title {
color: #4a68b9;
color: var(--title-fg);
font-size: 1rem;
}
@@ -29,7 +29,7 @@
.progress {
display: inline-flex;
width: 100%;
background-color: #2d3348;
background-color: var(--secondary);
height: 1.1rem;
max-width: 180px;
}
@@ -98,7 +98,7 @@
.card-text {
font-size: 18px;
span {
color: #ffffff66;
color: var(--transparent-fg);
font-size: 12px;
}
}
@@ -323,4 +323,11 @@
margin-bottom: 10px;
text-decoration: none;
color: inherit;
}
.pref-selectors {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
}

View File

@@ -1,5 +1,5 @@
p {
color: #4a68b9;
color: var(--title-fg);
font-weight: 700;
margin: 10px 0;
margin: 15px 0 10px 0;

View File

@@ -17,7 +17,7 @@
}
code {
background-color: #1d1f31;
background-color: var(--bg);
font-family: Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New;
}
@@ -47,7 +47,7 @@ li.nav-item {
.nav-tabs .nav-link.active {
border-bottom: 1px solid #fff;
@media (min-width: 676px){
border-bottom: 1px solid #11131f;
border-bottom: 1px solid var(--active-bg);
}
}
@@ -65,7 +65,7 @@ li.nav-item {
padding: 0px;
}
.nav-tabs .nav-link.active {
border-bottom: 1px solid #11131f;
border-bottom: 1px solid var(--active-bg);
}
.subtitle {
display: flex;
@@ -110,17 +110,17 @@ li.nav-item {
top: 20px;
overflow-y: auto;
height: calc(100vh - 50px);
scrollbar-color: #2d3348 #11131f;
scrollbar-color: var(--secondary) var(--active-bg);
scrollbar-width: thin;
}
::-webkit-scrollbar {
width: 3px;
}
::-webkit-scrollbar-track {
background: #11131f;
background: var(--active-bg);
}
::-webkit-scrollbar-thumb {
background-color: #2d3348;
background-color: var(--secondary);
border-radius: 5px;
border: none;
}
@@ -148,8 +148,8 @@ h3 {
.endpoint-container .section-header {
display: block;
background-color: #2d3348;
color: #1bd8f4;
background-color: var(--secondary);
color: var(--info);
padding: 1rem 1.3rem 1rem 1.3rem;
font-weight: bold;
border-radius: 0.25rem;
@@ -163,7 +163,7 @@ h3 {
.endpoint-container .section-header span {
color: #fff;
background-color: #653b9c;
background-color: var(--tertiary);
font-size: 12px;
text-transform: uppercase;
font-weight: 400;
@@ -195,7 +195,7 @@ h3 {
}
#doc-nav-mobile > div {
background-color: #2d3348;
background-color: var(--secondary);
z-index: 100;
border-radius: 0 0 0.5rem 0.5rem;
height: 55vh;
@@ -204,9 +204,9 @@ h3 {
#doc-nav-mobile button {
width: 100%;
background-color: #105fb0;
background-color: var(--primary);
color: #fff;
border-color: #105fb0;
border-color: var(--primary);
border-radius: 0.5rem 0.5rem 0 0;
}
@@ -221,7 +221,7 @@ h3 {
}
#disclaimer {
background-color: #1d1f31;
background-color: var(--bg);
padding: 24px;
margin: 24px 0;
}

View File

@@ -3,7 +3,7 @@
}
code {
background-color: #1d1f31;
background-color: var(--bg);
font-family: Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New;
}
@@ -25,7 +25,7 @@ li.nav-item {
.nav-tabs .nav-link.active {
border-bottom: 1px solid #fff;
@media (min-width: 676px){
border-bottom: 1px solid #11131f;
border-bottom: 1px solid var(--active-bg);
}
}
@@ -43,7 +43,7 @@ li.nav-item {
padding: 0px;
}
.nav-tabs .nav-link.active {
border-bottom: 1px solid #11131f;
border-bottom: 1px solid var(--active-bg);
}
.subtitle {
display: flex;
@@ -87,7 +87,7 @@ pre {
display: block;
font-size: 87.5%;
color: #f18920;
background-color: #1d1f31;
background-color: var(--bg);
padding: 30px;
code{
background-color: transparent;

View File

@@ -1,3 +1,3 @@
.green-color {
color: #3bcc49;
color: var(--green);
}

View File

@@ -13,7 +13,7 @@
}
.shared-block {
color: #ffffff66;
color: var(--transparent-fg);
font-size: 12px;
}

View File

@@ -29,7 +29,7 @@
}
.row.nodes {
background: #181b2d;
background: var(--stat-box-bg);
margin: 15px 0 0;
}
@@ -48,7 +48,7 @@
width: 470px;
min-width: 470px;
padding: 0;
background: #181b2d;
background: var(--stat-box-bg);
max-height: 350px;
overflow: hidden;
}

View File

@@ -1,5 +1,5 @@
<div class="container-xl" *ngIf="(channel$ | async) as channel; else skeletonLoader">
<h5 class="mb-0" style="color: #ffffff66" i18n="lightning.channel">Lightning channel</h5>
<h5 class="mb-0" style="color: var(--transparent-fg)" i18n="lightning.channel">Lightning channel</h5>
<div class="title-container">
<h1 class="mb-0">{{ channel.short_id }}</h1>
<span class="tx-link">
@@ -114,7 +114,7 @@
<ng-template #skeletonLoader>
<div class="container-xl">
<h5 class="mb-0" style="color: #ffffff66" i18n="lightning.channel">Lightning channel</h5>
<h5 class="mb-0" style="color: var(--transparent-fg)" i18n="lightning.channel">Lightning channel</h5>
<div class="title-container">
<h1 class="mb-0"><span class="skeleton-loader" style="width: 275px; height: 25px;"></span></h1>
<span class="tx-link">

View File

@@ -3,7 +3,7 @@
}
.sats {
color: #ffffff66;
color: var(--transparent-fg);
font-size: 12px;
top: 0px;
}

View File

@@ -1,7 +1,7 @@
<div class="widget-toggler">
<a href="" (click)="switchMode('avg')" class="toggler-option"
[ngClass]="{'inactive': mode === 'avg'}"><small>avg</small></a>
<span style="color: #ffffff66; font-size: 8px"> | </span>
<span style="color: var(--transparent-fg); font-size: 8px"> | </span>
<a href="" (click)="switchMode('med')" class="toggler-option"
[ngClass]="{'inactive': mode === 'med'}"><small>med</small></a>
</div>

View File

@@ -1,5 +1,5 @@
.card-title {
color: #4a68b9;
color: var(--title-fg);
font-size: 10px;
margin-bottom: 4px;
font-size: 1rem;
@@ -54,7 +54,7 @@
margin-bottom: 0;
}
.card-text span {
color: #ffffff66;
color: var(--transparent-fg);
font-size: 12px;
top: 0px;
}
@@ -107,5 +107,5 @@
}
.inactive {
color: #ffffff66;
color: var(--transparent-fg);
}

View File

@@ -20,7 +20,7 @@
width: 100%;
margin: 16px 0 0;
padding: 20px 12px;
background: #181b2d;
background: var(--stat-box-bg);
font-size: 32px;
}
@@ -46,7 +46,7 @@
min-height: 272px;
max-height: 272px;
padding: 0;
background: #181b2d;
background: var(--stat-box-bg);
overflow: hidden;
margin-top: 16px;
}

View File

@@ -1,5 +1,5 @@
<div class="container-xl full-height" style="min-height: 335px">
<h5 class="mb-1" style="color: #ffffff66" i18n="lightning.node-group">Lightning node group</h5>
<h5 class="mb-1" style="color: var(--transparent-fg)" i18n="lightning.node-group">Lightning node group</h5>
<div class="header">
<div class="logo-container">
@@ -44,7 +44,7 @@
</table>
</div>
<div class="col-12 col-md-6 p-3 p-md-0 pr-md-3">
<div style="background-color: #181b2d">
<div style="background-color: var(--stat-box-bg)">
<app-nodes-map [widget]="true" [nodes]="nodes.nodes" type="isp"></app-nodes-map>
</div>
</div>

View File

@@ -61,7 +61,7 @@
<a class="title-link" href="" [routerLink]="['/lightning/nodes/rankings/liquidity' | relativeUrl]">
<h5 class="card-title d-inline" i18n="lightning.liquidity-ranking">Liquidity Ranking</h5>
<span>&nbsp;</span>
<fa-icon [icon]="['fas', 'external-link-alt']" [fixedWidth]="true" style="vertical-align: 'text-top'; font-size: 13px; color: '#4a68b9'"></fa-icon>
<fa-icon [icon]="['fas', 'external-link-alt']" [fixedWidth]="true" style="vertical-align: 'text-top'; font-size: 13px; color: 'var(--title-fg)'"></fa-icon>
</a>
<app-top-nodes-per-capacity [nodes$]="nodesRanking$" [widget]="true"></app-top-nodes-per-capacity>
</div>
@@ -75,7 +75,7 @@
<a class="title-link" href="" [routerLink]="['/lightning/nodes/rankings/connectivity' | relativeUrl]">
<h5 class="card-title d-inline" i18n="lightning.connectivity-ranking">Connectivity Ranking</h5>
<span>&nbsp;</span>
<fa-icon [icon]="['fas', 'external-link-alt']" [fixedWidth]="true" style="vertical-align: 'text-top'; font-size: 13px; color: '#4a68b9'"></fa-icon>
<fa-icon [icon]="['fas', 'external-link-alt']" [fixedWidth]="true" style="vertical-align: 'text-top'; font-size: 13px; color: 'var(--title-fg)'"></fa-icon>
</a>
<app-top-nodes-per-channels [nodes$]="nodesRanking$" [widget]="true"></app-top-nodes-per-channels>
</div>

View File

@@ -11,7 +11,7 @@
}
.card {
background-color: #1d1f31;
background-color: var(--bg);
}
.graph-card {
@@ -23,10 +23,10 @@
.card-title {
font-size: 1rem;
color: #4a68b9;
color: var(--title-fg);
}
.card-title > a {
color: #4a68b9;
color: var(--title-fg);
}
.card-body.pool-ranking {

View File

@@ -133,7 +133,7 @@ export class NodeFeeChartComponent implements OnInit {
borderRadius: 4,
shadowColor: 'rgba(0, 0, 0, 0.5)',
textStyle: {
color: '#b1b1b1',
color: 'var(--tooltip-grey)',
align: 'left',
},
borderColor: '#000',
@@ -196,7 +196,7 @@ export class NodeFeeChartComponent implements OnInit {
splitLine: {
lineStyle: {
type: 'dotted',
color: '#ffffff66',
color: 'var(--transparent-fg)',
opacity: 0.25,
}
},
@@ -252,7 +252,7 @@ export class NodeFeeChartComponent implements OnInit {
const prevBottom = this.chartOptions.grid.bottom;
// @ts-ignore
this.chartOptions.grid.bottom = 40;
this.chartOptions.backgroundColor = '#11131f';
this.chartOptions.backgroundColor = 'var(--active-bg)';
this.chartInstance.setOption(this.chartOptions);
download(this.chartInstance.getDataURL({
pixelRatio: 2,

View File

@@ -110,7 +110,7 @@ export class NodeStatisticsChartComponent implements OnInit {
borderRadius: 4,
shadowColor: 'rgba(0, 0, 0, 0.5)',
textStyle: {
color: '#b1b1b1',
color: 'var(--tooltip-grey)',
align: 'left',
},
borderColor: '#000',
@@ -179,7 +179,7 @@ export class NodeStatisticsChartComponent implements OnInit {
splitLine: {
lineStyle: {
type: 'dotted',
color: '#ffffff66',
color: 'var(--transparent-fg)',
opacity: 0.25,
}
},
@@ -215,7 +215,7 @@ export class NodeStatisticsChartComponent implements OnInit {
symbol: 'none',
lineStyle: {
type: 'solid',
color: '#ffffff66',
color: 'var(--transparent-fg)',
opacity: 1,
width: 1,
},
@@ -259,7 +259,7 @@ export class NodeStatisticsChartComponent implements OnInit {
const now = new Date();
// @ts-ignore
this.chartOptions.grid.bottom = 40;
this.chartOptions.backgroundColor = '#11131f';
this.chartOptions.backgroundColor = 'var(--active-bg)';
this.chartInstance.setOption(this.chartOptions);
download(this.chartInstance.getDataURL({
pixelRatio: 2,

View File

@@ -1,5 +1,5 @@
.card-title {
color: #4a68b9;
color: var(--title-fg);
font-size: 10px;
margin-bottom: 4px;
font-size: 1rem;
@@ -52,7 +52,7 @@
}
}
.card-text span {
color: #ffffff66;
color: var(--transparent-fg);
font-size: 12px;
top: 0px;
}

View File

@@ -27,7 +27,7 @@
min-height: 408px;
max-height: 408px;
padding: 0;
background: #181b2d;
background: var(--stat-box-bg);
overflow: hidden;
margin-top: 6px;
}

View File

@@ -1,5 +1,5 @@
<div class="container-xl" *ngIf="(node$ | async) as node; else skeletonLoader">
<h5 class="mb-0" style="color: #ffffff66" i18n="lightning.node">Lightning node</h5>
<h5 class="mb-0" style="color: var(--transparent-fg)" i18n="lightning.node">Lightning node</h5>
<div class="title-container mb-2" *ngIf="!error">
<h1 class="mb-0 text-truncate">{{ node.alias }}</h1>
<span class="tx-link">
@@ -255,7 +255,7 @@
<ng-template #skeletonLoader>
<div class="container-xl">
<h5 class="mb-0" style="color: #ffffff66" i18n="lightning.node">Lightning node</h5>
<h5 class="mb-0" style="color: var(--transparent-fg)" i18n="lightning.node">Lightning node</h5>
<div class="title-container mb-2">
<h1 class="mb-0"><span class="skeleton-loader" style="width: 250px; height: 36px; margin-top: 5px; margin-bottom: 5px;"></span></h1>
<span class="tx-link">

View File

@@ -84,7 +84,7 @@ app-fiat {
.tlv-type {
font-size: 12px;
color: #ffffff66;
color: var(--transparent-fg);
}
.tlv-payload {

View File

@@ -5,7 +5,7 @@
<div class="d-flex d-md-block align-items-baseline" style="margin-bottom: -5px">
<span i18n="lightning.nodes-channels-world-map">Lightning Nodes Channels World Map</span>
</div>
<small style="color: #ffffff66" i18n="lightning.tor-nodes-excluded">(Tor nodes excluded)</small>
<small style="color: var(--transparent-fg)" i18n="lightning.tor-nodes-excluded">(Tor nodes excluded)</small>
</div>
<div class="chart" [class]="style" echarts [initOpts]="chartInitOptions" [options]="chartOptions"

View File

@@ -263,7 +263,7 @@ export class NodesChannelsMap implements OnInit {
borderRadius: 4,
shadowColor: 'rgba(0, 0, 0, 0.5)',
textStyle: {
color: '#b1b1b1',
color: 'var(--tooltip-grey)',
align: 'left',
},
borderColor: '#000',

View File

@@ -96,7 +96,7 @@ export class NodeChannels implements OnChanges {
borderRadius: 4,
shadowColor: 'rgba(0, 0, 0, 0.5)',
textStyle: {
color: '#b1b1b1',
color: 'var(--tooltip-grey)',
},
borderColor: '#000',
formatter: (value): string => {

View File

@@ -4,7 +4,7 @@
<div class="d-flex d-md-block align-items-baseline" style="margin-bottom: -5px">
<span i18n="lightning.nodes-world-map">Lightning Nodes World Map</span>
</div>
<small style="color: #ffffff66" i18n="lightning.tor-nodes-excluded">(Tor nodes excluded)</small>
<small style="color: var(--transparent-fg)" i18n="lightning.tor-nodes-excluded">(Tor nodes excluded)</small>
</div>
<div *ngIf="observable$ | async" class="chart" [class]="widget ? 'widget' : ''" echarts [initOpts]="chartInitOptions" [options]="chartOptions"

View File

@@ -194,7 +194,7 @@ export class NodesMap implements OnInit, OnChanges {
borderRadius: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)',
textStyle: {
color: '#b1b1b1',
color: 'var(--tooltip-grey)',
align: 'left',
},
borderColor: '#000',

View File

@@ -114,12 +114,12 @@
}
.card-title {
font-size: 1rem;
color: #4a68b9;
color: var(--title-fg);
}
.card-text {
font-size: 18px;
span {
color: #ffffff66;
color: var(--transparent-fg);
font-size: 12px;
}
}

View File

@@ -243,7 +243,7 @@ export class NodesNetworksChartComponent implements OnInit {
borderRadius: 4,
shadowColor: 'rgba(0, 0, 0, 0.5)',
textStyle: {
color: '#b1b1b1',
color: 'var(--tooltip-grey)',
align: 'left',
},
borderColor: '#000',
@@ -340,7 +340,7 @@ export class NodesNetworksChartComponent implements OnInit {
splitLine: {
lineStyle: {
type: 'dotted',
color: '#ffffff66',
color: 'var(--transparent-fg)',
opacity: 0.25,
},
},
@@ -363,7 +363,7 @@ export class NodesNetworksChartComponent implements OnInit {
splitLine: {
lineStyle: {
type: 'dotted',
color: '#ffffff66',
color: 'var(--transparent-fg)',
opacity: 0.25,
},
},
@@ -437,7 +437,7 @@ export class NodesNetworksChartComponent implements OnInit {
const now = new Date();
// @ts-ignore
this.chartOptions.grid.bottom = 40;
this.chartOptions.backgroundColor = '#11131f';
this.chartOptions.backgroundColor = 'var(--active-bg)';
this.chartInstance.setOption(this.chartOptions);
download(this.chartInstance.getDataURL({
pixelRatio: 2,

View File

@@ -7,7 +7,7 @@
<fa-icon [icon]="['fas', 'download']" [fixedWidth]="true"></fa-icon>
</button>
</div>
<small style="color: #ffffff66" i18n="lightning.tor-nodes-excluded">(Tor nodes excluded)</small>
<small style="color: var(--transparent-fg)" i18n="lightning.tor-nodes-excluded">(Tor nodes excluded)</small>
</div>
<div class="container pb-lg-0 bottom-padding">

View File

@@ -1,5 +1,5 @@
.sats {
color: #ffffff66;
color: var(--transparent-fg);
font-size: 12px;
top: 0px;
}

View File

@@ -85,7 +85,7 @@ export class NodesPerCountryChartComponent implements OnInit {
name: country.name.en + (this.isMobile() ? `` : ` (${country.share}%)`),
label: {
overflow: 'truncate',
color: '#b1b1b1',
color: 'var(--tooltip-grey)',
alignTo: 'edge',
edgeDistance: edgeDistance,
},
@@ -95,7 +95,7 @@ export class NodesPerCountryChartComponent implements OnInit {
borderRadius: 4,
shadowColor: 'rgba(0, 0, 0, 0.5)',
textStyle: {
color: '#b1b1b1',
color: 'var(--tooltip-grey)',
},
borderColor: '#000',
formatter: () => {
@@ -118,7 +118,7 @@ export class NodesPerCountryChartComponent implements OnInit {
name: 'Other' + (this.isMobile() ? `` : ` (${totalShareOther.toFixed(2)}%)`),
label: {
overflow: 'truncate',
color: '#b1b1b1',
color: 'var(--tooltip-grey)',
alignTo: 'edge',
edgeDistance: edgeDistance
},
@@ -127,7 +127,7 @@ export class NodesPerCountryChartComponent implements OnInit {
borderRadius: 4,
shadowColor: 'rgba(0, 0, 0, 0.5)',
textStyle: {
color: '#b1b1b1',
color: 'var(--tooltip-grey)',
},
borderColor: '#000',
formatter: () => {
@@ -218,7 +218,7 @@ export class NodesPerCountryChartComponent implements OnInit {
onSaveChart() {
const now = new Date();
this.chartOptions.backgroundColor = '#11131f';
this.chartOptions.backgroundColor = 'var(--active-bg)';
this.chartInstance.setOption(this.chartOptions);
download(this.chartInstance.getDataURL({
pixelRatio: 2,

View File

@@ -46,7 +46,7 @@
</table>
</div>
<div class="col-12 col-md-6 p-3 p-md-0 pr-md-3">
<div style="background-color: #181b2d">
<div style="background-color: var(--stat-box-bg)">
<app-nodes-map [widget]="true" [nodes]="countryNodes.nodes" type="country"></app-nodes-map>
</div>
</div>

View File

@@ -4,7 +4,7 @@
}
.sats {
color: #ffffff66;
color: var(--transparent-fg);
font-size: 12px;
top: 0px;
}

View File

@@ -33,7 +33,7 @@
<fa-icon [icon]="['fas', 'download']" [fixedWidth]="true"></fa-icon>
</button>
</div>
<small class="d-block" style="color: #ffffff66; min-height: 25px" >
<small class="d-block" style="color: var(--transparent-fg); min-height: 25px" >
<span i18n="lightning.tor-nodes-excluded">(Tor nodes excluded)</span>
</small>
</div>

Some files were not shown because too many files have changed in this diff Show More