Back to Kavita

Import Mappings.Component

UI/Web/src/app/admin/import-mappings/import-mappings.component.html

0.9.01.6 KB
Original Source

@if (!isLoading()) { @switch (currentStepIndex()) { @case (Step.Import) {

{{t('import-description')}}

} @case (Step.Configure) { @if (importSettingsForm.get('importMode'); as control) { @for (mode of ImportModes; track mode) { {{mode | importMode}} } }

@if (importSettingsForm.get('resolution'); as control) { @for (resolution of ConflictResolutions; track resolution) { {{resolution | conflictResolution}} } }

{{t('fields-to-import')}}

{{t('fields-to-import-tooltip')}}

@if (importSettingsForm.get('whitelist'); as control) {

}

@if (importSettingsForm.get('blacklist'); as control) {

}

@if (importSettingsForm.get('ageRatings'); as control) {

}

@if (importSettingsForm.get('fieldMappings'); as control) {

}

} @case (Step.Conflicts) { @let res = importResult(); @if (res) { @if (res.ageRatingConflicts.length > 0) { {{t('age-ratings-label')}}

{{t('age-ratings-conflicts-tooltip')}} } @for (arm of res.ageRatingConflicts; track arm) { @if (importSettingsForm.get('ageRatingConflictResolutions.' + arm); as control) { {{arm}} @for (resolution of ConflictResolutions; track resolution) { } } } } } @case (Step.Finalize) { @let res = importResult(); @if (res) { } } } }

{{t('prev')}}

{{t(nextButtonLabel())}}

@let oldValue = settings()!.ageRatingMappings[arm]; @let newValue = importedMappings()!.ageRatingMappings[arm]; @switch (resolution) { @case (ConflictResolution.Manual) { {{'import-mappings.to-pick' | transloco}} } @case (ConflictResolution.Keep) { {{ oldValue | ageRating }} } @case (ConflictResolution.Replace) { {{ newValue | ageRating }} } }