149 lines
6.5 KiB
XML
149 lines
6.5 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||
xmlns:viewModels="clr-namespace:CORP_MAUI.ViewModels"
|
||
xmlns:models="clr-namespace:CORP_MAUI.Models"
|
||
x:Class="CORP_MAUI.Pages.ProfilePage"
|
||
x:DataType="viewModels:ProfileViewModel"
|
||
Title="Профиль">
|
||
|
||
<ScrollView>
|
||
<VerticalStackLayout Padding="20" Spacing="20">
|
||
|
||
<ActivityIndicator IsRunning="{Binding IsLoading}"
|
||
IsVisible="{Binding IsLoading}"
|
||
Color="{StaticResource Primary}"
|
||
HorizontalOptions="Center" />
|
||
|
||
<!-- Аватар и имя -->
|
||
<Frame
|
||
Padding="20"
|
||
CornerRadius="15"
|
||
BackgroundColor="White"
|
||
HasShadow="True">
|
||
|
||
<VerticalStackLayout Spacing="15">
|
||
<Frame
|
||
WidthRequest="100"
|
||
HeightRequest="100"
|
||
CornerRadius="25"
|
||
Padding="0"
|
||
IsClippedToBounds="True"
|
||
HasShadow="False"
|
||
BackgroundColor="{StaticResource Gray200}"
|
||
HorizontalOptions="Center">
|
||
<Image
|
||
Source="{Binding DisplayImageSource}"
|
||
Aspect="AspectFill"/>
|
||
</Frame>
|
||
|
||
<Label
|
||
Text="{Binding FullName}"
|
||
FontSize="24"
|
||
FontAttributes="Bold"
|
||
HorizontalOptions="Center"
|
||
TextColor="{StaticResource Gray900}"/>
|
||
|
||
<Label
|
||
Text="{Binding Username}"
|
||
FontSize="16"
|
||
HorizontalOptions="Center"
|
||
TextColor="{StaticResource Gray600}"/>
|
||
</VerticalStackLayout>
|
||
</Frame>
|
||
|
||
<!-- Информация о пользователе -->
|
||
<Frame
|
||
Padding="20"
|
||
CornerRadius="15"
|
||
BackgroundColor="White"
|
||
HasShadow="True">
|
||
|
||
<VerticalStackLayout Spacing="15">
|
||
<Label
|
||
Text="Информация"
|
||
FontSize="18"
|
||
FontAttributes="Bold"
|
||
TextColor="{StaticResource Gray900}"/>
|
||
|
||
<Grid ColumnDefinitions="Auto,*" RowDefinitions="Auto,Auto,Auto,Auto" RowSpacing="10">
|
||
<Label Grid.Row="0" Grid.Column="0" Text="Email:" FontAttributes="Bold" TextColor="{StaticResource Gray700}"/>
|
||
<Label Grid.Row="0" Grid.Column="1" Text="{Binding Email}" TextColor="{StaticResource Gray600}" Margin="10,0,0,0"/>
|
||
|
||
<Label Grid.Row="1" Grid.Column="0" Text="Должность:" FontAttributes="Bold" TextColor="{StaticResource Gray700}"/>
|
||
<Label Grid.Row="1" Grid.Column="1" Text="{Binding Position}" TextColor="{StaticResource Gray600}" Margin="10,0,0,0"/>
|
||
|
||
<Label Grid.Row="2" Grid.Column="0" Text="Отдел:" FontAttributes="Bold" TextColor="{StaticResource Gray700}"/>
|
||
<Label Grid.Row="2" Grid.Column="1" Text="{Binding Department}" TextColor="{StaticResource Gray600}" Margin="10,0,0,0"/>
|
||
|
||
<Label Grid.Row="3" Grid.Column="0" Text="Статус:" FontAttributes="Bold" TextColor="{StaticResource Gray700}"/>
|
||
<Label Grid.Row="3" Grid.Column="1" Text="{Binding StatusText}" TextColor="{Binding StatusColor}" Margin="10,0,0,0"/>
|
||
</Grid>
|
||
</VerticalStackLayout>
|
||
</Frame>
|
||
|
||
<!-- Навыки -->
|
||
<Frame
|
||
Padding="20"
|
||
CornerRadius="15"
|
||
BackgroundColor="White"
|
||
HasShadow="True"
|
||
IsVisible="{Binding HasSkills}">
|
||
|
||
<VerticalStackLayout Spacing="10">
|
||
<Label
|
||
Text="Навыки"
|
||
FontSize="18"
|
||
FontAttributes="Bold"
|
||
TextColor="{StaticResource Gray900}"/>
|
||
|
||
<FlexLayout BindableLayout.ItemsSource="{Binding Skills}" Wrap="Wrap" AlignItems="Center" AlignContent="Start">
|
||
<BindableLayout.ItemTemplate>
|
||
<DataTemplate x:DataType="models:Skill">
|
||
<Frame Padding="10,5" CornerRadius="10" BackgroundColor="{StaticResource Gray100}" HasShadow="False" Margin="0,0,5,5">
|
||
<Label Text="{Binding Name}" TextColor="{StaticResource Gray800}" FontSize="14"/>
|
||
</Frame>
|
||
</DataTemplate>
|
||
</BindableLayout.ItemTemplate>
|
||
</FlexLayout>
|
||
</VerticalStackLayout>
|
||
</Frame>
|
||
|
||
<!-- Действия -->
|
||
<Frame
|
||
Padding="20"
|
||
CornerRadius="15"
|
||
BackgroundColor="White"
|
||
HasShadow="True">
|
||
|
||
<VerticalStackLayout Spacing="10">
|
||
<Label
|
||
Text="Настройки"
|
||
FontSize="18"
|
||
FontAttributes="Bold"
|
||
TextColor="{StaticResource Gray900}"
|
||
Margin="0,0,0,10"/>
|
||
|
||
<Button
|
||
Text="Обновить профиль"
|
||
BackgroundColor="{StaticResource Primary}"
|
||
TextColor="White"
|
||
CornerRadius="10"
|
||
HeightRequest="45"
|
||
Command="{Binding LoadProfileCommand}"/>
|
||
|
||
<Button
|
||
Text="Выйти"
|
||
BackgroundColor="{StaticResource Error}"
|
||
TextColor="White"
|
||
CornerRadius="10"
|
||
HeightRequest="45"
|
||
Command="{Binding LogoutCommand}"/>
|
||
</VerticalStackLayout>
|
||
</Frame>
|
||
|
||
</VerticalStackLayout>
|
||
</ScrollView>
|
||
</ContentPage>
|
||
|