Skip to content

Commit

Permalink
style specifications
Browse files Browse the repository at this point in the history
  • Loading branch information
mkalal6 committed Apr 24, 2024
1 parent 6202d3f commit b7d923f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ <h2>
<h3>Upload your ORCA data file </h3>

<div class="background-image"></div>
<div *ngIf="fileName">Selected File: {{fileName}}</div>

<div>
<input type="file" (change)="onFileSelected($event)" accept=".txt">
<button class="Submit" (click)="onUpload()">Upload</button>
</div>
<!--<div *ngIf="fileName">Selected File: {{fileName}}</div> -->

<div>
<h3>Search terms</h3>
Expand Down Expand Up @@ -57,7 +57,7 @@ <h3>Cycles </h3>
<h3>Data to be extracted</h3>
<div class="data_search">
<form action="localhost:4200/" method="POST">
<select id = "Select how much data to be extracted">
<select id = "Select how much data to be extracted" style="width: calc(200px); height: 40px; font-size: 16px;">
<option value="First">First</option>
<option value="Last">Last</option>
<option value="Whole">Whole</option>
Expand All @@ -70,11 +70,7 @@ <h3>Data to be extracted</h3>
<h3>Lines</h3>
<div class="lines_search">
<form action="localhost:4200/" method="POST">
<select id = "Lines">
<option value="10">10</option>
<option value="20">20</option>
<option value="30">30</option>
</select>
<input type="number" id="Lines" min="0" value="0" style="width: calc(200px); height: 40px; font-size: 16px;">
</form>
</div>
</div>
Expand All @@ -87,4 +83,4 @@ <h3>Lines</h3>
(click)="onSubmit()"
>Download Output</button>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class DashboardComponent{

fileType = 'ORCA';
fileExtension = '.txt';
public fileName: string;
public fileName: string | undefined;
selectedFile: File | null = null;
//searchTerms: { term: string, cycles?: string[], data?: string[], lines?: string[] }[] = [];
specify_lines: string = '';
Expand All @@ -42,12 +42,12 @@ export class DashboardComponent{
constructor(private readonly http: HttpClient) { }

onFileSelected(event: any) {
this.selectedFile = event.target.files[0];
//this.selectedFile = event.target.files[0];
// console.log("file name full:", event.target.value);
// if(this.selectedFile){
// this.fileName = this.selectedFile.name;
// } // Store filename for display
this.fileName = this.selectedFile ? this.selectedFile.name : '';
//this.fileName = this.selectedFile?.name;
}


Expand Down Expand Up @@ -134,7 +134,7 @@ export class DashboardComponent{
// }

onSubmit() {
if (!this.selectedFile) {
if (!this.selectedFile || !this.fileName) {
alert('Please select a file.');
return;
}
Expand Down Expand Up @@ -173,5 +173,6 @@ export class DashboardComponent{
}

// readonly separatorKeysCodes: number[] = [ENTER, COMMA];


}

0 comments on commit b7d923f

Please sign in to comment.