-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
207 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ects/srm/src/app/area-search-selector-results/area-search-selector-results.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
projects/srm/src/app/search-results-page/search-results-page-state.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
export class SearchResultsPageState { | ||
|
||
resultsVisible = true; | ||
areaSearchVisible = null; | ||
areaSearchVisible = false; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...rc/app/search-results-page/srp-area-search-buttons/srp-area-search-buttons.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<div class='status button'> | ||
@if (areaSearchState.nationWide_ === false || areaSearchState.area_) { | ||
<span class='icon map-region'></span> | ||
<span class='text'>{{areaSearchState.area_ || 'באיזור המפה'}}</span> | ||
@if (searchState.mapLoading()) { | ||
<span class='count count-loading'></span> | ||
} @else { | ||
<span class='count'>{{searchState.mapCount()}}</span> | ||
} | ||
} | ||
@else { | ||
<span class='icon nation-wide'></span> | ||
<span class='text'>בכל הארץ</span> | ||
@if (searchState.nationalLoading()) { | ||
<span class='count count-loading'></span> | ||
} @else { | ||
<span class='count'>{{searchState.nationWideCount()}}</span> | ||
} | ||
} | ||
|
||
</div> | ||
<div class='toggle button' (click)='areaSearch()'> | ||
@if (areaSearchState.area_) { | ||
<span class='icon nation-wide'></span> | ||
<span class='text'>בכל הארץ</span> | ||
@if (searchState.nationalLoading()) { | ||
<span class='count count-loading'></span> | ||
} @else { | ||
<span class='count'>{{searchState.nationWideCount()}}</span> | ||
} | ||
} | ||
@else { | ||
<span class='icon search'></span> | ||
<span class='text'>חיפוש ישוב</span> | ||
} | ||
</div> |
103 changes: 103 additions & 0 deletions
103
...rc/app/search-results-page/srp-area-search-buttons/srp-area-search-buttons.component.less
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
@import '../../../common.less'; | ||
|
||
:host { | ||
display: flex; | ||
flex-flow: column; | ||
align-items: stretch; | ||
gap: 8px; | ||
|
||
.button { | ||
display: flex; | ||
height: 36px; | ||
padding: 0 2px 0 4px; | ||
justify-content: flex-start; | ||
align-items: center; | ||
border-radius: 32px; | ||
|
||
.icon { | ||
width: 32px; | ||
height: 32px; | ||
.background-image; | ||
} | ||
|
||
.text { | ||
.font-rag-sans; | ||
font-size: 16px; | ||
line-height: 20px; | ||
} | ||
|
||
.count { | ||
margin-right: auto; | ||
width: fit-content; | ||
border-radius: 12px; | ||
background: @color-blue-6; | ||
min-width: 24px; | ||
padding: 0 6px; | ||
height: 24px; | ||
display: flex; | ||
flex-flow: row; | ||
align-items: center; | ||
justify-content: center; | ||
color: @color-blue-0; | ||
.font-rag-sans; | ||
font-size: 16px; | ||
font-weight: 600; | ||
line-height: 20px; | ||
|
||
&.count-loading { | ||
.background-image; | ||
background-image: url(../../../assets/img/icon-count-loading.svg); | ||
background-size: 7px; | ||
} | ||
} | ||
|
||
&.status { | ||
background: @color-white; | ||
box-shadow: 0px 0px 5px 0px rgba(31, 55, 246, 0.20); | ||
|
||
.icon { | ||
&.nation-wide { | ||
background-image: url(../../../assets/img/icon-nation-wide-blue-0.svg); | ||
background-size: 32px; | ||
} | ||
&.map-region { | ||
background-image: url(../../../assets/img/icon-map-region-blue-0.svg); | ||
background-size: 32px; | ||
} | ||
} | ||
|
||
.text { | ||
color: @color-blue-0; | ||
font-weight: 600; | ||
} | ||
} | ||
|
||
&.toggle { | ||
border: 1px solid @color-blue-5; | ||
background: @color-blue-8; | ||
box-shadow: 0px 4px 4px 0px rgba(31, 55, 246, 0.10) inset; | ||
cursor: pointer; | ||
|
||
.icon { | ||
&.nation-wide { | ||
background-image: url(../../../assets/img/icon-nation-wide-blue-3.svg); | ||
background-size: 32px; | ||
} | ||
&.search { | ||
background-image: url(../../../assets/img/icon-search-blue-3.svg); | ||
background-size: 24px; | ||
} | ||
} | ||
|
||
.text { | ||
color: @color-blue-1; | ||
font-weight: 300; | ||
} | ||
|
||
&:hover { | ||
border: 1px solid @color-blue-3; | ||
background: @color-white; | ||
} | ||
} | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
.../src/app/search-results-page/srp-area-search-buttons/srp-area-search-buttons.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { Component, Input } from '@angular/core'; | ||
import { AreaSearchState } from '../../area-search-selector/area-search-state'; | ||
import { timer } from 'rxjs'; | ||
import { SearchState } from '../../search-results/search-state'; | ||
|
||
@Component({ | ||
selector: 'app-srp-area-search-buttons', | ||
templateUrl: './srp-area-search-buttons.component.html', | ||
styleUrl: './srp-area-search-buttons.component.less' | ||
}) | ||
export class SrpAreaSearchButtonsComponent { | ||
|
||
@Input() areaSearchState: AreaSearchState; | ||
@Input() searchState: SearchState; | ||
|
||
areaSearch() { | ||
if (this.areaSearchState.area_) { | ||
this.areaSearchState.selectNationWide(); | ||
} else { | ||
this.areaSearchState.startSearching(); | ||
timer(100).subscribe(() => { | ||
this.areaSearchState.forceFocusInput(); | ||
}); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
align-self: stretch; | ||
|
||
h3 { | ||
margin: 0; | ||
padding: 0 4px 4px 4px; | ||
color: @color-gray-1; | ||
.font-rag-sans; | ||
|