Merge branch 'master' of https://codefirst.iut.uca.fr/git/jade.van_brabandt/Projet_IHM
continuous-integration/drone/push Build is passing Details

master
Anthony RICHARD 2 years ago
commit 5bd0f12a15

@ -27,7 +27,7 @@
<RowDefinition Height="auto"/> <RowDefinition Height="auto"/>
<RowDefinition Height="auto"/> <RowDefinition Height="auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Image Source="no_cover.png" HeightRequest="490" Margin="0,10,0,0"/> <Image Source="logo_stim.png" HeightRequest="490" Margin="0,10,0,0"/>
<Grid Grid.Row="1"> <Grid Grid.Row="1">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="auto"/> <RowDefinition Height="auto"/>

@ -10,7 +10,7 @@
<VerticalStackLayout Style="{StaticResource pageBorder}" Grid.Column="0" Grid.Row="1"/> <VerticalStackLayout Style="{StaticResource pageBorder}" Grid.Column="0" Grid.Row="1"/>
<VerticalStackLayout Style="{StaticResource pageBorder}" Grid.Column="2" Grid.Row="1"/> <VerticalStackLayout Style="{StaticResource pageBorder}" Grid.Column="2" Grid.Row="1"/>
<Grid Grid.Column="1" RowDefinitions="500, auto, auto"> <Grid Grid.Column="1" RowDefinitions="500, auto, auto">
<Image Source="no_cover.png" HeightRequest="490" Margin="0,10,0,0"/> <Image Source="logo_stim.png" HeightRequest="490" Margin="0,10,0,0"/>
<Grid Grid.Row="1" RowDefinitions="auto, auto, auto"> <Grid Grid.Row="1" RowDefinitions="auto, auto, auto">
<Entry Placeholder="Username" PlaceholderColor="{StaticResource Primary}" <Entry Placeholder="Username" PlaceholderColor="{StaticResource Primary}"
IsPassword="False" IsPassword="False"

@ -23,7 +23,28 @@ public partial class ProfilPage : ContentPage
{ {
var newName = await this.ShowPopupAsync(new EntryPopup("Username")); var newName = await this.ShowPopupAsync(new EntryPopup("Username"));
if (string.IsNullOrWhiteSpace(newName as string)) await this.ShowPopupAsync(new MessagePopup("Nom d'utilisateur invalide")); if (string.IsNullOrWhiteSpace(newName as string)) await this.ShowPopupAsync(new MessagePopup("Nom d'utilisateur invalide"));
else ((App)App.Current).Manager.CurrentUser.Username = (newName as string); else
{
if (((App)App.Current).Manager.SearchUser(newName as string) is User)
{
await this.ShowPopupAsync(new MessagePopup("Nom d'utilisateur déjà utilisé"));
}
else
{
string oldName = ((App)App.Current).Manager.CurrentUser.Username;
((App)App.Current).Manager.CurrentUser.Username = (newName as string);
foreach (Game g in ((App)App.Current).Manager.GameList)
{
foreach(Review r in g.Reviews)
{
if (r.AuthorName==oldName as string)
{
r.AuthorName= newName as string;
}
}
}
}
}
} }
public async void PopUpBio(object sender, EventArgs e) public async void PopUpBio(object sender, EventArgs e)
{ {

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

@ -50,6 +50,10 @@
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" /> <MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Remove="Resources\Images\logo_stim.png" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="CommunityToolkit.Maui" Version="5.2.0" /> <PackageReference Include="CommunityToolkit.Maui" Version="5.2.0" />
<PackageReference Include="MailKit" Version="4.0.0" /> <PackageReference Include="MailKit" Version="4.0.0" />

Loading…
Cancel
Save