Run npm run prettier

This commit is contained in:
Cucumberrbob 2025-02-23 17:28:26 +00:00
parent fe241db5db
commit 0ec9a2bbbe
No known key found for this signature in database
GPG key ID: 2B935C47401C3614
14 changed files with 47 additions and 34 deletions

View file

@ -6,7 +6,7 @@ import { AuthService } from './auth.service';
@Injectable({ @Injectable({
providedIn: 'root', providedIn: 'root',
}) })
export class AuthResolverService { export class AuthResolverService {
constructor(private authService: AuthService) {} constructor(private authService: AuthService) {}
resolve() { resolve() {

View file

@ -17,7 +17,7 @@ export class AuthInterceptor implements HttpInterceptor {
this.router.navigate(['/login']); this.router.navigate(['/login']);
} }
return throwError(error); return throwError(error);
}) }),
); );
} }
} }

View file

@ -7,7 +7,10 @@ import { Observable } from 'rxjs/internal/Observable';
providedIn: 'root', providedIn: 'root',
}) })
export class AuthService { export class AuthService {
constructor(private http: HttpClient, @Inject(APP_BASE_HREF) private baseHref: string) {} constructor(
private http: HttpClient,
@Inject(APP_BASE_HREF) private baseHref: string,
) {}
public isLoggedIn(): Observable<boolean> { public isLoggedIn(): Observable<boolean> {
return this.http.get<boolean>(`${this.baseHref}Api/Authentication/IsLoggedIn`); return this.http.get<boolean>(`${this.baseHref}Api/Authentication/IsLoggedIn`);

View file

@ -13,7 +13,10 @@ export class LoginComponent {
public error: string; public error: string;
public loggingIn: boolean; public loggingIn: boolean;
constructor(private authService: AuthService, private router: Router) {} constructor(
private authService: AuthService,
private router: Router,
) {}
public setUserName(event: Event): void { public setUserName(event: Event): void {
this.userName = (event.target as any).value; this.userName = (event.target as any).value;
@ -33,7 +36,7 @@ export class LoginComponent {
(err) => { (err) => {
this.loggingIn = false; this.loggingIn = false;
this.error = err.error; this.error = err.error;
} },
); );
} }
} }

View file

@ -30,7 +30,7 @@ export class ProfileComponent {
this.error = err.error; this.error = err.error;
this.success = false; this.success = false;
this.saving = false; this.saving = false;
} },
); );
} }
} }

View file

@ -9,7 +9,10 @@ import { APP_BASE_HREF } from '@angular/common';
providedIn: 'root', providedIn: 'root',
}) })
export class SettingsService { export class SettingsService {
constructor(private http: HttpClient, @Inject(APP_BASE_HREF) private baseHref: string) {} constructor(
private http: HttpClient,
@Inject(APP_BASE_HREF) private baseHref: string,
) {}
public get(): Observable<Setting[]> { public get(): Observable<Setting[]> {
return this.http.get<Setting[]>(`${this.baseHref}Api/Settings`); return this.http.get<Setting[]>(`${this.baseHref}Api/Settings`);

View file

@ -57,7 +57,7 @@ export class SettingsComponent implements OnInit {
(err) => { (err) => {
this.saving = false; this.saving = false;
this.error = err; this.error = err;
} },
); );
} }
@ -78,7 +78,7 @@ export class SettingsComponent implements OnInit {
(err) => { (err) => {
this.testPathError = err.error; this.testPathError = err.error;
this.saving = false; this.saving = false;
} },
); );
} }
@ -95,7 +95,7 @@ export class SettingsComponent implements OnInit {
(err) => { (err) => {
this.testDownloadSpeedError = err.error; this.testDownloadSpeedError = err.error;
this.saving = false; this.saving = false;
} },
); );
} }
public testWriteSpeed(): void { public testWriteSpeed(): void {
@ -111,7 +111,7 @@ export class SettingsComponent implements OnInit {
(err) => { (err) => {
this.testWriteSpeedError = err.error; this.testWriteSpeedError = err.error;
this.saving = false; this.saving = false;
} },
); );
} }
@ -135,7 +135,7 @@ export class SettingsComponent implements OnInit {
(err) => { (err) => {
this.testAria2cConnectionError = err.error; this.testAria2cConnectionError = err.error;
this.saving = false; this.saving = false;
} },
); );
} }
} }

View file

@ -56,8 +56,7 @@
>Use this link to sign up to Premiumize.</a >Use this link to sign up to Premiumize.</a
> >
<br /> <br />
<a href="https://torbox.app/" target="_blank" rel="noopener" <a href="https://torbox.app/" target="_blank" rel="noopener">Use this link to sign up to TorBox.</a>
>Use this link to sign up to TorBox.</a>
<br /> <br />
<a href="https://debrid-link.com/" target="_blank" rel="noopener" <a href="https://debrid-link.com/" target="_blank" rel="noopener"
>Use this link to sign up to DebridLink.</a >Use this link to sign up to DebridLink.</a

View file

@ -18,7 +18,10 @@ export class SetupComponent {
public step: number = 1; public step: number = 1;
constructor(private authService: AuthService, private router: Router) {} constructor(
private authService: AuthService,
private router: Router,
) {}
public setup(): void { public setup(): void {
this.error = null; this.error = null;
@ -32,7 +35,7 @@ export class SetupComponent {
(err) => { (err) => {
this.working = false; this.working = false;
this.error = err.error; this.error = err.error;
} },
); );
} }
@ -45,7 +48,7 @@ export class SetupComponent {
(err: any) => { (err: any) => {
this.working = false; this.working = false;
this.error = err.error; this.error = err.error;
} },
); );
} }

View file

@ -6,7 +6,7 @@ import { RealDebridStatus, Torrent } from './models/torrent.model';
name: 'status', name: 'status',
}) })
export class TorrentStatusPipe implements PipeTransform { export class TorrentStatusPipe implements PipeTransform {
constructor(private pipe: FileSizePipe) { } constructor(private pipe: FileSizePipe) {}
transform(torrent: Torrent): string { transform(torrent: Torrent): string {
if (torrent.error) { if (torrent.error) {
@ -38,8 +38,9 @@ export class TorrentStatusPipe implements PipeTransform {
speed = this.pipe.transform(allSpeeds, 'filesize'); speed = this.pipe.transform(allSpeeds, 'filesize');
return `Downloading file ${downloading.length + downloaded.length}/${torrent.downloads.length return `Downloading file ${downloading.length + downloaded.length}/${
} (${progress.toFixed(2)}% - ${speed}/s)`; torrent.downloads.length
} (${progress.toFixed(2)}% - ${speed}/s)`;
} }
const unpacking = torrent.downloads.where((m) => m.unpackingStarted && !m.unpackingFinished && m.bytesDone > 0); const unpacking = torrent.downloads.where((m) => m.unpackingStarted && !m.unpackingFinished && m.bytesDone > 0);
@ -87,7 +88,7 @@ export class TorrentStatusPipe implements PipeTransform {
switch (torrent.rdStatus) { switch (torrent.rdStatus) {
case RealDebridStatus.Downloading: case RealDebridStatus.Downloading:
if (torrent.rdSeeders < 1) { if (torrent.rdSeeders < 1) {
return `Torrent stalled` return `Torrent stalled`;
} }
const speed = this.pipe.transform(torrent.rdSpeed, 'filesize'); const speed = this.pipe.transform(torrent.rdSpeed, 'filesize');
return `Torrent downloading (${torrent.rdProgress}% - ${speed}/s)`; return `Torrent downloading (${torrent.rdProgress}% - ${speed}/s)`;

View file

@ -55,7 +55,7 @@
{{ torrent.rdSize | filesize }} {{ torrent.rdSize | filesize }}
</td> </td>
<td> <td>
{{ torrent.added | date : 'medium' }} {{ torrent.added | date: "medium" }}
</td> </td>
<td> <td>
{{ torrent | status }} {{ torrent | status }}

View file

@ -47,7 +47,11 @@ export class TorrentComponent implements OnInit {
public updating: boolean; public updating: boolean;
constructor(private activatedRoute: ActivatedRoute, private router: Router, private torrentService: TorrentService) {} constructor(
private activatedRoute: ActivatedRoute,
private router: Router,
private torrentService: TorrentService,
) {}
ngOnInit(): void { ngOnInit(): void {
this.activatedRoute.params.subscribe((params) => { this.activatedRoute.params.subscribe((params) => {
@ -63,7 +67,7 @@ export class TorrentComponent implements OnInit {
}, },
() => { () => {
this.router.navigate(['/']); this.router.navigate(['/']);
} },
); );
}); });
} }
@ -85,7 +89,7 @@ export class TorrentComponent implements OnInit {
.split('') .split('')
.map(function (c) { .map(function (c) {
return c.charCodeAt(0); return c.charCodeAt(0);
}) }),
); );
var blob = new Blob([byteArray], { type: 'application/x-bittorrent' }); var blob = new Blob([byteArray], { type: 'application/x-bittorrent' });
@ -120,7 +124,7 @@ export class TorrentComponent implements OnInit {
(err) => { (err) => {
this.deleteError = err.error; this.deleteError = err.error;
this.deleting = false; this.deleting = false;
} },
); );
} }
@ -147,7 +151,7 @@ export class TorrentComponent implements OnInit {
(err) => { (err) => {
this.retryError = err.error; this.retryError = err.error;
this.retrying = false; this.retrying = false;
} },
); );
} }
@ -173,7 +177,7 @@ export class TorrentComponent implements OnInit {
(err) => { (err) => {
this.downloadRetryError = err.error; this.downloadRetryError = err.error;
this.downloadRetrying = false; this.downloadRetrying = false;
} },
); );
} }
@ -214,7 +218,7 @@ export class TorrentComponent implements OnInit {
() => { () => {
this.isUpdateSettingsModalActive = false; this.isUpdateSettingsModalActive = false;
this.updating = false; this.updating = false;
} },
); );
} }
} }

View file

@ -19,10 +19,7 @@
"strictNullChecks": false, "strictNullChecks": false,
"target": "ES2022", "target": "ES2022",
"module": "es2020", "module": "es2020",
"lib": [ "lib": ["es2020", "dom"],
"es2020",
"dom"
],
"useDefineForClassFields": false "useDefineForClassFields": false
}, },
"angularCompilerOptions": { "angularCompilerOptions": {