diff --git a/AMC.Model/Models/Library.cs b/AMC.Model/Models/Library.cs new file mode 100644 index 0000000..21f35a6 --- /dev/null +++ b/AMC.Model/Models/Library.cs @@ -0,0 +1,8 @@ + +namespace AMC.Model.Models +{ + public class Library + { + public List Albums { get; set; } + } +} diff --git a/AMC.View/AMC.View.csproj b/AMC.View/AMC.View.csproj index c9ad4b9..8eb9a2b 100644 --- a/AMC.View/AMC.View.csproj +++ b/AMC.View/AMC.View.csproj @@ -49,7 +49,14 @@ - + + + + + + + + @@ -82,6 +89,16 @@ MSBuild:Compile + + MSBuild:Compile + + + MSBuild:Compile + + + + + diff --git a/AMC.View/Controls/LibraryCategoryItem.xaml b/AMC.View/Controls/LibraryCategoryItem.xaml new file mode 100644 index 0000000..daffc6d --- /dev/null +++ b/AMC.View/Controls/LibraryCategoryItem.xaml @@ -0,0 +1,25 @@ + + + + + + + + diff --git a/AMC.View/Controls/LibraryCategoryItem.xaml.cs b/AMC.View/Controls/LibraryCategoryItem.xaml.cs new file mode 100644 index 0000000..16817a7 --- /dev/null +++ b/AMC.View/Controls/LibraryCategoryItem.xaml.cs @@ -0,0 +1,50 @@ + +namespace AMC.View.Controls +{ + public partial class LibraryCategoryItem : ContentView + { + public static readonly BindableProperty CategoryTextProperty = BindableProperty.Create( + propertyName: nameof(CategoryText), + returnType: typeof(string), + declaringType: typeof(LibraryCategoryItem), + defaultValue: "", + propertyChanged: CategoryTextChanged); + + public static readonly BindableProperty IconSourceProperty = BindableProperty.Create( + propertyName: nameof(IconSource), + returnType: typeof(ImageSource), + declaringType: typeof(LibraryCategoryItem), + defaultValue: null, + propertyChanged: IconSourceChanged); + + public LibraryCategoryItem() + { + InitializeComponent(); + } + + public string CategoryText + { + get => (string)GetValue(CategoryTextProperty); + set => SetValue(CategoryTextProperty, value); + } + + public ImageSource IconSource + { + get => (ImageSource)GetValue(IconSourceProperty); + set => SetValue(IconSourceProperty, value); + } + + private static void CategoryTextChanged(BindableObject bindable, object oldValue, object newValue) + { + var control = (LibraryCategoryItem)bindable; + control.CategoryLabel.Text = (string)newValue; + } + + private static void IconSourceChanged(BindableObject bindable, object oldValue, object newValue) + { + var control = (LibraryCategoryItem)bindable; + control.IconImage.Source = (ImageSource)newValue; + } + } + +} diff --git a/AMC.View/MainPage.xaml.cs b/AMC.View/MainPage.xaml.cs index 56dc36f..0365b29 100644 --- a/AMC.View/MainPage.xaml.cs +++ b/AMC.View/MainPage.xaml.cs @@ -13,7 +13,7 @@ public partial class MainPage : ContentPage // TODO use commands (or navigation methods?) in VMApp instead private void OnRdmBtnClicked(object sender, EventArgs e) { - Navigation.PushAsync(new AlbumPage(new AlbumViewModel(null))); + Navigation.PushAsync(new LibraryPage(new LibraryViewModel(null))); } } diff --git a/AMC.View/Resources/Images/icon_albums.png b/AMC.View/Resources/Images/icon_albums.png new file mode 100644 index 0000000..a76397e Binary files /dev/null and b/AMC.View/Resources/Images/icon_albums.png differ diff --git a/AMC.View/Resources/Images/icon_artists.png b/AMC.View/Resources/Images/icon_artists.png new file mode 100644 index 0000000..bf5d94d Binary files /dev/null and b/AMC.View/Resources/Images/icon_artists.png differ diff --git a/AMC.View/Resources/Images/icon_chevron_right.png b/AMC.View/Resources/Images/icon_chevron_right.png new file mode 100644 index 0000000..e566f5e Binary files /dev/null and b/AMC.View/Resources/Images/icon_chevron_right.png differ diff --git a/AMC.View/Resources/Images/icon_genres.png b/AMC.View/Resources/Images/icon_genres.png new file mode 100644 index 0000000..8af43ef Binary files /dev/null and b/AMC.View/Resources/Images/icon_genres.png differ diff --git a/AMC.View/Resources/Images/icon_playlists.png b/AMC.View/Resources/Images/icon_playlists.png new file mode 100644 index 0000000..4a47652 Binary files /dev/null and b/AMC.View/Resources/Images/icon_playlists.png differ diff --git a/AMC.View/Resources/Images/icon_songs.png b/AMC.View/Resources/Images/icon_songs.png new file mode 100644 index 0000000..c58a9df Binary files /dev/null and b/AMC.View/Resources/Images/icon_songs.png differ diff --git a/AMC.View/Resources/Images/macroblank.svg b/AMC.View/Resources/Images/macroblank.svg deleted file mode 100644 index 2a83810..0000000 --- a/AMC.View/Resources/Images/macroblank.svg +++ /dev/null @@ -1,1788 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/AMC.View/Resources/Images/macroblank_1.png b/AMC.View/Resources/Images/macroblank_1.png new file mode 100644 index 0000000..2828b9d Binary files /dev/null and b/AMC.View/Resources/Images/macroblank_1.png differ diff --git a/AMC.View/Resources/Images/macroblank_2.png b/AMC.View/Resources/Images/macroblank_2.png new file mode 100644 index 0000000..6d5cb93 Binary files /dev/null and b/AMC.View/Resources/Images/macroblank_2.png differ diff --git a/AMC.View/Resources/Images/macroblank_3.png b/AMC.View/Resources/Images/macroblank_3.png new file mode 100644 index 0000000..3cb3686 Binary files /dev/null and b/AMC.View/Resources/Images/macroblank_3.png differ diff --git a/AMC.View/Resources/Strings/Strings.Designer.cs b/AMC.View/Resources/Strings/Strings.Designer.cs index e0343fe..270fee9 100644 --- a/AMC.View/Resources/Strings/Strings.Designer.cs +++ b/AMC.View/Resources/Strings/Strings.Designer.cs @@ -60,6 +60,33 @@ namespace AMC.View.Resources.Strings { } } + /// + /// Looks up a localized string similar to Albums. + /// + public static string AlbumsCategory { + get { + return ResourceManager.GetString("AlbumsCategory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Artists. + /// + public static string ArtistsCategory { + get { + return ResourceManager.GetString("ArtistsCategory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Genres. + /// + public static string GenresCategory { + get { + return ResourceManager.GetString("GenresCategory", resourceCulture); + } + } + /// /// Looks up a localized string similar to Library. /// @@ -96,6 +123,24 @@ namespace AMC.View.Resources.Strings { } } + /// + /// Looks up a localized string similar to Playlists. + /// + public static string PlaylistsCategory { + get { + return ResourceManager.GetString("PlaylistsCategory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Recently Added. + /// + public static string RecentlyAddedHeader { + get { + return ResourceManager.GetString("RecentlyAddedHeader", resourceCulture); + } + } + /// /// Looks up a localized string similar to Shuffle. /// @@ -105,6 +150,15 @@ namespace AMC.View.Resources.Strings { } } + /// + /// Looks up a localized string similar to Songs. + /// + public static string SongsCategory { + get { + return ResourceManager.GetString("SongsCategory", resourceCulture); + } + } + /// /// Looks up a localized string similar to songs. /// diff --git a/AMC.View/Resources/Strings/Strings.fr.resx b/AMC.View/Resources/Strings/Strings.fr.resx index 22819ed..ba3443e 100644 --- a/AMC.View/Resources/Strings/Strings.fr.resx +++ b/AMC.View/Resources/Strings/Strings.fr.resx @@ -138,4 +138,22 @@ minute + + Ajouts récents + + + Playlists + + + Artistes + + + Albums + + + Morceaux + + + Genres + \ No newline at end of file diff --git a/AMC.View/Resources/Strings/Strings.resx b/AMC.View/Resources/Strings/Strings.resx index 7400d27..3b063b4 100644 --- a/AMC.View/Resources/Strings/Strings.resx +++ b/AMC.View/Resources/Strings/Strings.resx @@ -138,4 +138,22 @@ minute + + Recently Added + + + Playlists + + + Artists + + + Albums + + + Songs + + + Genres + \ No newline at end of file diff --git a/AMC.View/Resources/Styles/Styles.xaml b/AMC.View/Resources/Styles/Styles.xaml index f82e852..a0904b6 100644 --- a/AMC.View/Resources/Styles/Styles.xaml +++ b/AMC.View/Resources/Styles/Styles.xaml @@ -4,6 +4,13 @@ xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"> + +