Skip to content

Commit 7dcd119

Browse files
committed
✨ Final changes for 2.8.0
1 parent 1b71316 commit 7dcd119

File tree

11 files changed

+139
-242
lines changed

11 files changed

+139
-242
lines changed

assets/main.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ html {
4747
.ml-md-20 {
4848
margin-left: 80px;
4949
}
50+
.mb-md-00 {
51+
margin-bottom: 0;
52+
}
5053
}
5154

5255
.text-subheader {

components/VehicleSheet/Large.vue

Lines changed: 0 additions & 143 deletions
This file was deleted.

components/VehicleSheet/QuickProperty.vue

Lines changed: 0 additions & 33 deletions
This file was deleted.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<template>
2+
<div
3+
v-if="vehicle.trip.routeShortName"
4+
:style="{
5+
color: vehicle.trip.routeTextColor,
6+
backgroundColor: vehicle.trip.routeColor,
7+
}"
8+
class="tw-flex tw-rounded-lg tw-px-2 tw-py-1"
9+
>
10+
<b class="mr-1">{{ vehicle.trip.routeShortName }}</b>
11+
<span class="tw-font-medium">
12+
<b>{{ vehicle.trip.routeLongName }}</b>
13+
<div v-if="vehicle.trip.headsign" class="tw-flex tw-items-center">
14+
<TwIcon :path="mdiArrowRight" class="tw-h-5 tw-w-5 tw-gap-x-1" />
15+
{{ vehicle.trip.headsign }}
16+
</div>
17+
</span>
18+
</div>
19+
<div
20+
v-else
21+
:style="{
22+
border: `1px solid ${agency.color}`,
23+
color: agency.color,
24+
backgroundColor: agency.textColor,
25+
}"
26+
class="tw-rounded-lg tw-px-2 tw-py-1 tw-font-bold"
27+
>
28+
Route
29+
{{ vehicle.routeId }}
30+
</div>
31+
</template>
32+
33+
<script>
34+
import { mdiArrowRight } from '@mdi/js'
35+
36+
export default {
37+
data: () => ({ mdiArrowRight }),
38+
props: {
39+
agency: {
40+
type: Object,
41+
required: true,
42+
},
43+
vehicle: {
44+
type: Object,
45+
required: true,
46+
},
47+
},
48+
}
49+
</script>

components/VehicleSheet/Small.vue renamed to components/VehicleSheet/VehicleSheet.vue

Lines changed: 41 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,65 @@
11
<template>
2-
<!-- Mining top : 4 (appbar) + 5.25 (nav bar) -->
32
<footer
4-
class="tw-absolute tw-top-[calc(100vh-15.25rem)] tw-w-full tw-space-y-4 tw-rounded-t-[1.75rem] tw-bg-neutral-99 tw-p-4 tw-pb-[5.25rem] tw-text-neutral-10 dark:tw-bg-neutral-10 dark:tw-text-neutral-90 md:tw-hidden"
3+
class="tw-absolute tw-top-[calc(100vh-15.25rem)] tw-mb-[5.25rem] tw-w-full tw-space-y-4 tw-overflow-y-auto tw-rounded-t-[1.75rem] tw-bg-neutral-99 tw-p-4 tw-text-neutral-10 dark:tw-bg-neutral-10 dark:tw-text-neutral-90 md:tw-top-4 md:tw-left-4 md:tw-max-h-[calc(100vh-41px-32px)] md:tw-w-96 md:tw-rounded-xl"
54
>
6-
<div class="-tw-mt-4">
5+
<div class="-tw-mt-4 md:tw-hidden">
76
<div
87
class="tw-my-1.5 tw-mx-auto tw-h-1 tw-w-8 tw-rounded-full tw-bg-neutralVariant-30/40 dark:tw-bg-neutralVariant-80/40"
98
></div>
109
</div>
1110
<div
1211
v-if="warning"
13-
class="tw-relative tw-rounded-md tw-bg-error-90 tw-px-2 tw-py-1 tw-text-error-10 dark:tw-bg-error-30 dark:tw-text-error-90"
12+
class="!-tw-mx-4 !tw-mb-2 !-tw-mt-4 tw-bg-error-90 tw-px-4 tw-pt-4 tw-pb-2 tw-font-medium tw-text-error-10 dark:tw-bg-error-30 dark:tw-text-error-90"
1413
>
1514
{{ $t(warning) }}
1615
</div>
17-
<div class="!tw-mt-0 tw-flex tw-h-16 tw-items-center tw-gap-x-4">
16+
<div
17+
class="!tw-mt-0 tw-flex tw-h-16 tw-items-center tw-gap-x-4 md:tw-h-auto md:tw-gap-x-6"
18+
>
1819
<MapVehicleAvatar />
19-
<div class="tw-ml-2 tw-grow">
20-
<h2 class="tw-text-2xl tw-leading-8">
20+
<div class="tw-ml-2 tw-grow md:tw-ml-0">
21+
<h2
22+
class="tw-text-2xl tw-leading-8 md:tw-text-4xl md:tw-leading-[2.75rem]"
23+
>
2124
{{ vehicle.label ?? vehicle.ref }}
2225
</h2>
23-
<h3 class="tw-text-xs tw-font-medium tw-leading-4">
24-
{{ agency.shortName }}
26+
<h3
27+
class="tw-text-xs tw-font-medium tw-leading-4 md:tw-text-base md:tw-font-normal md:tw-leading-6"
28+
>
29+
<span class="md:tw-hidden">{{ agency.shortName }}</span>
30+
<span class="tw-hidden md:tw-inline">{{ agency.name }}<br /></span>
2531
<span v-if="vehicle.timestamp">
26-
&bull;
32+
<span class="md:tw-hidden">&bull;</span>
2733
<TwTimeAgo :timestamp="parseInt(vehicle.timestamp)" />
2834
</span>
2935
</h3>
3036
</div>
3137
<div
32-
v-if="vehicle.trip.routeShortName"
33-
:style="{
34-
color: vehicle.trip.routeTextColor,
35-
backgroundColor: vehicle.trip.routeColor,
36-
}"
37-
class="tw-rounded-lg tw-px-2 tw-py-1 tw-font-bold"
38-
>
39-
{{ vehicle.trip.routeShortName }}
40-
</div>
41-
<div
42-
v-else
4338
:style="{
44-
border: `1px solid ${agency.color}`,
45-
color: agency.color,
46-
backgroundColor: agency.textColor,
39+
border: vehicle.trip.routeShortName
40+
? 'none'
41+
: `1px solid ${agency.color}`,
42+
color: vehicle.trip.routeTextColor ?? agency.textColor,
43+
backgroundColor: vehicle.trip.routeColor ?? agency.color,
4744
}"
48-
class="tw-rounded-lg tw-px-2 tw-py-1 tw-font-bold"
45+
class="tw-rounded-lg tw-px-2 tw-py-1 tw-font-bold md:tw-hidden"
4946
>
50-
Route
51-
{{ vehicle.routeId }}
47+
{{
48+
vehicle.trip.routeShortName
49+
? vehicle.trip.routeShortName
50+
: vehicle.routeId
51+
}}
5252
</div>
5353
</div>
54-
<ul class="-tw-ml-6 tw-flex tw-items-center tw-gap-x-2">
54+
<VehicleSheetRouteIndicator
55+
:vehicle="vehicle"
56+
:agency="agency"
57+
class="tw-hidden md:tw-flex"
58+
/>
59+
<ul
60+
class="-tw-ml-6 tw-flex tw-items-center tw-gap-x-2"
61+
v-if="vehicle.tags.length"
62+
>
5563
<TwTag v-for="tag in vehicle.tags" :key="tag" :tag-id="tag" />
5664
</ul>
5765

@@ -81,23 +89,12 @@
8189
<h3 class="tw-text-neutral10 tw-text-sm tw-font-medium tw-leading-5">
8290
{{ $t('trip') }}
8391
</h3>
84-
<div
92+
<VehicleSheetRouteIndicator
93+
:vehicle="vehicle"
94+
:agency="agency"
95+
class="md:tw-hidden"
8596
v-if="vehicle.trip.routeShortName"
86-
:style="{
87-
color: vehicle.trip.routeTextColor,
88-
backgroundColor: vehicle.trip.routeColor,
89-
}"
90-
class="tw-flex tw-rounded-lg tw-px-2 tw-py-1"
91-
>
92-
<b class="mr-1">{{ vehicle.trip.routeShortName }}</b>
93-
<span class="tw-font-medium">
94-
<b>{{ vehicle.trip.routeLongName }}</b>
95-
<div v-if="vehicle.trip.headsign" class="tw-flex tw-items-center">
96-
<TwIcon :path="mdiArrowRight" class="tw-h-5 tw-w-5 tw-gap-x-1" />
97-
{{ vehicle.trip.headsign }}
98-
</div>
99-
</span>
100-
</div>
97+
/>
10198
<VehicleSheetPropertiesList :vehicle="vehicle" group="trip" />
10299
<div class="-tw-mx-4 tw-h-px tw-border-t tw-bg-neutralVariant-80" />
103100
<h3 class="tw-text-neutral10 tw-text-sm tw-font-medium tw-leading-5">

components/settings/TableColumns.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,19 @@
77
>
88
<TwStandardIconButton
99
@click="toggleVisiblity(column.field, !column.visible)"
10-
:color="column.visible ? 'primary' : null"
10+
:color="column.visible && 'primary'"
1111
>
1212
<TwIcon :path="column.visible ? mdiEyeOutline : mdiEyeOffOutline" />
1313
</TwStandardIconButton>
14-
<span>{{ $t(`properties.${column.field}`) }}</span>
14+
<span
15+
:class="[
16+
column.visible
17+
? 'tw-font-medium'
18+
: 'tw-text-neutralVariant-30 dark:tw-text-neutral-80',
19+
]"
20+
>
21+
{{ $t(`properties.${column.field}`) }}
22+
</span>
1523
<div class="tw-grow"></div>
1624
<TwStandardIconButton
1725
@click="changeOrder(column.field, true)"

0 commit comments

Comments
 (0)