sharee.bike-App/LastenradBayern/ShareeBike/View/Contact/ContactPage.xaml
2024-04-09 12:53:23 +02:00

243 lines
6.9 KiB
XML

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:resources="clr-namespace:ShareeBike.MultilingualResources;assembly=SharedBusinessLogic"
x:Class="ShareeBike.View.Contact.ContactPage"
xmlns:conv="clr-namespace:ShareeBike.View;assembly=SharedBusinessLogic"
BackgroundColor="{DynamicResource background-color}">
<Shell.TitleView>
<Grid ColumnDefinitions="Auto, 1*">
<Label Style="{StaticResource Label-Navbar}"
Text="{x:Static resources:AppResources.MarkingContact}"/>
</Grid>
</Shell.TitleView>
<ContentPage.Resources>
<conv:StringNotNullOrEmptyToVisibleConverter x:Key="StringNotNullOrEmpty_Converter"/>
<conv:BoolInverterConverter x:Key="BoolInvert_Converter"/>
</ContentPage.Resources>
<ContentPage.Content>
<!--View-->
<Grid
x:Name="ContactPageView"
RowSpacing="0"
RowDefinitions="Auto, Auto,1*,Auto">
<!--FAQ-->
<StackLayout Grid.Row="0"
BackgroundColor="{x:DynamicResource attention-color}"
Padding="5,2,5,2"
Spacing="0"
Margin="0">
<StackLayout.GestureRecognizers>
<TapGestureRecognizer Command="{Binding OnFAQClickedRequest}"/>
</StackLayout.GestureRecognizers>
<Label
TextColor="White"
Padding="5"
HorizontalTextAlignment="Center"
HorizontalOptions="CenterAndExpand"
TextType="Html"
Text="{x:Static resources:AppResources.MarkingContactFAQ}">
</Label>
</StackLayout>
<!-- Station -->
<Frame Grid.Row="1"
Padding="10,0,10,0"
HorizontalOptions="FillAndExpand"
VerticalOptions="Start"
BackgroundColor="White"
HasShadow="False">
<StackLayout
Spacing="0">
<StackLayout
Padding="10"
Spacing="5">
<!--No station selected-->
<StackLayout IsVisible="{Binding Path=IsOperatorInfoAvaliable, Converter={StaticResource BoolInvert_Converter}}">
<Label
TextType="Html"
Text="{x:Static resources:AppResources.MarkingContactNoStationInfoAvailableNoButton}"/>
<Button
Text="{x:Static resources:AppResources.ActionSelectStation}"
Command="{Binding OnSelectStationRequest}"/>
</StackLayout>
<!--contact customer support of selected station-->
<Grid IsVisible="{Binding IsOperatorInfoAvaliable}"
ColumnDefinitions="1*, Auto" RowDefinitions="Auto,Auto">
<!-- info about selected station -->
<StackLayout Grid.Row="0" Grid.Column="0"
Spacing="0">
<StackLayout
Orientation="Horizontal"
Spacing="0">
<Button
Style="{x:StaticResource NoOutlineButtonBackgroundColor}"
Command="{Binding ShowSelectStationInfoText}"
WidthRequest="24"
HeightRequest="24"
BackgroundColor="Transparent"
BorderWidth="0"
Padding="0"
Margin="5,0,5,0">
<Button.ImageSource>
<FontImageSource
Glyph="{StaticResource InfoCircle}"
Color="DimGray"
FontFamily="FA-S"
Size="20"/>
</Button.ImageSource>
</Button>
<Label
FontAttributes="Bold"
FontSize="Large"
Text="{x:Static resources:AppResources.MarkingLastSelectedStation}"/>
<Label
FontSize="Large"
Text=": "/>
<Label
FontSize="Large"
Text="{Binding SelectedStationId}"/>
</StackLayout>
<Label
FontSize="Medium"
Text="{Binding SelectedStationName}"/>
</StackLayout>
<Button Grid.Row="0" Grid.Column="1"
WidthRequest="100"
Text="{x:Static resources:AppResources.ActionSelectAnotherStation}"
Command="{Binding OnSelectStationRequest}"/>
</Grid>
</StackLayout>
<!--Line-->
<BoxView
HeightRequest="1"
WidthRequest="400"
HorizontalOptions="Center"
Color="{DynamicResource primary-back-title-color}"/>
</StackLayout>
</Frame>
<!-- Customer Support -->
<Frame Grid.Row="2"
Padding="10"
Margin="0,10,0,0"
HorizontalOptions="FillAndExpand"
VerticalOptions="Start"
BackgroundColor="White"
HasShadow="False"
IsVisible="{Binding IsOperatorInfoAvaliable}">
<StackLayout
Padding="10"
Spacing="5">
<!--Title Customer Support-->
<Label
Text="{x:Static resources:AppResources.MarkingContactCustomerSupportTitle}"
FontAttributes="Bold"
FontSize="Large"/>
<!--- Operator -->
<StackLayout
Orientation="Horizontal"
Spacing="0">
<Label
Text="{x:Static resources:AppResources.MarkingOperator}"/>
<Label
Text=": "/>
<Label
Text="{Binding ProviderNameText}"/>
</StackLayout>
<!--- Phone to operator -->
<Button
x:Name="PhoneNumberButton"
IsVisible="{Binding PhoneNumberText, Converter={StaticResource StringNotNullOrEmpty_Converter}}"
Text="{x:Static resources:AppResources.MarkingDoCall}"
Command="{Binding OnPhoneRequest}">
<Button.Triggers>
<DataTrigger TargetType="Button" Binding="{Binding IsDoPhoncallAvailable}" Value="False">
<Setter Property="BorderColor" Value="DimGray" />
<Setter Property="BackgroundColor" Value="DimGray" />
<Setter Property="TextColor" Value="LightGray" />
</DataTrigger>
</Button.Triggers>
</Button>
<!--- Mail to operator -->
<Button
Style="{StaticResource SecondaryButton}"
x:Name="MailAddressButton"
IsVisible="{Binding MailAddressText, Converter={StaticResource StringNotNullOrEmpty_Converter}}"
Text="{x:Static resources:AppResources.MarkingSendMail}"
Command="{Binding OnMailToOperatorRequest}">
<Button.Triggers>
<DataTrigger TargetType="Button" Binding="{Binding IsSendMailAvailable}" Value="False">
<Setter Property="BorderColor" Value="DimGray" />
<Setter Property="BackgroundColor" Value="LightGray" />
<Setter Property="TextColor" Value="DimGray" />
</DataTrigger>
</Button.Triggers>
</Button>
</StackLayout>
</Frame>
<!--- Contact app-developer -->
<StackLayout Grid.Row="3"
Padding="10"
Margin="0,0,0,10"
VerticalOptions="End"
Spacing="0">
<BoxView
Margin="0,0,0,10"
HeightRequest="1"
WidthRequest="400"
HorizontalOptions="Center"
Color="DimGray"/>
<Button
x:Name="DiagnosticsButton"
Style="{StaticResource NoOutlineButtonBackgroundColor}"
Text="{x:Static resources:AppResources.ActionSendDiagnosis}"
Command="{Binding OnMailAppRelatedRequest}">
<Button.Triggers>
<DataTrigger TargetType="Button" Binding="{Binding IsSendMailAvailable}" Value="False">
<Setter Property="TextColor" Value="DimGray" />
</DataTrigger>
</Button.Triggers>
</Button>
</StackLayout>
</Grid>
</ContentPage.Content>
</ContentPage>