mirror of
https://gitlab.com/fabinfra/fabaccess/borepin.git
synced 2025-03-12 23:01:52 +01:00
51 lines
3.3 KiB
XML
51 lines
3.3 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"
|
|
x:Class="Borepin.Page.UserPage"
|
|
xmlns:converters="clr-namespace:Borepin.Converter"
|
|
xmlns:views="clr-namespace:Borepin.View"
|
|
xmlns:resource_text="clr-namespace:Borepin.Resources.Text"
|
|
Title="{x:Static resource_text:TextResource.TITLE_User}">
|
|
<ContentPage.Resources>
|
|
<ResourceDictionary>
|
|
<converters:AllTrueBoolConverter x:Key="AllTrueBoolConverter"/>
|
|
<converters:InvertBoolConverter x:Key="InvertBoolConverter"/>
|
|
<converters:MachineStateColorConverter x:Key="MachineStateColorConverter"/>
|
|
<converters:MachineStateStringConverter x:Key="MachineStateStringConverter"/>
|
|
<converters:IsNotNullBoolConverter x:Key="IsNotNullBoolConverter"/>
|
|
</ResourceDictionary>
|
|
</ContentPage.Resources>
|
|
<ContentPage.Content>
|
|
<StackLayout Padding="20">
|
|
<views:ConnectionStateView/>
|
|
<StackLayout>
|
|
<StackLayout.IsVisible>
|
|
<MultiBinding Converter="{StaticResource AllTrueBoolConverter}">
|
|
<Binding Path="IsBusy" Converter="{StaticResource InvertBoolConverter}"/>
|
|
<Binding Path="IsConnected" />
|
|
</MultiBinding>
|
|
</StackLayout.IsVisible>
|
|
<Label Text="{Binding UserItem.Username}" Style="{StaticResource LabelStyle_Title}"/>
|
|
<ListView ItemsSource="{Binding PermissionSelectViewModel_List}" SelectionMode="None" SeparatorColor="Transparent">
|
|
<ListView.ItemTemplate>
|
|
<DataTemplate>
|
|
<ViewCell>
|
|
<views:PermissionSelectView />
|
|
</ViewCell>
|
|
</DataTemplate>
|
|
</ListView.ItemTemplate>
|
|
</ListView>
|
|
<StackLayout IsVisible="{Binding CanAdmin}">
|
|
<Label Text="{x:Static resource_text:TextResource.UserPage_ChangePassword}" Style="{StaticResource Style_Label_Property_Title}"/>
|
|
<Entry Placeholder="{x:Static resource_text:TextResource.UserPage_NewPassword}" Text="{Binding NewPassword}"/>
|
|
<Button Text="{x:Static resource_text:TextResource.UserPage_UpdatePassword}" Command="{Binding UpdatePasswordCommand}" Style="{StaticResource Style_Button_Primary}"/>
|
|
</StackLayout>
|
|
<StackLayout IsVisible="{Binding CanCreateCard}">
|
|
<Button Text="Create Card" Command="{Binding CreateCardCommand}" IsVisible="{Binding HasCardBinded, Converter={StaticResource InvertBoolConverter}}" Style="{StaticResource Style_Button_Primary}"/>
|
|
<Button Text="Unbind Card" Command="{Binding UnbindCardCommand}" IsVisible="{Binding HasCardBinded}" Style="{StaticResource Style_Button_Admin}"/>
|
|
</StackLayout>
|
|
<Button Text="{x:Static resource_text:TextResource.DELETE}" Command="{Binding DeleteCommand}" Style="{StaticResource Style_Button_Admin}"/>
|
|
</StackLayout>
|
|
</StackLayout>
|
|
</ContentPage.Content>
|
|
</ContentPage> |