Merge pull request #725 from Cucumberrbob/deps/angular-19-update

Update to Angular 19, replace `@angular/flex-layout` with css
This commit is contained in:
Roger Far 2025-03-07 12:18:55 -07:00 committed by GitHub
commit 861854b4f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 7999 additions and 17344 deletions

View file

@ -37,17 +37,21 @@
"prefix": "app", "prefix": "app",
"architect": { "architect": {
"build": { "build": {
"builder": "@angular-devkit/build-angular:browser", "builder": "@angular/build:application",
"options": { "options": {
"outputPath": "../server/RdtClient.Web/wwwroot", "outputPath": {
"base": "../server/RdtClient.Web/wwwroot"
},
"index": "src/index.html", "index": "src/index.html",
"main": "src/main.ts", "polyfills": [
"polyfills": "src/polyfills.ts", "src/polyfills.ts"
],
"tsConfig": "tsconfig.app.json", "tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss", "inlineStyleLanguage": "scss",
"assets": ["src/favicon.ico", "src/assets"], "assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.scss"], "styles": ["src/styles.scss"],
"scripts": [] "scripts": [],
"browser": "src/main.ts"
}, },
"configurations": { "configurations": {
"production": { "production": {
@ -72,9 +76,7 @@
"outputHashing": "all" "outputHashing": "all"
}, },
"development": { "development": {
"buildOptimizer": false,
"optimization": false, "optimization": false,
"vendorChunk": true,
"extractLicenses": false, "extractLicenses": false,
"sourceMap": true, "sourceMap": true,
"namedChunks": true "namedChunks": true
@ -83,24 +85,24 @@
"defaultConfiguration": "production" "defaultConfiguration": "production"
}, },
"serve": { "serve": {
"builder": "@angular-devkit/build-angular:dev-server", "builder": "@angular/build:dev-server",
"options": { "options": {
"proxyConfig": "angular-proxy.json" "proxyConfig": "angular-proxy.json"
}, },
"configurations": { "configurations": {
"production": { "production": {
"browserTarget": "client:build:production" "buildTarget": "client:build:production"
}, },
"development": { "development": {
"browserTarget": "client:build:development" "buildTarget": "client:build:development"
} }
}, },
"defaultConfiguration": "development" "defaultConfiguration": "development"
}, },
"extract-i18n": { "extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n", "builder": "@angular/build:extract-i18n",
"options": { "options": {
"browserTarget": "client:build" "buildTarget": "client:build"
} }
}, },
"lint": { "lint": {

25117
client/package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -12,43 +12,42 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "^16.2.3", "@angular/animations": "^19.2.0",
"@angular/cdk": "^16.2.2", "@angular/cdk": "^19.2.1",
"@angular/common": "^16.2.3", "@angular/common": "^19.2.0",
"@angular/compiler": "^16.2.3", "@angular/compiler": "^19.2.0",
"@angular/core": "^16.2.3", "@angular/core": "^19.2.0",
"@angular/flex-layout": "^15.0.0-beta.42", "@angular/forms": "^19.2.0",
"@angular/forms": "^16.2.3", "@angular/platform-browser": "^19.2.0",
"@angular/platform-browser": "^16.2.3", "@angular/platform-browser-dynamic": "^19.2.0",
"@angular/platform-browser-dynamic": "^16.2.3", "@angular/router": "^19.2.0",
"@angular/router": "^16.2.3",
"@fortawesome/fontawesome-free": "^6.4.2", "@fortawesome/fontawesome-free": "^6.4.2",
"@microsoft/signalr": "^6.0.21", "@microsoft/signalr": "^6.0.21",
"bulma": "^0.9.4", "bulma": "^0.9.4",
"curray": "^1.0.11", "curray": "^1.0.11",
"file-saver-es": "^2.0.5", "file-saver-es": "^2.0.5",
"ngx-filesize": "^3.0.2", "ngx-filesize": "^3.0.5",
"rxjs": "~7.8.1", "rxjs": "~7.8.1",
"tslib": "^2.6.2", "tslib": "^2.6.2",
"zone.js": "~0.13.1" "zone.js": "~0.15.0"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "^16.2.1", "@angular-eslint/builder": "19.1.0",
"@angular-eslint/builder": "16.1.1", "@angular-eslint/eslint-plugin": "19.1.0",
"@angular-eslint/eslint-plugin": "16.1.1", "@angular-eslint/eslint-plugin-template": "19.1.0",
"@angular-eslint/eslint-plugin-template": "16.1.1", "@angular-eslint/schematics": "19.1.0",
"@angular-eslint/schematics": "16.1.1", "@angular-eslint/template-parser": "19.1.0",
"@angular-eslint/template-parser": "16.1.1", "@angular/build": "^19.2.0",
"@angular/cli": "^16.2.1", "@angular/cli": "^19.2.0",
"@angular/compiler-cli": "^16.2.3", "@angular/compiler-cli": "^19.2.0",
"@angular/language-service": "^16.2.3", "@angular/language-service": "^19.2.0",
"@types/file-saver": "^2.0.5", "@types/file-saver": "^2.0.5",
"@types/file-saver-es": "^2.0.1", "@types/file-saver-es": "^2.0.1",
"@types/node": "^20.5.8", "@types/node": "^20.5.8",
"@typescript-eslint/eslint-plugin": "6.5.0", "@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "6.5.0", "@typescript-eslint/parser": "^7.2.0",
"eslint": "^8.48.0", "eslint": "^8.57.0",
"prettier": "^3.0.3", "prettier": "^3.0.3",
"typescript": "5.1.6" "typescript": "5.7.3"
} }
} }

View file

@ -1,5 +1,5 @@
<div fxLayout.lt-lg="column" fxLayout.gt-sm="row" fxLayoutGap="20px" class="field"> <div class="field">
<div fxFlex> <div>
<div class="field"> <div class="field">
<label class="label">Torrent file</label> <label class="label">Torrent file</label>
<div class="file has-name"> <div class="file has-name">

View file

@ -5,9 +5,10 @@ import { Torrent, TorrentFileAvailability } from '../models/torrent.model';
import { SettingsService } from '../settings.service'; import { SettingsService } from '../settings.service';
@Component({ @Component({
selector: 'app-add-new-torrent', selector: 'app-add-new-torrent',
templateUrl: './add-new-torrent.component.html', templateUrl: './add-new-torrent.component.html',
styleUrls: ['./add-new-torrent.component.scss'], styleUrls: ['./add-new-torrent.component.scss'],
standalone: false
}) })
export class AddNewTorrentComponent implements OnInit { export class AddNewTorrentComponent implements OnInit {
public fileName: string; public fileName: string;

View file

@ -1,8 +1,9 @@
import { Component } from '@angular/core'; import { Component } from '@angular/core';
@Component({ @Component({
selector: 'app-root', selector: 'app-root',
template: '<router-outlet></router-outlet>', template: '<router-outlet></router-outlet>',
styles: [], styles: [],
standalone: false
}) })
export class AppComponent {} export class AppComponent {}

View file

@ -1,8 +1,7 @@
import { ClipboardModule } from '@angular/cdk/clipboard'; import { ClipboardModule } from '@angular/cdk/clipboard';
import { APP_BASE_HREF } from '@angular/common'; import { APP_BASE_HREF } from '@angular/common';
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http'; import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { FormsModule } from '@angular/forms'; import { FormsModule } from '@angular/forms';
import { BrowserModule } from '@angular/platform-browser'; import { BrowserModule } from '@angular/platform-browser';
import { curray } from 'curray'; import { curray } from 'curray';
@ -45,20 +44,13 @@ curray();
Nl2BrPipe, Nl2BrPipe,
SortPipe, SortPipe,
], ],
imports: [ bootstrap: [AppComponent],
BrowserModule, imports: [BrowserModule, AppRoutingModule, FormsModule, NgxFilesizeModule, ClipboardModule],
AppRoutingModule,
FormsModule,
HttpClientModule,
NgxFilesizeModule,
FlexLayoutModule,
ClipboardModule,
],
providers: [ providers: [
FileSizePipe, FileSizePipe,
{ provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true }, { provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true },
{ provide: APP_BASE_HREF, useValue: (window as any)['_app_base'] || '/' }, { provide: APP_BASE_HREF, useValue: (window as any)['_app_base'] || '/' },
provideHttpClient(withInterceptorsFromDi()),
], ],
bootstrap: [AppComponent],
}) })
export class AppModule {} export class AppModule {}

View file

@ -1,7 +1,8 @@
import { Pipe, PipeTransform } from '@angular/core'; import { Pipe, PipeTransform } from '@angular/core';
@Pipe({ @Pipe({
name: 'decodeURI', name: 'decodeURI',
standalone: false
}) })
export class DecodeURIPipe implements PipeTransform { export class DecodeURIPipe implements PipeTransform {
transform(input: any) { transform(input: any) {

View file

@ -3,7 +3,8 @@ import { FileSizePipe } from 'ngx-filesize';
import { Download } from './models/download.model'; import { Download } from './models/download.model';
@Pipe({ @Pipe({
name: 'downloadStatus', name: 'downloadStatus',
standalone: false
}) })
export class DownloadStatusPipe implements PipeTransform { export class DownloadStatusPipe implements PipeTransform {
constructor(private pipe: FileSizePipe) {} constructor(private pipe: FileSizePipe) {}

View file

@ -3,9 +3,10 @@ import { Router } from '@angular/router';
import { AuthService } from '../auth.service'; import { AuthService } from '../auth.service';
@Component({ @Component({
selector: 'app-login', selector: 'app-login',
templateUrl: './login.component.html', templateUrl: './login.component.html',
styleUrls: ['./login.component.scss'], styleUrls: ['./login.component.scss'],
standalone: false
}) })
export class LoginComponent { export class LoginComponent {
public userName: string; public userName: string;

View file

@ -1,9 +1,10 @@
import { Component } from '@angular/core'; import { Component } from '@angular/core';
@Component({ @Component({
selector: 'app-main-layout', selector: 'app-main-layout',
templateUrl: './main-layout.component.html', templateUrl: './main-layout.component.html',
styleUrls: ['./main-layout.component.scss'], styleUrls: ['./main-layout.component.scss'],
standalone: false
}) })
export class MainLayoutComponent { export class MainLayoutComponent {
constructor() {} constructor() {}

View file

@ -5,9 +5,10 @@ import { Profile } from '../models/profile.model';
import { SettingsService } from '../settings.service'; import { SettingsService } from '../settings.service';
@Component({ @Component({
selector: 'app-navbar', selector: 'app-navbar',
templateUrl: './navbar.component.html', templateUrl: './navbar.component.html',
styleUrls: ['./navbar.component.scss'], styleUrls: ['./navbar.component.scss'],
standalone: false
}) })
export class NavbarComponent implements OnInit { export class NavbarComponent implements OnInit {
public showMobileMenu = false; public showMobileMenu = false;

View file

@ -2,7 +2,8 @@ import { Pipe, PipeTransform, SecurityContext, VERSION } from '@angular/core';
import { DomSanitizer } from '@angular/platform-browser'; import { DomSanitizer } from '@angular/platform-browser';
@Pipe({ @Pipe({
name: 'nl2br', name: 'nl2br',
standalone: false
}) })
export class Nl2BrPipe implements PipeTransform { export class Nl2BrPipe implements PipeTransform {
constructor(private sanitizer: DomSanitizer) {} constructor(private sanitizer: DomSanitizer) {}

View file

@ -2,9 +2,10 @@ import { Component } from '@angular/core';
import { AuthService } from '../auth.service'; import { AuthService } from '../auth.service';
@Component({ @Component({
selector: 'app-profile', selector: 'app-profile',
templateUrl: './profile.component.html', templateUrl: './profile.component.html',
styleUrls: ['./profile.component.scss'], styleUrls: ['./profile.component.scss'],
standalone: false
}) })
export class ProfileComponent { export class ProfileComponent {
constructor(private authService: AuthService) {} constructor(private authService: AuthService) {}

View file

@ -3,9 +3,10 @@ import { SettingsService } from 'src/app/settings.service';
import { Setting } from '../models/setting.model'; import { Setting } from '../models/setting.model';
@Component({ @Component({
selector: 'app-settings', selector: 'app-settings',
templateUrl: './settings.component.html', templateUrl: './settings.component.html',
styleUrls: ['./settings.component.scss'], styleUrls: ['./settings.component.scss'],
standalone: false
}) })
export class SettingsComponent implements OnInit { export class SettingsComponent implements OnInit {
public activeTab = 0; public activeTab = 0;

View file

@ -3,9 +3,10 @@ import { Router } from '@angular/router';
import { AuthService } from '../auth.service'; import { AuthService } from '../auth.service';
@Component({ @Component({
selector: 'app-setup', selector: 'app-setup',
templateUrl: './setup.component.html', templateUrl: './setup.component.html',
styleUrls: ['./setup.component.scss'], styleUrls: ['./setup.component.scss'],
standalone: false
}) })
export class SetupComponent { export class SetupComponent {
public userName: string; public userName: string;

View file

@ -1,7 +1,8 @@
import { Pipe, PipeTransform } from '@angular/core'; import { Pipe, PipeTransform } from '@angular/core';
@Pipe({ @Pipe({
name: 'sort', name: 'sort',
standalone: false
}) })
export class SortPipe implements PipeTransform { export class SortPipe implements PipeTransform {
transform(array: any[], field: string, order: 'asc' | 'desc' = 'asc'): any[] { transform(array: any[], field: string, order: 'asc' | 'desc' = 'asc'): any[] {

View file

@ -3,7 +3,8 @@ import { FileSizePipe } from 'ngx-filesize';
import { RealDebridStatus, Torrent } from './models/torrent.model'; import { RealDebridStatus, Torrent } from './models/torrent.model';
@Pipe({ @Pipe({
name: 'status', name: 'status',
standalone: false
}) })
export class TorrentStatusPipe implements PipeTransform { export class TorrentStatusPipe implements PipeTransform {
constructor(private pipe: FileSizePipe) {} constructor(private pipe: FileSizePipe) {}

View file

@ -64,7 +64,7 @@
</tbody> </tbody>
</table> </table>
<div fxLayout.lt-lg="column" fxLayout.gt-sm="row" fxLayoutGap="20px"> <div class="flex-container">
<button <button
class="button is-danger" class="button is-danger"
(click)="showDeleteModal()" (click)="showDeleteModal()"

View file

@ -3,3 +3,14 @@ table {
cursor: pointer; cursor: pointer;
} }
} }
.flex-container {
display: flex;
flex: 1 1 0;
gap: 20px;
flex-direction: row;
@media screen and (max-width: 1279px) {
flex-direction: column;
}
}

View file

@ -5,9 +5,10 @@ import { TorrentService } from '../torrent.service';
import { forkJoin, Observable } from 'rxjs'; import { forkJoin, Observable } from 'rxjs';
@Component({ @Component({
selector: 'app-torrent-table', selector: 'app-torrent-table',
templateUrl: './torrent-table.component.html', templateUrl: './torrent-table.component.html',
styleUrls: ['./torrent-table.component.scss'], styleUrls: ['./torrent-table.component.scss'],
standalone: false
}) })
export class TorrentTableComponent implements OnInit { export class TorrentTableComponent implements OnInit {
public torrents: Torrent[] = []; public torrents: Torrent[] = [];

View file

@ -18,8 +18,8 @@
</div> </div>
</div> </div>
<div *ngIf="torrent !== null && torrent !== undefined"> <div *ngIf="torrent !== null && torrent !== undefined">
<div fxLayout.lt-lg="column" fxLayout.gt-sm="row" fxLayoutGap="20px" *ngIf="activeTab === 0"> <div class="flex-container" *ngIf="activeTab === 0">
<div fxFlex> <div style="flex: 1 1 0">
<div class="field is-grouped"> <div class="field is-grouped">
<div class="control"> <div class="control">
<button class="button is-danger" (click)="showDeleteModal()">Delete Torrent</button> <button class="button is-danger" (click)="showDeleteModal()">Delete Torrent</button>
@ -129,7 +129,7 @@
</ng-container> </ng-container>
</div> </div>
</div> </div>
<div fxFlex> <div style="flex: 1 1 0">
<div class="field"> <div class="field">
<label class="label">Real-Debrid ID</label> <label class="label">Real-Debrid ID</label>
{{ torrent.rdId }} {{ torrent.rdId }}
@ -251,8 +251,8 @@
<tr *ngIf="downloadExpanded[download.downloadId]" class="separator"> <tr *ngIf="downloadExpanded[download.downloadId]" class="separator">
<td style="width: 35px"></td> <td style="width: 35px"></td>
<td colspan="5"> <td colspan="5">
<div fxLayout.lt-lg="column" fxLayout.gt-sm="row" fxLayoutGap="20px"> <div class="flex-container">
<div fxFlex> <div style="flex: 1 1 0;">
<div class="field is-grouped"> <div class="field is-grouped">
<div class="control"> <div class="control">
<button class="button is-primary" (click)="showDownloadRetryModal(download.downloadId)"> <button class="button is-primary" (click)="showDownloadRetryModal(download.downloadId)">
@ -285,7 +285,7 @@
{{ download.retryCount }} / {{ torrent.downloadRetryAttempts }} {{ download.retryCount }} / {{ torrent.downloadRetryAttempts }}
</div> </div>
</div> </div>
<div fxFlex> <div style="flex: 1 1 0;">
<div class="field"> <div class="field">
<label class="label">Added</label> <label class="label">Added</label>
<ng-container *ngIf="download.added"> <ng-container *ngIf="download.added">

View file

@ -9,5 +9,16 @@ table {
} }
.fa-download { .fa-download {
margin-left :12px; margin-left: 12px;
} }
.flex-container {
display: flex;
flex: 1 1 0;
gap: 20px;
flex-direction: row;
@media screen and (max-width: 1279px) {
flex-direction: column;
}
}

View file

@ -5,9 +5,10 @@ import { Torrent } from '../models/torrent.model';
import { TorrentService } from '../torrent.service'; import { TorrentService } from '../torrent.service';
@Component({ @Component({
selector: 'app-torrent', selector: 'app-torrent',
templateUrl: './torrent.component.html', templateUrl: './torrent.component.html',
styleUrls: ['./torrent.component.scss'], styleUrls: ['./torrent.component.scss'],
standalone: false
}) })
export class TorrentComponent implements OnInit { export class TorrentComponent implements OnInit {
public torrent: Torrent; public torrent: Torrent;

View file

@ -1,2 +1,2 @@
@import "../node_modules/bulma/bulma.sass"; @forward "../node_modules/bulma/bulma.sass";
@import "../node_modules/@fortawesome/fontawesome-free/css/all.css"; @forward "../node_modules/@fortawesome/fontawesome-free/css/all.css";

View file

@ -5,6 +5,7 @@
"baseUrl": "./", "baseUrl": "./",
"outDir": "./dist/out-tsc", "outDir": "./dist/out-tsc",
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"esModuleInterop": true,
"strict": true, "strict": true,
"noImplicitOverride": true, "noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true, "noPropertyAccessFromIndexSignature": true,
@ -12,7 +13,6 @@
"noFallthroughCasesInSwitch": true, "noFallthroughCasesInSwitch": true,
"sourceMap": true, "sourceMap": true,
"declaration": false, "declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true, "experimentalDecorators": true,
"moduleResolution": "node", "moduleResolution": "node",
"importHelpers": true, "importHelpers": true,