Update (Front-End): manque plus que les fonts
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
e783321960
commit
a635dce3da
@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
|
||||||
|
x:Class="BookApp.Composants.CollectionFiltrage">
|
||||||
|
<CollectionView ItemsSource="{Binding MyCollections1}">
|
||||||
|
<CollectionView.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<StackLayout Padding="5">
|
||||||
|
<Grid RowDefinitions="auto" Margin="5,0,0,0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="30"/>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Image Grid.Column="0" HeightRequest="30"
|
||||||
|
WidthRequest="30" Source="Book.svg">
|
||||||
|
<Image.Behaviors>
|
||||||
|
<toolkit:IconTintColorBehavior TintColor="Red" />
|
||||||
|
</Image.Behaviors>
|
||||||
|
</Image>
|
||||||
|
<Label Grid.Column="1" Margin="10,0,0,0" VerticalTextAlignment="Center" Text="{Binding AuteurName}"/>
|
||||||
|
<Label Grid.Column="2" VerticalTextAlignment="Center" Margin="0,0,40,0" HorizontalTextAlignment="End" Text="{Binding NbLivre}"/>
|
||||||
|
<Button Grid.Column="2"
|
||||||
|
ImageSource="chevron_right.svg"
|
||||||
|
HeightRequest="35"
|
||||||
|
WidthRequest="35"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
BackgroundColor="White"
|
||||||
|
HorizontalOptions="End"/>
|
||||||
|
</Grid>
|
||||||
|
<Rectangle Margin="45,0,0,0" HeightRequest="1" BackgroundColor="LightGray" VerticalOptions="End" />
|
||||||
|
</StackLayout>
|
||||||
|
</DataTemplate>
|
||||||
|
</CollectionView.ItemTemplate>
|
||||||
|
</CollectionView>
|
||||||
|
</ContentView>
|
@ -0,0 +1,58 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
xmlns:composants="clr-namespace:BookApp.Composants"
|
||||||
|
x:Class="BookApp.Composants.GroupCollection">
|
||||||
|
<CollectionView ItemsSource="{Binding AuteurGroups}" IsGrouped="True" SelectionMode="Single" SelectionChanged="OnSelectionChanged">
|
||||||
|
<CollectionView.GroupHeaderTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Label Text="{Binding Name}"
|
||||||
|
BackgroundColor="LightGray"
|
||||||
|
Padding="5"
|
||||||
|
Margin="15,0,0,0"
|
||||||
|
TextColor="Black"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</CollectionView.GroupHeaderTemplate>
|
||||||
|
<CollectionView.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<StackLayout>
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Image Grid.Column="0"
|
||||||
|
Source="{Binding ImageBook}"
|
||||||
|
HeightRequest="125"
|
||||||
|
WidthRequest="125"
|
||||||
|
Margin="0,10,0,10"/>
|
||||||
|
<StackLayout Grid.Column="1">
|
||||||
|
<Label Text="{Binding Name}"
|
||||||
|
|
||||||
|
TextColor="Black"/>
|
||||||
|
<Label Text="{Binding Auteur.Name}"
|
||||||
|
|
||||||
|
TextColor="Black"/>
|
||||||
|
<Label
|
||||||
|
Text="{Binding Statut}"
|
||||||
|
FontAttributes="Bold"/>
|
||||||
|
|
||||||
|
<StackLayout Margin="0,10" Orientation="Horizontal" VerticalOptions="EndAndExpand">
|
||||||
|
<Image Source="empty_star.svg" WidthRequest="25" HeightRequest="25"/>
|
||||||
|
<Image Source="empty_star.svg" WidthRequest="25" HeightRequest="25"/>
|
||||||
|
<Image Source="empty_star.svg" WidthRequest="25" HeightRequest="25"/>
|
||||||
|
<Image Source="empty_star.svg" WidthRequest="25" HeightRequest="25"/>
|
||||||
|
<Image Source="empty_star.svg" WidthRequest="25" HeightRequest="25"/>
|
||||||
|
</StackLayout>
|
||||||
|
|
||||||
|
</StackLayout>
|
||||||
|
</Grid>
|
||||||
|
<Rectangle Margin="25,0,0,10" HeightRequest="1" BackgroundColor="LightGray" VerticalOptions="End" />
|
||||||
|
</StackLayout>
|
||||||
|
</DataTemplate>
|
||||||
|
</CollectionView.ItemTemplate>
|
||||||
|
</CollectionView>
|
||||||
|
</ContentView>
|
@ -0,0 +1,22 @@
|
|||||||
|
using BookApp.Model;
|
||||||
|
using BookApp.Pages;
|
||||||
|
using BookApp.ViewModel;
|
||||||
|
|
||||||
|
namespace BookApp.Composants
|
||||||
|
{
|
||||||
|
public partial class GroupCollection : ContentView
|
||||||
|
{
|
||||||
|
public GroupCollection()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void OnSelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.CurrentSelection.FirstOrDefault() is Book selectedItem)
|
||||||
|
{
|
||||||
|
await Navigation.PushAsync(new DetailBook(selectedItem));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,27 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
||||||
xmlns:usecase="clr-namespace:BookApp.UseCase"
|
|
||||||
x:Class="BookApp.Composants.RatingView">
|
|
||||||
|
|
||||||
<ContentView.Resources>
|
|
||||||
<usecase:RatingToStarImageConverter x:Key="RatingToStarConverter"/>
|
|
||||||
</ContentView.Resources>
|
|
||||||
|
|
||||||
<StackLayout Orientation="Horizontal" HorizontalOptions="CenterAndExpand">
|
|
||||||
<StackLayout x:Name="StarsLayout" BindableLayout.ItemsSource="{Binding Rating}">
|
|
||||||
<BindableLayout.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<Image WidthRequest="30" HeightRequest="30">
|
|
||||||
<Image.Source>
|
|
||||||
<MultiBinding Converter="{StaticResource RatingToStarConverter}">
|
|
||||||
<Binding Path="CurrentRating"/>
|
|
||||||
<Binding Path="."/>
|
|
||||||
</MultiBinding>
|
|
||||||
</Image.Source>
|
|
||||||
</Image>
|
|
||||||
</DataTemplate>
|
|
||||||
</BindableLayout.ItemTemplate>
|
|
||||||
</StackLayout>
|
|
||||||
</StackLayout>
|
|
||||||
</ContentView>
|
|
@ -1,26 +0,0 @@
|
|||||||
using BookApp.Model;
|
|
||||||
|
|
||||||
namespace BookApp.Composants;
|
|
||||||
|
|
||||||
public partial class RatingView : ContentView
|
|
||||||
{
|
|
||||||
public static readonly BindableProperty RatingProperty = BindableProperty.Create(
|
|
||||||
nameof(Rating),
|
|
||||||
typeof(Star),
|
|
||||||
typeof(RatingView),
|
|
||||||
default(Star),
|
|
||||||
BindingMode.TwoWay
|
|
||||||
);
|
|
||||||
|
|
||||||
public Star Rating
|
|
||||||
{
|
|
||||||
get { return (Star)GetValue(RatingProperty); }
|
|
||||||
set { SetValue(RatingProperty, value); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public RatingView()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
this.BindingContext = this;
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,100 @@
|
|||||||
|
<?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"
|
||||||
|
x:Class="BookApp.Pages.EmpruntsPrets"
|
||||||
|
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
|
||||||
|
Title="EmpruntsPrets">
|
||||||
|
<Shell.BackButtonBehavior>
|
||||||
|
<BackButtonBehavior IsVisible="False" IsEnabled="False"/>
|
||||||
|
</Shell.BackButtonBehavior>
|
||||||
|
<Shell.TitleView>
|
||||||
|
<Grid RowDefinitions="Auto" VerticalOptions="Center">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<HorizontalStackLayout Grid.Column="0">
|
||||||
|
<Image
|
||||||
|
Source="Chevron_left.svg"
|
||||||
|
HorizontalOptions="Start">
|
||||||
|
<Image.GestureRecognizers>
|
||||||
|
<TapGestureRecognizer Tapped="BackButton" NumberOfTapsRequired="1"/>
|
||||||
|
</Image.GestureRecognizers>
|
||||||
|
<Image.Behaviors>
|
||||||
|
<toolkit:IconTintColorBehavior TintColor="Red" />
|
||||||
|
</Image.Behaviors>
|
||||||
|
</Image>
|
||||||
|
|
||||||
|
<Label
|
||||||
|
Text="Mes livres"
|
||||||
|
FontFamily="Strande2"
|
||||||
|
TextColor="Red"
|
||||||
|
FontSize="Medium"
|
||||||
|
VerticalTextAlignment="Center"
|
||||||
|
HorizontalOptions="Start"
|
||||||
|
Grid.Column="0" />
|
||||||
|
</HorizontalStackLayout>
|
||||||
|
|
||||||
|
<Label
|
||||||
|
Text="Tous"
|
||||||
|
FontFamily="Strande2"
|
||||||
|
TextColor="Black"
|
||||||
|
FontSize="Medium"
|
||||||
|
VerticalTextAlignment="Center"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
Grid.Column="1" />
|
||||||
|
|
||||||
|
<HorizontalStackLayout Grid.Column="2">
|
||||||
|
<Image
|
||||||
|
Source="plus_icone.svg"
|
||||||
|
HorizontalOptions="End"
|
||||||
|
Margin="0,0,20,0"
|
||||||
|
Grid.Column="2">
|
||||||
|
<Image.Behaviors>
|
||||||
|
<toolkit:IconTintColorBehavior TintColor="Red" />
|
||||||
|
</Image.Behaviors>
|
||||||
|
</Image>
|
||||||
|
|
||||||
|
<Image
|
||||||
|
Source="arrow_up_arrow_down.svg"
|
||||||
|
HorizontalOptions="End"
|
||||||
|
Margin="0,0,10,0"
|
||||||
|
Grid.Column="2">
|
||||||
|
<Image.Behaviors>
|
||||||
|
<toolkit:IconTintColorBehavior TintColor="Red" />
|
||||||
|
</Image.Behaviors>
|
||||||
|
</Image>
|
||||||
|
</HorizontalStackLayout>
|
||||||
|
</Grid>
|
||||||
|
</Shell.TitleView>
|
||||||
|
<StackLayout>
|
||||||
|
<ContentView>
|
||||||
|
<ContentView.GestureRecognizers>
|
||||||
|
<TapGestureRecognizer Command="{Binding TapCommand}" NumberOfTapsRequired="1" />
|
||||||
|
</ContentView.GestureRecognizers>
|
||||||
|
|
||||||
|
<Grid WidthRequest="150" HeightRequest="50"
|
||||||
|
BackgroundColor="LightGray"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="Center">
|
||||||
|
|
||||||
|
<!-- Le Switch -->
|
||||||
|
<Switch x:Name="MySwitch" IsToggled="{Binding IsToggled}"
|
||||||
|
HorizontalOptions="Start"
|
||||||
|
VerticalOptions="Center"/>
|
||||||
|
|
||||||
|
<!-- Le Texte -->
|
||||||
|
<Label Text="Mon Switch"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
FontSize="16"
|
||||||
|
TextColor="Black" />
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</ContentView>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- TODO with collection group on personn -->
|
||||||
|
</StackLayout>
|
||||||
|
</ContentPage>
|
@ -0,0 +1,35 @@
|
|||||||
|
using System.Windows.Input;
|
||||||
|
|
||||||
|
namespace BookApp.Pages;
|
||||||
|
|
||||||
|
public partial class EmpruntsPrets : ContentPage
|
||||||
|
{
|
||||||
|
public ICommand TapCommand => new Command(ToggleSwitch);
|
||||||
|
|
||||||
|
private bool _isToggled;
|
||||||
|
|
||||||
|
public bool IsToggled
|
||||||
|
{
|
||||||
|
get => _isToggled;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_isToggled = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public EmpruntsPrets()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
async void BackButton(object sender, EventArgs args)
|
||||||
|
{
|
||||||
|
await Shell.Current.Navigation.PopAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ToggleSwitch()
|
||||||
|
{
|
||||||
|
IsToggled = !IsToggled;
|
||||||
|
}
|
||||||
|
}
|
@ -1,15 +1,19 @@
|
|||||||
using BookApp.ViewModel;
|
using BookApp.ViewModel;
|
||||||
|
|
||||||
namespace BookApp.Pages;
|
namespace BookApp.Pages
|
||||||
|
|
||||||
public partial class Filtrage : ContentPage
|
|
||||||
{
|
{
|
||||||
SearchBar searchBar = new SearchBar { Placeholder = "Search items..." };
|
public partial class Filtrage : ContentPage
|
||||||
public TousViewModel Data = new TousViewModel();
|
|
||||||
|
|
||||||
public Filtrage()
|
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
SearchBar searchBar = new SearchBar { Placeholder = "Search items..." };
|
||||||
BindingContext = Data;
|
|
||||||
|
public Filtrage()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
async void BackButton(object sender, EventArgs args)
|
||||||
|
{
|
||||||
|
await Shell.Current.Navigation.PopAsync();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue