Merge pull request #719 from Cucumberrbob/chore/run-prettier
Run prettier
This commit is contained in:
commit
3fc44163a9
14 changed files with 47 additions and 36 deletions
|
|
@ -51,4 +51,4 @@
|
|||
"prettier": "^3.0.3",
|
||||
"typescript": "5.1.6"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,10 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
import { AuthService } from './auth.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class AuthResolverService {
|
||||
export class AuthResolverService {
|
||||
constructor(private authService: AuthService) {}
|
||||
|
||||
resolve() {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ export class AuthInterceptor implements HttpInterceptor {
|
|||
this.router.navigate(['/login']);
|
||||
}
|
||||
return throwError(error);
|
||||
})
|
||||
}),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,10 @@ import { Observable } from 'rxjs/internal/Observable';
|
|||
providedIn: 'root',
|
||||
})
|
||||
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> {
|
||||
return this.http.get<boolean>(`${this.baseHref}Api/Authentication/IsLoggedIn`);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,10 @@ export class LoginComponent {
|
|||
public error: string;
|
||||
public loggingIn: boolean;
|
||||
|
||||
constructor(private authService: AuthService, private router: Router) {}
|
||||
constructor(
|
||||
private authService: AuthService,
|
||||
private router: Router,
|
||||
) {}
|
||||
|
||||
public setUserName(event: Event): void {
|
||||
this.userName = (event.target as any).value;
|
||||
|
|
@ -33,7 +36,7 @@ export class LoginComponent {
|
|||
(err) => {
|
||||
this.loggingIn = false;
|
||||
this.error = err.error;
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ export class ProfileComponent {
|
|||
this.error = err.error;
|
||||
this.success = false;
|
||||
this.saving = false;
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,10 @@ import { APP_BASE_HREF } from '@angular/common';
|
|||
providedIn: 'root',
|
||||
})
|
||||
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[]> {
|
||||
return this.http.get<Setting[]>(`${this.baseHref}Api/Settings`);
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ export class SettingsComponent implements OnInit {
|
|||
(err) => {
|
||||
this.saving = false;
|
||||
this.error = err;
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -78,7 +78,7 @@ export class SettingsComponent implements OnInit {
|
|||
(err) => {
|
||||
this.testPathError = err.error;
|
||||
this.saving = false;
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -95,7 +95,7 @@ export class SettingsComponent implements OnInit {
|
|||
(err) => {
|
||||
this.testDownloadSpeedError = err.error;
|
||||
this.saving = false;
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
public testWriteSpeed(): void {
|
||||
|
|
@ -111,7 +111,7 @@ export class SettingsComponent implements OnInit {
|
|||
(err) => {
|
||||
this.testWriteSpeedError = err.error;
|
||||
this.saving = false;
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -135,7 +135,7 @@ export class SettingsComponent implements OnInit {
|
|||
(err) => {
|
||||
this.testAria2cConnectionError = err.error;
|
||||
this.saving = false;
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,8 +56,7 @@
|
|||
>Use this link to sign up to Premiumize.</a
|
||||
>
|
||||
<br />
|
||||
<a href="https://torbox.app/" target="_blank" rel="noopener"
|
||||
>Use this link to sign up to TorBox.</a>
|
||||
<a href="https://torbox.app/" target="_blank" rel="noopener">Use this link to sign up to TorBox.</a>
|
||||
<br />
|
||||
<a href="https://debrid-link.com/" target="_blank" rel="noopener"
|
||||
>Use this link to sign up to DebridLink.</a
|
||||
|
|
|
|||
|
|
@ -18,7 +18,10 @@ export class SetupComponent {
|
|||
|
||||
public step: number = 1;
|
||||
|
||||
constructor(private authService: AuthService, private router: Router) {}
|
||||
constructor(
|
||||
private authService: AuthService,
|
||||
private router: Router,
|
||||
) {}
|
||||
|
||||
public setup(): void {
|
||||
this.error = null;
|
||||
|
|
@ -32,7 +35,7 @@ export class SetupComponent {
|
|||
(err) => {
|
||||
this.working = false;
|
||||
this.error = err.error;
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -45,7 +48,7 @@ export class SetupComponent {
|
|||
(err: any) => {
|
||||
this.working = false;
|
||||
this.error = err.error;
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { RealDebridStatus, Torrent } from './models/torrent.model';
|
|||
name: 'status',
|
||||
})
|
||||
export class TorrentStatusPipe implements PipeTransform {
|
||||
constructor(private pipe: FileSizePipe) { }
|
||||
constructor(private pipe: FileSizePipe) {}
|
||||
|
||||
transform(torrent: Torrent): string {
|
||||
if (torrent.error) {
|
||||
|
|
@ -38,8 +38,9 @@ export class TorrentStatusPipe implements PipeTransform {
|
|||
|
||||
speed = this.pipe.transform(allSpeeds, 'filesize');
|
||||
|
||||
return `Downloading file ${downloading.length + downloaded.length}/${torrent.downloads.length
|
||||
} (${progress.toFixed(2)}% - ${speed}/s)`;
|
||||
return `Downloading file ${downloading.length + downloaded.length}/${
|
||||
torrent.downloads.length
|
||||
} (${progress.toFixed(2)}% - ${speed}/s)`;
|
||||
}
|
||||
|
||||
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) {
|
||||
case RealDebridStatus.Downloading:
|
||||
if (torrent.rdSeeders < 1) {
|
||||
return `Torrent stalled`
|
||||
return `Torrent stalled`;
|
||||
}
|
||||
const speed = this.pipe.transform(torrent.rdSpeed, 'filesize');
|
||||
return `Torrent downloading (${torrent.rdProgress}% - ${speed}/s)`;
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
{{ torrent.rdSize | filesize }}
|
||||
</td>
|
||||
<td>
|
||||
{{ torrent.added | date : 'medium' }}
|
||||
{{ torrent.added | date: "medium" }}
|
||||
</td>
|
||||
<td>
|
||||
{{ torrent | status }}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,11 @@ export class TorrentComponent implements OnInit {
|
|||
|
||||
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 {
|
||||
this.activatedRoute.params.subscribe((params) => {
|
||||
|
|
@ -63,7 +67,7 @@ export class TorrentComponent implements OnInit {
|
|||
},
|
||||
() => {
|
||||
this.router.navigate(['/']);
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
}
|
||||
|
|
@ -85,7 +89,7 @@ export class TorrentComponent implements OnInit {
|
|||
.split('')
|
||||
.map(function (c) {
|
||||
return c.charCodeAt(0);
|
||||
})
|
||||
}),
|
||||
);
|
||||
|
||||
var blob = new Blob([byteArray], { type: 'application/x-bittorrent' });
|
||||
|
|
@ -120,7 +124,7 @@ export class TorrentComponent implements OnInit {
|
|||
(err) => {
|
||||
this.deleteError = err.error;
|
||||
this.deleting = false;
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -147,7 +151,7 @@ export class TorrentComponent implements OnInit {
|
|||
(err) => {
|
||||
this.retryError = err.error;
|
||||
this.retrying = false;
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -173,7 +177,7 @@ export class TorrentComponent implements OnInit {
|
|||
(err) => {
|
||||
this.downloadRetryError = err.error;
|
||||
this.downloadRetrying = false;
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -214,7 +218,7 @@ export class TorrentComponent implements OnInit {
|
|||
() => {
|
||||
this.isUpdateSettingsModalActive = false;
|
||||
this.updating = false;
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,10 +19,7 @@
|
|||
"strictNullChecks": false,
|
||||
"target": "ES2022",
|
||||
"module": "es2020",
|
||||
"lib": [
|
||||
"es2020",
|
||||
"dom"
|
||||
],
|
||||
"lib": ["es2020", "dom"],
|
||||
"useDefineForClassFields": false
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
|
|
|
|||
Loading…
Reference in a new issue