• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

atinc / ngx-tethys / 68ef226c-f83e-44c1-b8ed-e420a83c5d84

28 May 2025 10:31AM UTC coverage: 10.352% (-80.0%) from 90.316%
68ef226c-f83e-44c1-b8ed-e420a83c5d84

Pull #3460

circleci

pubuzhixing8
chore: xxx
Pull Request #3460: refactor(icon): migrate signal input #TINFR-1476

132 of 6823 branches covered (1.93%)

Branch coverage included in aggregate %.

10 of 14 new or added lines in 1 file covered. (71.43%)

11648 existing lines in 344 files now uncovered.

2078 of 14525 relevant lines covered (14.31%)

6.69 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

9.68
/src/core/theme/store.ts
1
import { computed, Injectable, Signal, signal } from '@angular/core';
2
import { ThyTheme } from './enum';
3

1✔
4
@Injectable({
UNCOV
5
    providedIn: 'root'
×
UNCOV
6
})
×
UNCOV
7
export class ThyThemeStore {
×
UNCOV
8
    readonly theme = signal<ThyTheme>(ThyTheme.light);
×
9

10
    readonly isDark: Signal<boolean> = computed(() => {
11
        const theme = this.theme();
12
        return (
13
            theme === ThyTheme.dark ||
×
14
            (theme === ThyTheme.system && window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches)
15
        );
UNCOV
16
    });
×
17

×
18
    constructor() {}
UNCOV
19

×
UNCOV
20
    setTheme(theme: ThyTheme) {
×
21
        this.theme.set(theme);
×
22
    }
UNCOV
23

×
UNCOV
24
    normalizeColor(color: string | string[]): string {
×
25
        if (typeof color === 'string') {
×
26
            return color;
27
        }
UNCOV
28
        if (Array.isArray(color)) {
×
29
            if (color.length === 1) {
30
                return color[0];
31
            }
32

33
            if (color.length > 1) {
1✔
34
                if (this.isDark()) {
35
                    return color[1];
1✔
36
                } else {
37
                    return color[0];
38
                }
39
            }
40
        }
41
    }
42
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc