Version 3.0.345

This commit is contained in:
Oliver Hauff 2022-10-12 21:02:34 +02:00
parent 4476717f26
commit 48667b2660
17 changed files with 154 additions and 96 deletions

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
@ -93,7 +93,7 @@ namespace TINK
JsonSettingsDictionary.GetConnectTimeout(settingsJSON),
JsonSettingsDictionary.GetActiveGeolocationService(settingsJSON),
JsonSettingsDictionary.GetCenterMapToCurrentLocation(settingsJSON),
Xamarin.Forms.GoogleMaps.MapSpan.FromCenterAndRadius(new Xamarin.Forms.GoogleMaps.Position(49.30881083492271, 11.358449625922889), Xamarin.Forms.GoogleMaps.Distance.FromKilometers(2.9)),
Xamarin.Forms.GoogleMaps.MapSpan.FromCenterAndRadius(new Xamarin.Forms.GoogleMaps.Position(48.945396, 11.395330), Xamarin.Forms.GoogleMaps.Distance.FromKilometers(250)),
JsonSettingsDictionary.GetLogToExternalFolder(settingsJSON),
JsonSettingsDictionary.GetIsSiteCachingOn(settingsJSON),
JsonSettingsDictionary.GetActiveTheme(settingsJSON) ?? typeof(Themes.LastenradBayern).Name);

View file

@ -10,6 +10,29 @@
</Grid>
</Shell.TitleView>
<!--Pages can be added as references or inline-->
<ContentPage
IsEnabled="{Binding IsIdle}"
Title="{x:Static resources:AppResources.MarkingTabBikes}">
<ContentPage.Content>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<WebView
x:Name="InfoTypesOfBikesWebView"
HeightRequest="1000"
WidthRequest="1000"
Source="{Binding TypesOfBikesText}"/>
<ActivityIndicator Grid.Row="0"
IsRunning="{Binding IsIdle, Converter={StaticResource InvertedBoolConverter}}"
IsVisible="{Binding IsIdle, Converter={StaticResource InvertedBoolConverter}}"
Scale="2"
VerticalOptions="CenterAndExpand"
HorizontalOptions="CenterAndExpand"
Color="{x:DynamicResource primary-back-title-color}"/>
</Grid>
</ContentPage.Content>
</ContentPage>
<ContentPage
IsEnabled="{Binding IsIdle}"
Title="{x:Static resources:AppResources.MarkingTabFees}">
@ -34,27 +57,4 @@
</Grid>
</ContentPage.Content>
</ContentPage>
<ContentPage
IsEnabled="{Binding IsIdle}"
Title="{x:Static resources:AppResources.MarkingTabBikes}">
<ContentPage.Content>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<WebView
x:Name="InfoTypesOfBikesWebView"
HeightRequest="1000"
WidthRequest="1000"
Source="{Binding TypesOfBikesText}"/>
<ActivityIndicator Grid.Row="0"
IsRunning="{Binding IsIdle, Converter={StaticResource InvertedBoolConverter}}"
IsVisible="{Binding IsIdle, Converter={StaticResource InvertedBoolConverter}}"
Scale="2"
VerticalOptions="CenterAndExpand"
HorizontalOptions="CenterAndExpand"
Color="{x:DynamicResource primary-back-title-color}"/>
</Grid>
</ContentPage.Content>
</ContentPage>
</TabbedPage>

View file

@ -73,7 +73,6 @@
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
<ShellContent
Title="{x:Static resources:AppResources.MarkingSettings}"
IsVisible="{Binding IsSettingsPageVisible}"
ContentTemplate="{DataTemplate settings:SettingsPage}">
<ShellContent.FlyoutIcon>
<FontImageSource Glyph="{StaticResource IconSettings}" Color="Black" FontFamily="FA-S" />

View file

@ -1,4 +1,4 @@
using System.ComponentModel;
using System.ComponentModel;
using TINK.MultilingualResources;
using TINK.Services;
using TINK.Services.CopriApi.ServerUris;
@ -18,7 +18,6 @@ namespace TINK.ViewModel.RootShell
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(IsFindBikePageVisible)));
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(IsAccountPageVisible)));
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(IsLoginPageVisible)));
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(IsSettingsPageVisible)));
};
// Update flyout view model whenever theme is switched.
@ -63,9 +62,6 @@ namespace TINK.ViewModel.RootShell
public bool IsLoginPageVisible => !App.ModelRoot.ActiveUser.IsLoggedIn;
public bool IsSettingsPageVisible => App.ModelRoot.Uris.ActiveUri.Host.GetIsCopri()
|| App.ModelRoot.ActiveUser.IsLoggedIn;
public string TabbedPageIngoTitle => AppResources.MarkingAbout;
}

View file

@ -131,7 +131,7 @@ namespace TINK.Services.BluetoothLock.BLE
}
catch (System.Exception exception)
{
Log.ForContext<LockItByScanServiceBase>().Error("Can not connect to device by name. {Exception}", exception);
Log.ForContext<LockItByScanServiceBase>().Error("Can not connect to device by name. Name: {deviceName}, rssi: {deviceRssi}, state: {state}. {Exception}", bleDevice?.Name, bleDevice?.Rssi, bleDevice?.State, exception);
if (exception is TaskCanceledException)
{
// A timeout occurred.
@ -208,7 +208,7 @@ namespace TINK.Services.BluetoothLock.BLE
}
catch (System.Exception exception)
{
Log.ForContext<LockItByScanServiceBase>().Error("Can not connect to lock. {Exception}", exception);
Log.ForContext<LockItByScanServiceBase>().Error("Can not connect to lock. Name: {deviceName}, rssi: {deviceRssi}, state: {state}. {Exception}", device?.Name, device?.Rssi, device?.State, exception);
continue;
}

View file

@ -11,26 +11,6 @@
</Grid>
</Shell.TitleView>
<!--Pages can be added as references or inline-->
<ContentPage
IsEnabled="{Binding IsIdle}"
Title="{x:Static resources:AppResources.MarkingTabFees}">
<ContentPage.Content>
<Grid>
<WebView
x:Name="InfoRentBikeWebView"
HeightRequest="1000"
WidthRequest="1000"
Source="{Binding RentBikeText}"/>
<ActivityIndicator Grid.Row="0"
IsRunning="{Binding IsIdle, Converter={StaticResource InvertedBoolConverter}}"
IsVisible="{Binding IsIdle, Converter={StaticResource InvertedBoolConverter}}"
Scale="2"
VerticalOptions="CenterAndExpand"
HorizontalOptions="CenterAndExpand"
Color="{x:DynamicResource primary-back-title-color}"/>
</Grid>
</ContentPage.Content>
</ContentPage>
<ContentPage
IsEnabled="{Binding IsIdle}"
Title="{x:Static resources:AppResources.MarkingTabBikes}">
@ -51,4 +31,24 @@
</Grid>
</ContentPage.Content>
</ContentPage>
<ContentPage
IsEnabled="{Binding IsIdle}"
Title="{x:Static resources:AppResources.MarkingTabFees}">
<ContentPage.Content>
<Grid>
<WebView
x:Name="InfoRentBikeWebView"
HeightRequest="1000"
WidthRequest="1000"
Source="{Binding RentBikeText}"/>
<ActivityIndicator Grid.Row="0"
IsRunning="{Binding IsIdle, Converter={StaticResource InvertedBoolConverter}}"
IsVisible="{Binding IsIdle, Converter={StaticResource InvertedBoolConverter}}"
Scale="2"
VerticalOptions="CenterAndExpand"
HorizontalOptions="CenterAndExpand"
Color="{x:DynamicResource primary-back-title-color}"/>
</Grid>
</ContentPage.Content>
</ContentPage>
</TabbedPage>

View file

@ -61,7 +61,6 @@
<ShellContent
Title="{x:Static resources:AppResources.MarkingSettings}"
Icon="menu_settings.png"
IsVisible="{Binding IsSettingsPageVisible}"
ContentTemplate="{DataTemplate settings:SettingsPage}">
</ShellContent>
</FlyoutItem>

View file

@ -1,4 +1,4 @@
using System.ComponentModel;
using System.ComponentModel;
using TINK.MultilingualResources;
using TINK.Services;
using TINK.Services.CopriApi.ServerUris;
@ -18,7 +18,6 @@ namespace TINK.ViewModel.RootShell
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(IsFindBikePageVisible)));
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(IsAccountPageVisible)));
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(IsLoginPageVisible)));
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(IsSettingsPageVisible)));
};
// Update flyout view model whenever theme is switched.
@ -63,9 +62,6 @@ namespace TINK.ViewModel.RootShell
public bool IsLoginPageVisible => !App.ModelRoot.ActiveUser.IsLoggedIn;
public bool IsSettingsPageVisible => App.ModelRoot.Uris.ActiveUri.Host.GetIsCopri()
|| App.ModelRoot.ActiveUser.IsLoggedIn;
public string TabbedPageIngoTitle => AppResources.MarkingAbout;
}

View file

@ -10,29 +10,6 @@
</Grid>
</Shell.TitleView>
<!--Pages can be added as references or inline-->
<ContentPage
IsEnabled="{Binding IsIdle}"
Title="{x:Static resources:AppResources.MarkingTabFees}">
<ContentPage.Content>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<WebView
x:Name="InfoRentBikeWebView"
HeightRequest="1000"
WidthRequest="1000"
Source="{Binding RentBikeText}"/>
<ActivityIndicator Grid.Row="0"
IsRunning="{Binding IsIdle, Converter={StaticResource InvertedBoolConverter}}"
IsVisible="{Binding IsIdle, Converter={StaticResource InvertedBoolConverter}}"
Scale="2"
VerticalOptions="CenterAndExpand"
HorizontalOptions="CenterAndExpand"
Color="{x:DynamicResource primary-back-title-color}"/>
</Grid>
</ContentPage.Content>
</ContentPage>
<ContentPage
IsEnabled="{Binding IsIdle}"
Title="{x:Static resources:AppResources.MarkingTabBikes}">
@ -56,4 +33,27 @@
</Grid>
</ContentPage.Content>
</ContentPage>
<ContentPage
IsEnabled="{Binding IsIdle}"
Title="{x:Static resources:AppResources.MarkingTabFees}">
<ContentPage.Content>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<WebView
x:Name="InfoRentBikeWebView"
HeightRequest="1000"
WidthRequest="1000"
Source="{Binding RentBikeText}"/>
<ActivityIndicator Grid.Row="0"
IsRunning="{Binding IsIdle, Converter={StaticResource InvertedBoolConverter}}"
IsVisible="{Binding IsIdle, Converter={StaticResource InvertedBoolConverter}}"
Scale="2"
VerticalOptions="CenterAndExpand"
HorizontalOptions="CenterAndExpand"
Color="{x:DynamicResource primary-back-title-color}"/>
</Grid>
</ContentPage.Content>
</ContentPage>
</TabbedPage>

View file

@ -73,7 +73,6 @@
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
<ShellContent
Title="{x:Static resources:AppResources.MarkingSettings}"
IsVisible="{Binding IsSettingsPageVisible}"
ContentTemplate="{DataTemplate settings:SettingsPage}">
<ShellContent.FlyoutIcon>
<FontImageSource Glyph="{StaticResource IconSettings}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" />

View file

@ -1,4 +1,4 @@
using System.ComponentModel;
using System.ComponentModel;
using TINK.MultilingualResources;
using TINK.Services;
using TINK.Services.CopriApi.ServerUris;
@ -18,7 +18,6 @@ namespace TINK.ViewModel.RootShell
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(IsFindBikePageVisible)));
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(IsAccountPageVisible)));
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(IsLoginPageVisible)));
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(IsSettingsPageVisible)));
};
// Update flyout view model whenever theme is switched.
@ -63,9 +62,6 @@ namespace TINK.ViewModel.RootShell
public bool IsLoginPageVisible => !App.ModelRoot.ActiveUser.IsLoggedIn;
public bool IsSettingsPageVisible => App.ModelRoot.Uris.ActiveUri.Host.GetIsCopri()
|| App.ModelRoot.ActiveUser.IsLoggedIn;
public string TabbedPageIngoTitle => AppResources.MarkingAbout;
}

View file

@ -604,6 +604,16 @@ namespace TINK.Model
new Version(3, 0, 344),
AppResources.ChangeLog_MinorBugFixes,
new List<AppFlavor> { AppFlavor.ShareeBike }
},
{
new Version(3, 0, 345),
AppResources.ChangeLog_3_0_345_SB_MK,
new List<AppFlavor> { AppFlavor.ShareeBike, AppFlavor.MeinKonrad }
},
{
new Version(3, 0, 345),
AppResources.ChangeLog_3_0_345_LB,
new List<AppFlavor> { AppFlavor.LastenradBayern }
}
};

View file

@ -645,6 +645,29 @@ namespace TINK.MultilingualResources {
}
}
/// <summary>
/// Looks up a localized string similar to Minor improvements:
///- Map is centered on Bavaria.
///- Settings are available even if no user is logged in.
///- Order of tabs on instructions page were switched..
/// </summary>
public static string ChangeLog_3_0_345_LB {
get {
return ResourceManager.GetString("ChangeLog_3_0_345_LB", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Minor improvements:
///- Settings are available even if no user is logged in.
///- Order of tabs on instructions page were switched..
/// </summary>
public static string ChangeLog_3_0_345_SB_MK {
get {
return ResourceManager.GetString("ChangeLog_3_0_345_SB_MK", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to We have fixed some bugs. Enjoy the ride!.
/// </summary>

View file

@ -1052,4 +1052,15 @@ Sie können nun auf einen Blick sehen, welche App-Version Sie installiert haben:
<data name="ChangeLog_3_0_343_LB_MK" xml:space="preserve">
<value>Es wurden ein paar Kleinigkeiten im Design verändert und einige Fehler behoben. Genießen Sie die Fahrt!</value>
</data>
<data name="ChangeLog_3_0_345_LB" xml:space="preserve">
<value>Kleinere Verbesserungen:
- Karte is auf Bayern zentriert.
- Einstellungen sind auch ohne Anmeldung verfügbar.
- Die Reihenfolge der Karteikarten auf der Seite Bedienung wurde getauscht.</value>
</data>
<data name="ChangeLog_3_0_345_SB_MK" xml:space="preserve">
<value>Kleinere Verbesserungen:
- Einstellungen sind auch ohne Anmeldung verfügbar.
- Die Reihenfolge der Karteikarten auf der Seite Bedienung wurde getauscht.</value>
</data>
</root>

View file

@ -1144,4 +1144,15 @@ You can now see at a glance which app version you have installed: in the menu at
<data name="ChangeLog_3_0_343_LB_MK" xml:space="preserve">
<value>A few small things have been changed in the design and some bugs were fixed. Enjoy the ride!</value>
</data>
<data name="ChangeLog_3_0_345_LB" xml:space="preserve">
<value>Minor improvements:
- Map is centered on Bavaria.
- Settings are available even if no user is logged in.
- Order of tabs on instructions page were switched.</value>
</data>
<data name="ChangeLog_3_0_345_SB_MK" xml:space="preserve">
<value>Minor improvements:
- Settings are available even if no user is logged in.
- Order of tabs on instructions page were switched.</value>
</data>
</root>

View file

@ -1428,6 +1428,24 @@ Sie können nun auf einen Blick sehen, welche App-Version Sie installiert haben:
<source>A few small things have been changed in the design and some bugs were fixed. Enjoy the ride!</source>
<target state="translated">Es wurden ein paar Kleinigkeiten im Design verändert und einige Fehler behoben. Genießen Sie die Fahrt!</target>
</trans-unit>
<trans-unit id="ChangeLog_3_0_345_LB" translate="yes" xml:space="preserve">
<source>Minor improvements:
- Map is centered on Bavaria.
- Settings are available even if no user is logged in.
- Order of tabs on instructions page were switched.</source>
<target state="translated">Kleinere Verbesserungen:
- Karte is auf Bayern zentriert.
- Einstellungen sind auch ohne Anmeldung verfügbar.
- Die Reihenfolge der Karteikarten auf der Seite Bedienung wurde getauscht.</target>
</trans-unit>
<trans-unit id="ChangeLog_3_0_345_SB_MK" translate="yes" xml:space="preserve">
<source>Minor improvements:
- Settings are available even if no user is logged in.
- Order of tabs on instructions page were switched.</source>
<target state="translated">Kleinere Verbesserungen:
- Einstellungen sind auch ohne Anmeldung verfügbar.
- Die Reihenfolge der Karteikarten auf der Seite Bedienung wurde getauscht.</target>
</trans-unit>
</group>
</body>
</file>

View file

@ -211,7 +211,7 @@ namespace TINK.ViewModel.Map
continue;
}
var l_oPin = new Pin
var pin = new Pin
{
Position = new Xamarin.Forms.GoogleMaps.Position(station.Position.Latitude, station.Position.Longitude),
@ -223,7 +223,7 @@ namespace TINK.ViewModel.Map
IsVisible = false, // Set to false to prevent showing default icons (flickering).
};
Pins.Add(l_oPin);
Pins.Add(pin);
}
}
@ -244,14 +244,14 @@ namespace TINK.ViewModel.Map
var colorPartPrefix = GetRessourceNameColorPart(stationsColorList[pinIndex]);
var l_iName = $"{indexPartPrefix.ToString().PadLeft(2, '0')}_{colorPartPrefix}{(DeviceInfo.Platform == DevicePlatform.Android ? ".png" : string.Empty)}";
var name = $"{indexPartPrefix.ToString().PadLeft(2, '0')}_{colorPartPrefix}{(DeviceInfo.Platform == DevicePlatform.Android ? ".png" : string.Empty)}";
try
{
Pins[pinIndex].Icon = BitmapDescriptorFactory.FromBundle(l_iName);
Pins[pinIndex].Icon = BitmapDescriptorFactory.FromBundle(name);
}
catch (Exception l_oException)
catch (Exception excption)
{
Log.ForContext<MapPageViewModel>().Error("Station icon {l_strName} can not be loaded. {@l_oException}.", l_oException);
Log.ForContext<MapPageViewModel>().Error("Station icon {name} can not be loaded. {@excption}.", name, excption);
Pins[pinIndex].Label = stationId.ToString();
Pins[pinIndex].Icon = BitmapDescriptorFactory.DefaultMarker(stationsColorList[pinIndex]);
}