Skip to content

Commit

Permalink
✨ Better button layout in experimental (#2492)
Browse files Browse the repository at this point in the history
  • Loading branch information
HerrLevin authored Apr 14, 2024
1 parent 26906a7 commit 2e44735
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion resources/views/dashboard.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@

@if(auth()->user()->hasRole('open-beta'))
<div id="station-board-new">
<Stationautocomplete :dashboard="true"></Stationautocomplete>
<Stationautocomplete :dashboard="true" :show-gps-button="true"></Stationautocomplete>
</div>
@else
@include('includes.station-autocomplete')
Expand Down
16 changes: 15 additions & 1 deletion resources/vue/components/StationAutocomplete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ export default {
type: DateTime,
required: false,
default: null
},
showFilterButton: {
type: Boolean,
required: false,
default: false
},
showGpsButton: {
type: Boolean,
required: false,
default: false
}
},
data() {
Expand Down Expand Up @@ -174,10 +184,14 @@ export default {
@focusin="showModal"
@keyup.enter="setStationFromText"
/>
<button type="button" class="btn btn-outline-dark stationSearchButton"
<button v-if="showFilterButton" type="button" class="btn btn-outline-dark stationSearchButton"
@click="showFilter = !showFilter">
<i class="fa fa-filter" aria-hidden="true"></i>
</button>
<button v-if="showGpsButton" type="button" class="btn btn-outline-dark stationSearchButton"
@click="setStationFromGps">
<i class="fa fa-map-marker-alt" aria-hidden="true"></i>
</button>
<button type="button" class="btn btn-outline-dark stationSearchButton" @click="showPicker">
<i class="fa fa-clock" aria-hidden="true"></i>
</button>
Expand Down
1 change: 1 addition & 0 deletions resources/vue/components/Stationboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ export default {
v-on:update:travel-type="updateTravelType"
:station="{name: stationName}"
:time="now"
:show-filter-button="true"
/>
<div v-if="loading" style="max-width: 200px;" class="spinner-grow text-trwl mx-auto p-2" role="status">
<span class="visually-hidden">Loading...</span>
Expand Down

0 comments on commit 2e44735

Please sign in to comment.