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