mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
feat(roadtrip): let one stop say how full it fills
The fill level was one figure for the whole trip, and a trip does not have one. A motorway rapid charger is worth about 80 % because the last fifth costs as long again; the charger at the hotel is worth all of it because the car stands there all night. Between those two the difference is a whole leg, and a single setting has to be wrong about one of them. So the badge on a refuelling stop is now the way in: it shows what that stop will actually fill to, its own figure or the traveller's, and opens a panel of the six answers people actually give. Under them it says what the choice buys in kilometres, because 80 % is an abstraction and "about 290 km from here" is the thing being decided. Picking the figure a stop already has hands it back to the setting, the same gesture the kind picker uses to un-pick a kind. The value lives in places.fill_percent, beside stop_type, because it is a property of the stop rather than of the person. Null means "follow the setting", which is every stop that predates the column and every stop nobody has an opinion about, so nothing changes for a trip that never touches it. Two pieces of shared machinery came out of it rather than being copied. The popover chrome — measure before showing, flip when the window is short, close on an outside click, Escape or a scroll — is one component now, used by the kind picker and this one. So is the assembly of the range from seven settings, which the routes hook and the rail both need and which would have drifted the first time a field was added.
This commit is contained in:
@@ -143,6 +143,11 @@ const roadtrip: TranslationStrings = {
|
||||
'roadtrip.leg.driveText': '{distance} em {time}',
|
||||
'roadtrip.day.stopCount': '{count} paradas',
|
||||
'roadtrip.stop.stayShort': 'Parada',
|
||||
'roadtrip.stop.fillTitle': 'Abastece até',
|
||||
'roadtrip.stop.fillGives': 'cerca de {distance} a partir daqui',
|
||||
'roadtrip.stop.fillNoRange': 'Informe uma autonomia para ver o que isso rende.',
|
||||
'roadtrip.stop.fillDefault': 'Usar meu padrão',
|
||||
'roadtrip.stop.fillSet': 'Definir quanto abastecer nesta parada',
|
||||
'roadtrip.leg.pending': 'Sem rota',
|
||||
'roadtrip.stop.addTitle': 'Adicionar como parada',
|
||||
'roadtrip.stop.kind': 'Tipo de parada',
|
||||
|
||||
Reference in New Issue
Block a user