sharee.bike-App/Meinkonrad/TINK/View/FeedbackPopup.xaml
2023-08-31 12:20:06 +02:00

158 lines
4.5 KiB
XML

<?xml version="1.0" encoding="utf-8" ?>
<xct:Popup xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:xct="http://xamarin.com/schemas/2020/toolkit"
xmlns:local="clr-namespace:TINK.View"
x:TypeArguments="local:FeedbackPopup+Result"
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
IsLightDismissEnabled="false"
x:Class="TINK.View.FeedbackPopup">
<xct:Popup.Resources>
<x:String x:Key="check_circle">&#xf058;</x:String>
<x:String x:Key="WriteFeedback">&#xf044;</x:String>
</xct:Popup.Resources>
<ScrollView
Orientation="Vertical"
HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand">
<StackLayout
HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand"
Padding="0,0,0,400">
<!-- Head -->
<Grid
Padding="0,30,0,10"
ColumnDefinitions="10,Auto,1*,10"
ColumnSpacing="10"
HorizontalOptions="CenterAndExpand">
<!--icon-->
<Image
Grid.Column="1"
HorizontalOptions="End">
<Image.Source>
<FontImageSource
Glyph="{StaticResource WriteFeedback}"
FontFamily="FA-S"
Size="40"
Color="Black"/>
</Image.Source>
</Image>
<!--text-->
<Label
Grid.Column="2"
TextType="Html"
Text="{x:Static resources:AppResources.ActionGiveFeedback}"
FontSize="Large"
HorizontalOptions="StartAndExpand"
VerticalOptions="Center"
TextColor="Black"
Padding="0">
</Label>
</Grid>
<BoxView
Margin="20,0,20,10"
HeightRequest="1"
WidthRequest="400"
HorizontalOptions="Center"
Color="{DynamicResource primary-back-title-color}"/>
<!-- Content -->
<StackLayout
Margin="10"
Spacing="10">
<!-- Battery level -->
<sharedGui:BarLevelInputView
x:Name="BarLevelInputView"
HorizontalOptions="Center"/>
<!-- Is bike okay? -->
<Grid
ColumnDefinitions="*,Auto,*"
RowDefinitions="Auto,Auto"
Margin="0,20,0,0">
<Grid
Grid.Column="1"
ColumnDefinitions="1*,Auto,Auto">
<Label
Grid.Column="0"
FontAttributes="Bold"
HorizontalTextAlignment="End"
Text= "{x:Static resources:AppResources.MarkingReturnBikeBikeIsStateOkQuestion}">
</Label>
<Switch
Grid.Column="1"
VerticalOptions="Center"
HorizontalOptions="End"
x:Name="bikeIsOkSwitch"
IsToggled="True"/>
<Label
Grid.Column="2"
FontSize="Small"
VerticalOptions="Center"
HorizontalOptions="Start">
<Label.Triggers>
<DataTrigger TargetType="Label" Binding="{Binding Source={x:Reference bikeIsOkSwitch}, Path=IsToggled}" Value="False">
<Setter Property="Text" Value="{x:Static resources:AppResources.MessageAnswerNo}"/>
</DataTrigger>
<DataTrigger TargetType="Label" Binding="{Binding Source={x:Reference bikeIsOkSwitch}, Path=IsToggled}" Value="True">
<Setter Property="Text" Value="{x:Static resources:AppResources.MessageAnswerYes}"/>
</DataTrigger>
</Label.Triggers>
</Label>
</Grid>
<!-- Text input bike is not OK -->
<StackLayout Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="3"
Padding="1"
BackgroundColor="{DynamicResource primary-back-title-color}">
<StackLayout.Triggers>
<DataTrigger TargetType="StackLayout"
Binding="{Binding Source={x:Reference bikeIsOkSwitch}, Path=IsToggled}"
Value="False">
<Setter Property="IsVisible" Value="True"/>
<Setter Property="HeightRequest" Value="100"/>
</DataTrigger>
<DataTrigger TargetType="StackLayout"
Binding="{Binding Source={x:Reference bikeIsOkSwitch}, Path=IsToggled}"
Value="True">
<Setter Property="IsVisible" Value="False"/>
<Setter Property="HeightRequest" Value="0"/>
</DataTrigger>
</StackLayout.Triggers>
<Editor
x:Name="feedbackMessage"
HeightRequest="100"
Placeholder="{x:Static resources:AppResources.MarkingReturnBikeErrorDescriptionInputPlaceholder}"
Text=""
BackgroundColor="White">
</Editor>
</StackLayout>
</Grid>
<!-- Buttons -->
<Button
WidthRequest="100"
Clicked="OnOkClicked"
Text="{x:Static resources:AppResources.MessageAnswerOk}"/>
</StackLayout>
</StackLayout>
</ScrollView>
</xct:Popup>