Skip to content
This repository has been archived by the owner on Apr 1, 2022. It is now read-only.

General Little Improvements #29

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/app/projects-list/projects-list.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
<mat-form-field class="search-bar">
<mat-label>Buscar proyectos</mat-label>
<input matInput placeholder="Por nombre de proyecto o por usuario" formControlName="generalSearch" />
<mat-icon matSuffix (click)="onSubmit()">search</mat-icon>
<mat-icon *ngIf="generalSearchValid()" matSuffix>search</mat-icon>
<mat-icon *ngIf="!generalSearchValid()" matSuffix type="button" class="submitIcon" (click)="onSubmit()">check</mat-icon>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puede ser que no se vea clickeable en desktop?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tal vez deberiamos usar mat-button aca tambien en lo posible

</mat-form-field>
<button mat-button class="toggleFilterMenu" type="menu" (click)="openFilterMenu()">
<mat-icon>filter_list</mat-icon>
Expand Down
4 changes: 4 additions & 0 deletions src/app/projects-list/projects-list.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
flex-grow: 1;
}

.submitIcon {
cursor: pointer;
}

.toggleFilterMenu,
.applyFilters,
.resetFilters {
Expand Down
4 changes: 4 additions & 0 deletions src/app/projects-list/projects-list.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ export class ProjectsListComponent implements OnInit {
});
}

generalSearchValid() {
return this.generalSearch?.value == "";
}

openFilterMenu() {
this.filterDrawer?.toggle();
}
Expand Down