mirror of
https://github.com/safing/portmaster
synced 2025-04-18 01:49:09 +00:00
Fix some typescript linter errors
This commit is contained in:
parent
21c4fa456b
commit
0c61f2c35e
1 changed files with 10 additions and 11 deletions
|
@ -1,4 +1,3 @@
|
|||
import { Min } from './../../../../dist-lib/safing/portmaster-api/lib/netquery.service.d';
|
||||
import {
|
||||
ChangeDetectionStrategy,
|
||||
ChangeDetectorRef,
|
||||
|
@ -19,10 +18,10 @@ import {
|
|||
Record,
|
||||
deepClone,
|
||||
} from '@safing/portmaster-api';
|
||||
import { Subscription, map, of, throwError } from 'rxjs';
|
||||
import { catchError, switchMap } from 'rxjs/operators';
|
||||
import { INTEGRATION_SERVICE, ProcessInfo } from 'src/app/integration';
|
||||
import { Subscription, map, of } from 'rxjs';
|
||||
import { switchMap } from 'rxjs/operators';
|
||||
import { AppIconResolver } from './app-icon-resolver';
|
||||
import { AppProfile } from 'projects/safing/portmaster-api/src/public-api';
|
||||
|
||||
// Interface that must be satisfied for the profile-input
|
||||
// of app-icon.
|
||||
|
@ -107,11 +106,11 @@ export class AppIconComponent implements OnInit, OnDestroy {
|
|||
isIgnoredProfile = false;
|
||||
|
||||
/** If not icon is available, this holds the first - uppercased - letter of the app - name */
|
||||
letter: string = '';
|
||||
letter = '';
|
||||
|
||||
/** @private The background color of the component, based on icon availability and generated by ID */
|
||||
@HostBinding('style.background-color')
|
||||
color: string = 'var(--text-tertiary)';
|
||||
color = 'var(--text-tertiary)';
|
||||
|
||||
constructor(
|
||||
private profileService: AppProfileService,
|
||||
|
@ -167,7 +166,7 @@ export class AppIconComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
|
||||
if (!skipIcon) {
|
||||
this.tryGetSystemIcon(p);
|
||||
this.tryGetSystemIcon();
|
||||
}
|
||||
|
||||
} else {
|
||||
|
@ -204,7 +203,7 @@ export class AppIconComponent implements OnInit, OnDestroy {
|
|||
return null;
|
||||
}
|
||||
|
||||
let id = this.profile.ID;
|
||||
const id = this.profile.ID;
|
||||
if (!id) {
|
||||
return null;
|
||||
}
|
||||
|
@ -215,7 +214,7 @@ export class AppIconComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
|
||||
// otherwise, ID likely contains the source
|
||||
let [source, ...rest] = id.split('/');
|
||||
const [source, ...rest] = id.split('/');
|
||||
if (rest.length > 0) {
|
||||
return [source, rest.join('/')];
|
||||
}
|
||||
|
@ -229,7 +228,7 @@ export class AppIconComponent implements OnInit, OnDestroy {
|
|||
* Tries to get the application icon form the system.
|
||||
* Requires the app to be running in the electron wrapper.
|
||||
*/
|
||||
private tryGetSystemIcon(p: IDandName) {
|
||||
private tryGetSystemIcon() {
|
||||
const sourceAndId = this.getIDAndSource();
|
||||
if (sourceAndId === null) {
|
||||
return;
|
||||
|
@ -240,7 +239,7 @@ export class AppIconComponent implements OnInit, OnDestroy {
|
|||
this.sub = this.profileService
|
||||
.watchAppProfile(sourceAndId[0], sourceAndId[1])
|
||||
.pipe(
|
||||
switchMap((profile) => {
|
||||
switchMap((profile: AppProfile) => {
|
||||
this.updateLetter(profile);
|
||||
|
||||
if (!!profile.Icons?.length) {
|
||||
|
|
Loading…
Add table
Reference in a new issue