Remove ngx-filesize

This commit is contained in:
shamoon 2024-06-24 16:12:56 -07:00
parent 2f30fe3757
commit be16f58e56
6 changed files with 3 additions and 31 deletions

View File

@ -77,7 +77,6 @@
"scripts": [], "scripts": [],
"allowedCommonJsDependencies": [ "allowedCommonJsDependencies": [
"ng2-pdf-viewer", "ng2-pdf-viewer",
"filesize",
"file-saver" "file-saver"
], ],
"vendorChunk": true, "vendorChunk": true,

View File

@ -30,7 +30,6 @@
"ngx-color": "^9.0.0", "ngx-color": "^9.0.0",
"ngx-cookie-service": "^18.0.0", "ngx-cookie-service": "^18.0.0",
"ngx-file-drop": "^16.0.0", "ngx-file-drop": "^16.0.0",
"ngx-filesize": "^3.0.3",
"ngx-ui-tour-ng-bootstrap": "^14.0.3", "ngx-ui-tour-ng-bootstrap": "^14.0.3",
"rxjs": "^7.8.1", "rxjs": "^7.8.1",
"tslib": "^2.6.2", "tslib": "^2.6.2",
@ -10160,15 +10159,6 @@
"node": ">=10" "node": ">=10"
} }
}, },
"node_modules/filesize": {
"version": "9.0.11",
"resolved": "https://registry.npmjs.org/filesize/-/filesize-9.0.11.tgz",
"integrity": "sha512-gTAiTtI0STpKa5xesyTA9hA3LX4ga8sm2nWRcffEa1L/5vQwb4mj2MdzMkoHoGv4QzfDshQZuYscQSf8c4TKOA==",
"peer": true,
"engines": {
"node": ">= 0.4.0"
}
},
"node_modules/fill-range": { "node_modules/fill-range": {
"version": "7.0.1", "version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
@ -14531,19 +14521,6 @@
"@angular/core": ">=14.0.0" "@angular/core": ">=14.0.0"
} }
}, },
"node_modules/ngx-filesize": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/ngx-filesize/-/ngx-filesize-3.0.3.tgz",
"integrity": "sha512-qqP2p4WbbF7R+NXC9NqRQdAfWfMAYJ2Ijf4ezRCq7j3tPY6ybSP9AZ3FY1U7/95n1hmOJ2U5oY+oFb7LhHQRBw==",
"dependencies": {
"tslib": "^2.3.0"
},
"peerDependencies": {
"@angular/common": ">= 14.2.0 < 18.0.0",
"@angular/core": ">= 14.2.0 < 18.0.0",
"filesize": ">= 6.0.0 < 10.0.0"
}
},
"node_modules/ngx-ui-tour-ng-bootstrap": { "node_modules/ngx-ui-tour-ng-bootstrap": {
"version": "14.0.3", "version": "14.0.3",
"resolved": "https://registry.npmjs.org/ngx-ui-tour-ng-bootstrap/-/ngx-ui-tour-ng-bootstrap-14.0.3.tgz", "resolved": "https://registry.npmjs.org/ngx-ui-tour-ng-bootstrap/-/ngx-ui-tour-ng-bootstrap-14.0.3.tgz",

View File

@ -32,7 +32,6 @@
"ngx-color": "^9.0.0", "ngx-color": "^9.0.0",
"ngx-cookie-service": "^18.0.0", "ngx-cookie-service": "^18.0.0",
"ngx-file-drop": "^16.0.0", "ngx-file-drop": "^16.0.0",
"ngx-filesize": "^3.0.3",
"ngx-ui-tour-ng-bootstrap": "^14.0.3", "ngx-ui-tour-ng-bootstrap": "^14.0.3",
"rxjs": "^7.8.1", "rxjs": "^7.8.1",
"tslib": "^2.6.2", "tslib": "^2.6.2",

View File

@ -119,7 +119,6 @@ import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
import { ConfirmButtonComponent } from './components/common/confirm-button/confirm-button.component' import { ConfirmButtonComponent } from './components/common/confirm-button/confirm-button.component'
import { MonetaryComponent } from './components/common/input/monetary/monetary.component' import { MonetaryComponent } from './components/common/input/monetary/monetary.component'
import { SystemStatusDialogComponent } from './components/common/system-status-dialog/system-status-dialog.component' import { SystemStatusDialogComponent } from './components/common/system-status-dialog/system-status-dialog.component'
import { NgxFilesizeModule } from 'ngx-filesize'
import { RotateConfirmDialogComponent } from './components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component' import { RotateConfirmDialogComponent } from './components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component'
import { MergeConfirmDialogComponent } from './components/common/confirm-dialog/merge-confirm-dialog/merge-confirm-dialog.component' import { MergeConfirmDialogComponent } from './components/common/confirm-dialog/merge-confirm-dialog/merge-confirm-dialog.component'
import { SplitConfirmDialogComponent } from './components/common/confirm-dialog/split-confirm-dialog/split-confirm-dialog.component' import { SplitConfirmDialogComponent } from './components/common/confirm-dialog/split-confirm-dialog/split-confirm-dialog.component'
@ -518,7 +517,6 @@ function initializeApp(settings: SettingsService) {
TourNgBootstrapModule, TourNgBootstrapModule,
DragDropModule, DragDropModule,
NgxBootstrapIconsModule.pick(icons), NgxBootstrapIconsModule.pick(icons),
NgxFilesizeModule,
], ],
providers: [ providers: [
{ {

View File

@ -28,7 +28,7 @@
<dt i18n>Media Storage</dt> <dt i18n>Media Storage</dt>
<dd> <dd>
<ngb-progressbar style="height: 4px;" class="mt-2 mb-1" type="primary" [max]="status.storage.total" [value]="status.storage.total - status.storage.available"></ngb-progressbar> <ngb-progressbar style="height: 4px;" class="mt-2 mb-1" type="primary" [max]="status.storage.total" [value]="status.storage.total - status.storage.available"></ngb-progressbar>
<span class="small">{{status.storage.available | filesize}} <ng-container i18n>available</ng-container> ({{status.storage.total | filesize}} <ng-container i18n>total</ng-container>)</span> <span class="small">{{status.storage.available | fileSize}} <ng-container i18n>available</ng-container> ({{status.storage.total | fileSize}} <ng-container i18n>total</ng-container>)</span>
</dd> </dd>
</dl> </dl>
</div> </div>

View File

@ -19,8 +19,8 @@ import {
} from 'src/app/data/system-status' } from 'src/app/data/system-status'
import { provideHttpClientTesting } from '@angular/common/http/testing' import { provideHttpClientTesting } from '@angular/common/http/testing'
import { NgxBootstrapIconsModule, allIcons } from 'ngx-bootstrap-icons' import { NgxBootstrapIconsModule, allIcons } from 'ngx-bootstrap-icons'
import { NgxFilesizeModule } from 'ngx-filesize'
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http' import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'
import { FileSizePipe } from 'src/app/pipes/file-size.pipe'
const status: SystemStatus = { const status: SystemStatus = {
pngx_version: '2.4.3', pngx_version: '2.4.3',
@ -58,12 +58,11 @@ describe('SystemStatusDialogComponent', () => {
beforeEach(async () => { beforeEach(async () => {
await TestBed.configureTestingModule({ await TestBed.configureTestingModule({
declarations: [SystemStatusDialogComponent], declarations: [SystemStatusDialogComponent, FileSizePipe],
imports: [ imports: [
NgbModalModule, NgbModalModule,
ClipboardModule, ClipboardModule,
NgxBootstrapIconsModule.pick(allIcons), NgxBootstrapIconsModule.pick(allIcons),
NgxFilesizeModule,
NgbPopoverModule, NgbPopoverModule,
NgbProgressbarModule, NgbProgressbarModule,
], ],