From b9165904a8c85539689275905c7a7bc9d4b56753 Mon Sep 17 00:00:00 2001 From: NeoCoderMatrix86 <40752681+NeoCoderMatrix86@users.noreply.github.com> Date: Wed, 28 Aug 2024 16:04:16 +0200 Subject: [PATCH] Update ViewModeImport.razor --- .../Pages/ViewModeImport.razor | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/AudioCuesheetEditor/Pages/ViewModeImport.razor b/AudioCuesheetEditor/Pages/ViewModeImport.razor index 493f95b8..c936d73e 100644 --- a/AudioCuesheetEditor/Pages/ViewModeImport.razor +++ b/AudioCuesheetEditor/Pages/ViewModeImport.razor @@ -118,15 +118,18 @@ along with Foobar. If not, see - - - - - - - - - @if (_sessionStateContainer.TextImportFile != null) + @if (displayFileContent) + { + + + + + + + + + } + @if (displayEditImportOptions) { @@ -144,7 +147,7 @@ along with Foobar. If not, see - @if (_sessionStateContainer.TextImportFile.AnalyseException != null) + @if (_sessionStateContainer.TextImportFile?.AnalyseException != null) { @@ -195,9 +198,6 @@ along with Foobar. If not, see @code { - //TODO: Hide fileContent if importing a project file - //TODO: Hide edit import options im importing a cuesheet file - String selectedStep = "selectFiles"; String dragNDropUploadFilter = String.Join(',', TextImportfile.MimeType, Cuesheet.FileExtension, Projectfile.FileExtension); Boolean cuesheetDataVisible = true; @@ -208,6 +208,8 @@ along with Foobar. If not, see Boolean selectFilesCompleted = false; Boolean userChangedSelectedStep = false; Boolean displaySplitPoints = false; + Boolean displayFileContent = true; + Boolean displayEditImportOptions = true; Alert? alertInvalidFile; ModalDialog? modalDialog; List invalidTextImportFileNames = new(); @@ -370,6 +372,8 @@ along with Foobar. If not, see } } displaySplitPoints = importedFiles.ContainsValue(ImportFileType.ProjectFile); + displayFileContent = !importedFiles.ContainsValue(ImportFileType.ProjectFile); + displayEditImportOptions = importedFiles.ContainsValue(ImportFileType.Textfile); await OnSelectedStepChanged("validateData"); StateHasChanged(); }