sharee.bike-App/LastenradBayern/ShareeBike/View/FeedbackPopup.xaml

159 lines
4.5 KiB
Text
Raw Normal View History

2023-05-11 17:39:28 +02:00
<?xml version="1.0" encoding="utf-8" ?>
2021-05-13 20:16:41 +02:00
<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"
2024-04-09 12:53:23 +02:00
xmlns:local="clr-namespace:ShareeBike.View"
2021-05-13 20:16:41 +02:00
x:TypeArguments="local:FeedbackPopup+Result"
2024-04-09 12:53:23 +02:00
xmlns:sharedGui="clr-namespace:SharedGui.View"
xmlns:resources="clr-namespace:ShareeBike.MultilingualResources;assembly=SharedBusinessLogic"
2023-08-31 12:20:06 +02:00
IsLightDismissEnabled="false"
2024-04-09 12:53:23 +02:00
x:Class="ShareeBike.View.FeedbackPopup">
2023-08-31 12:20:06 +02:00
<xct:Popup.Resources>
<x:String x:Key="check_circle">&#xf058;</x:String>
<x:String x:Key="WriteFeedback">&#xf044;</x:String>
</xct:Popup.Resources>
2023-05-11 17:39:28 +02:00
<ScrollView
Orientation="Vertical"
HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand">
2023-08-31 12:20:06 +02:00
2023-05-11 17:39:28 +02:00
<StackLayout
HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand"
2023-08-31 12:20:06 +02:00
Padding="0,0,0,400">
2023-05-11 17:39:28 +02:00
2023-08-31 12:20:06 +02:00
<!-- Head -->
<Grid
Padding="0,30,0,10"
ColumnDefinitions="10,Auto,1*,10"
ColumnSpacing="10"
HorizontalOptions="CenterAndExpand">
<!--icon-->
<Image
Grid.Column="1"
HorizontalOptions="End">
2023-05-11 17:39:28 +02:00
<Image.Source>
2023-08-31 12:20:06 +02:00
<FontImageSource
Glyph="{StaticResource WriteFeedback}"
FontFamily="FA-S"
Size="40"
Color="Black"/>
2023-05-11 17:39:28 +02:00
</Image.Source>
</Image>
2023-08-31 12:20:06 +02:00
<!--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}"/>
2023-05-11 17:39:28 +02:00
<!-- Content -->
<StackLayout
Margin="10"
Spacing="10">
<!-- Battery level -->
<sharedGui:BarLevelInputView
2023-08-31 12:20:06 +02:00
x:Name="BarLevelInputView"
HorizontalOptions="Center"/>
2023-05-11 17:39:28 +02:00
<!-- Is bike okay? -->
<Grid
2023-08-31 12:20:06 +02:00
ColumnDefinitions="*,Auto,*"
2023-05-11 17:39:28 +02:00
RowDefinitions="Auto,Auto"
Margin="0,20,0,0">
2023-08-31 12:20:06 +02:00
<Grid
2023-05-11 17:39:28 +02:00
Grid.Column="1"
2023-08-31 12:20:06 +02:00
ColumnDefinitions="1*,Auto,Auto">
<Label
Grid.Column="0"
FontAttributes="Bold"
HorizontalTextAlignment="End"
Text= "{x:Static resources:AppResources.MarkingReturnBikeBikeIsStateOkQuestion}">
</Label>
<Switch
Grid.Column="1"
2023-05-11 17:39:28 +02:00
VerticalOptions="Center"
HorizontalOptions="End"
x:Name="bikeIsOkSwitch"
IsToggled="True"/>
2023-08-31 12:20:06 +02:00
<Label
Grid.Column="2"
FontSize="Small"
2023-05-11 17:39:28 +02:00
VerticalOptions="Center"
HorizontalOptions="Start">
2023-08-31 12:20:06 +02:00
<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>
2023-05-11 17:39:28 +02:00
<!-- Text input bike is not OK -->
2023-08-31 12:20:06 +02:00
<StackLayout Grid.Row="1"
2023-05-11 17:39:28 +02:00
Grid.Column="0"
2023-08-31 12:20:06 +02:00
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">
2023-05-11 17:39:28 +02:00
<Setter Property="IsVisible" Value="True"/>
2023-08-31 12:20:06 +02:00
<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"/>
2023-05-11 17:39:28 +02:00
</DataTrigger>
2023-08-31 12:20:06 +02:00
</StackLayout.Triggers>
<Editor
x:Name="feedbackMessage"
HeightRequest="100"
Placeholder="{x:Static resources:AppResources.MarkingReturnBikeErrorDescriptionInputPlaceholder}"
Text=""
BackgroundColor="White">
</Editor>
</StackLayout>
2023-05-11 17:39:28 +02:00
</Grid>
<!-- Buttons -->
<Button
WidthRequest="100"
Clicked="OnOkClicked"
Text="{x:Static resources:AppResources.MessageAnswerOk}"/>
</StackLayout>
</StackLayout>
</ScrollView>
</xct:Popup>