Merge pull request #13127 from vvlladd28/bug/import-dialog/long-file-name

Fixed import file dialog when long file name
This commit is contained in:
Igor Kulikov 2025-04-08 16:36:14 +03:00 committed by GitHub
commit 2690789d47
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,32 +28,30 @@
<mat-progress-bar color="warn" mode="indeterminate" *ngIf="isLoading$ | async">
</mat-progress-bar>
<div mat-dialog-content>
<fieldset [disabled]="isLoading$ | async">
<div class="flex flex-1 flex-col">
<tb-toggle-select *ngIf="enableImportFromContent"
class="flex-1"
formControlName="importType">
<tb-toggle-option value="file">{{ importFileLabel | translate }}</tb-toggle-option>
<tb-toggle-option value="content">{{ importContentLabel | translate }}</tb-toggle-option>
</tb-toggle-select>
<tb-file-input *ngIf="importFormGroup.get('importType').value === 'file'"
[contentConvertFunction]="loadDataFromJsonContent"
[existingFileName]="currentFileName"
(fileNameChanged)="currentFileName = $event"
formControlName="fileContent"
required
label="{{importFileLabel | translate}}"
dropLabel="{{ 'import.drop-json-file-or' | translate }}"
accept=".json,application/json"
allowedExtensions="json">
</tb-file-input>
<tb-json-object-edit *ngIf="importFormGroup.get('importType').value === 'content'"
formControlName="jsonContent"
jsonRequired
label="{{ importContentLabel | translate }}">
</tb-json-object-edit>
</div>
</fieldset>
<div class="flex flex-1 flex-col">
<tb-toggle-select *ngIf="enableImportFromContent"
class="flex-1"
formControlName="importType">
<tb-toggle-option value="file">{{ importFileLabel | translate }}</tb-toggle-option>
<tb-toggle-option value="content">{{ importContentLabel | translate }}</tb-toggle-option>
</tb-toggle-select>
<tb-file-input *ngIf="importFormGroup.get('importType').value === 'file'"
[contentConvertFunction]="loadDataFromJsonContent"
[existingFileName]="currentFileName"
(fileNameChanged)="currentFileName = $event"
formControlName="fileContent"
required
label="{{importFileLabel | translate}}"
dropLabel="{{ 'import.drop-json-file-or' | translate }}"
accept=".json,application/json"
allowedExtensions="json">
</tb-file-input>
<tb-json-object-edit *ngIf="importFormGroup.get('importType').value === 'content'"
formControlName="jsonContent"
jsonRequired
label="{{ importContentLabel | translate }}">
</tb-json-object-edit>
</div>
</div>
<div mat-dialog-actions class="flex items-center justify-end">
<button mat-button color="primary"