Skip to content

Commit

Permalink
Add more search filters and different info pills for details pages
Browse files Browse the repository at this point in the history
  • Loading branch information
aetherstrata committed Feb 10, 2024
1 parent c25d3e0 commit df18e18
Show file tree
Hide file tree
Showing 75 changed files with 779 additions and 335 deletions.
17 changes: 7 additions & 10 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ dotnet_naming_style.camelcase.capitalization = camel_case
dotnet_naming_style.all_lower.capitalization = all_lower
dotnet_naming_style.all_lower.word_separator = _

dotnet_naming_style.static_prefix_pascalcase.capitalization = pascal_case
dotnet_naming_style.static_prefix_pascalcase.required_prefix = s_

dotnet_naming_style.underscore_camelcase.capitalization = camel_case
dotnet_naming_style.underscore_camelcase.required_prefix = _

Expand Down Expand Up @@ -76,13 +73,13 @@ dotnet_naming_rule.private_const_all_lower.severity = warning
dotnet_naming_rule.private_const_all_lower.symbols = private_constants
dotnet_naming_rule.private_const_all_lower.style = all_lower

#s_PascalCase for private static readonly
dotnet_naming_symbols.private_static.applicable_accessibilities = private
dotnet_naming_symbols.private_static.required_modifiers = static
dotnet_naming_symbols.private_static.applicable_kinds = field
#all_lower for private static readonly
dotnet_naming_symbols.private_static_readonly.applicable_accessibilities = private
dotnet_naming_symbols.private_static_readonly.required_modifiers = static,readonly
dotnet_naming_symbols.private_static_readonly.applicable_kinds = field
dotnet_naming_rule.private_static_readonly_prefix_pascalcase.severity = warning
dotnet_naming_rule.private_static_readonly_prefix_pascalcase.symbols = private_static
dotnet_naming_rule.private_static_readonly_prefix_pascalcase.style = static_prefix_pascalcase
dotnet_naming_rule.private_static_readonly_prefix_pascalcase.symbols = private_static_readonly
dotnet_naming_rule.private_static_readonly_prefix_pascalcase.style = all_lower

#camelCase for local constants
dotnet_naming_symbols.local_constants.applicable_kinds = local
Expand All @@ -91,7 +88,7 @@ dotnet_naming_rule.local_const_camel_case.severity = warning
dotnet_naming_rule.local_const_camel_case.symbols = local_constants
dotnet_naming_rule.local_const_camel_case.style = camelcase

#ALL_UPPER for non private constants/static readonlys
#ALL_UPPER for non private constants/static readonly
dotnet_naming_style.all_upper.capitalization = all_upper
dotnet_naming_style.all_upper.word_separator = _

Expand Down
13 changes: 8 additions & 5 deletions Aosta.Ava/Aosta.Ava.Android/MainActivity.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Globalization;
using System.IO;

using Android.App;
Expand Down Expand Up @@ -28,16 +29,18 @@ public class MainActivity : AvaloniaMainActivity<App>
{
protected override AppBuilder CustomizeAppBuilder(AppBuilder builder)
{
// The default current directory on android is '/'.
// On some devices '/' maps to the app data directory. On others it maps to the root of the internal storage.
// In order to have a consistent current directory on all devices the full path of the app data directory is set as the current directory.
Environment.CurrentDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);

CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture;

return base.CustomizeAppBuilder(builder)
.UseAndroid()
.UseReactiveUI()
.LogToTrace()
.AfterSetup(_ =>
{
// The default current directory on android is '/'.
// On some devices '/' maps to the app data directory. On others it maps to the root of the internal storage.
// In order to have a consistent current directory on all devices the full path of the app data directory is set as the current directory.
Environment.CurrentDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
ILogger logger = App.SetupLogger(Path.Combine(Environment.CurrentDirectory, "logs"))
.WriteTo.Logcat("dev.aest.aosta", "{Message:lj} <{ThreadId}><{ThreadName}>{NewLine}{Exception}", LogEventLevel.Debug)
.CreateLogger();
Expand Down
3 changes: 3 additions & 0 deletions Aosta.Ava/Aosta.Ava.Desktop/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Globalization;
using System.IO;

using Aosta.Data;
Expand All @@ -20,6 +21,8 @@ internal static class Program
[STAThread]
public static void Main(string[] args)
{
CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture;

BuildAvaloniaApp()
.StartWithClassicDesktopLifetime(args);
}
Expand Down
15 changes: 7 additions & 8 deletions Aosta.Ava/Aosta.Ava/App.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,10 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Aosta.Ava"
xmlns:styling="clr-namespace:FluentAvalonia.Styling;assembly=FluentAvalonia"
xmlns:localization="clr-namespace:Aosta.Ava.Localization"
x:Class="Aosta.Ava.App"
RequestedThemeVariant="Light">
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->

<Application.DataTemplates>
<DataTemplate DataType="localization:ILocalized">
<TextBlock Text="{Binding Localized}"/>
</DataTemplate>
<local:ViewLocator />
</Application.DataTemplates>

<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
Expand All @@ -26,6 +18,13 @@
</ResourceDictionary>
</Application.Resources>

<Application.DataTemplates>
<StaticResource ResourceKey="Localizable"/>
<StaticResource ResourceKey="SeasonInfoPill"/>
<StaticResource ResourceKey="InfoPill"/>
<local:ViewLocator />
</Application.DataTemplates>

<Application.Styles>
<styling:FluentAvaloniaTheme CustomAccentColor="{StaticResource BaseColor}"/>
<StyleInclude Source="/Assets/Styles/DefaultStyles.axaml"/>
Expand Down
21 changes: 17 additions & 4 deletions Aosta.Ava/Aosta.Ava/App.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
using Aosta.Jikan;

using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Markup.Xaml;

Expand Down Expand Up @@ -64,21 +65,33 @@ public override void OnFrameworkInitializationCompleted()
RequestedThemeVariant = themeKey.Theme;
_logger.Information("Loaded theme {Variant}", themeKey.Key);

DataContext = new MainViewModel();

if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
{
var ctx = new MainViewModel();

desktop.MainWindow = new MainWindow
{
DataContext = DataContext
DataContext = ctx
};

if (!Design.IsDesignMode)
{
DataContext = ctx;
}
}
else if (ApplicationLifetime is ISingleViewApplicationLifetime singleViewPlatform)
{
var ctx = new MainViewModel();

singleViewPlatform.MainView = new MainView
{
DataContext = DataContext
DataContext = ctx
};

if (!Design.IsDesignMode)
{
DataContext = ctx;
}
}

_logger.Debug("Framework initialization completed");
Expand Down
50 changes: 34 additions & 16 deletions Aosta.Ava/Aosta.Ava/Assets/Localization/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@
"HomePage.SeasonalAnime.Header" : "Currently airing",
"HomePage.TopAnime.Header" : "Top anime",

"SearchPage.SearchBox.Watermark" : "Search anime",
"SearchPage.Settings.Header": "Filter settings",
"SearchPage.Settings.AgeRatingFilter": "Age rating",
"SearchPage.Settings.AiringStatusFilter": "Airing status",
"SearchPage.Settings.AnimeTypeFilter" : "Content type",
"SearchPage.Settings.ScoreRange": "Score range",
"SearchPage.SearchBox.Watermark" : "Search for content online",

"SettingsPage.ApplicationSettings.Header": "Application settings",
"SettingsPage.ContentSettings.Header": "Content settings",
Expand All @@ -24,26 +29,39 @@
"Theme.System": "System",
"Theme.Light": "Light",

"Label.All": "All",
"Label.ContentType": "Type",
"Label.LoadMore": "Load more",
"Label.LocalizationLookupError": "Localization not found for {0}",
"Label.NotAvailable.Long" : "Not available",
"Label.NotAvailable.Short" : "N/A",
"Label.Season": "Season",
"Label.Score": "Score",
"Label.ContentType": "Type",
"Label.Year": "Year",

"Enum.AiringStatus.Airing": "Airing",
"Enum.AiringStatus.Complete": "Complete",
"Enum.AiringStatus.Upcoming": "Upcoming",

"Enum.AnimeAgeRatingFilter.G": "All ages",
"Enum.AnimeAgeRatingFilter.PG": "Children",
"Enum.AnimeAgeRatingFilter.PG13": "Teens (13+)",
"Enum.AnimeAgeRatingFilter.R17": "Adults only",
"Enum.AnimeAgeRatingFilter.R": "Mature",
"Enum.AnimeAgeRatingFilter.RX": "Hentai",

"Enum.AnimeType.TvAnime": "TV",
"Enum.AnimeType.TvSpecial": "TV Special",
"Enum.AnimeType.OVA" : "OVA",
"Enum.AnimeType.Movie": "Movie",
"Enum.AnimeType.Special": "Special",
"Enum.AnimeType.ONA": "ONA",
"Enum.AnimeType.Music": "Music",
"Enum.AnimeType.PromoVideo": "Promotional Video",
"Enum.AnimeType.Commercial": "Commercial Message",

"Jikan.AnimeType.TvAnime": "TV",
"Jikan.AnimeType.TvSpecial": "TV Special",
"Jikan.AnimeType.OVA" : "OVA",
"Jikan.AnimeType.Movie": "Movie",
"Jikan.AnimeType.Special": "Special",
"Jikan.AnimeType.ONA": "ONA",
"Jikan.AnimeType.Music": "Music",
"Jikan.AnimeType.PromoVideo": "Promotional Video",
"Jikan.AnimeType.Commercial": "Commercial Message",

"Jikan.Season.Spring": "Spring",
"Jikan.Season.Summer": "Summer",
"Jikan.Season.Fall": "Fall",
"Jikan.Season.Winter": "Winter"
"Enum.Season.Spring": "Spring",
"Enum.Season.Summer": "Summer",
"Enum.Season.Fall": "Fall",
"Enum.Season.Winter": "Winter"
}
55 changes: 38 additions & 17 deletions Aosta.Ava/Aosta.Ava/Assets/Localization/it-IT.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
{
"App.Version": "Versione {0}",

"AnimeDetails.EpisodesList.Header": "Episodi",
"AnimeDetails.Synopsis.Header": "Sinossi",
"AnimeDetails.ToolTip.AddToRealm": "Aggiungi questo anime alla tua lista",
"AnimeList.Header.NoAnime" : "La lista è vuota",
"AnimeList.Header.AnimeCount" : "{0} Anime",
"App.Version": "Versione {0}",

"HomePage.SeasonalAnime.Header" : "Anime in corso",
"HomePage.TopAnime.Header" : "Top anime",

"SearchPage.SearchBox.Watermark" : "Cerca anime",
"SearchPage.Settings.Header": "Imposta i filtri",
"SearchPage.Settings.AgeRatingFilter": "Audience",
"SearchPage.Settings.AiringStatusFilter": "Messa in onda",
"SearchPage.Settings.AnimeTypeFilter" : "Tipo",
"SearchPage.Settings.ScoreRange": "Intervallo di voti",
"SearchPage.SearchBox.Watermark" : "Cerca contenuti online",

"SettingsPage.ApplicationSettings.Header": "Impostazioni applicazione",
"SettingsPage.ContentSettings.Header": "Impostazioni contenuti",
"SettingsPage.AppTheme.Entry": "Tema applicazione",
Expand All @@ -20,26 +28,39 @@
"Theme.System": "Sistema",
"Theme.Light": "Chiaro",

"Label.All": "Tutti",
"Label.ContentType": "Tipo",
"Label.LoadMore": "Carica altro",
"Label.LocalizationLookupError": "Localizzazione non trovata per {0}",
"Label.NotAvailable.Long" : "Non disponibile",
"Label.NotAvailable.Short" : "N/D",
"Label.Season": "Stagione",
"Label.Score": "Voto",
"Label.ContentType": "Tipo",
"Label.Year": "Anno",

"Enum.AnimeAgeRatingFilter.G": "Adatto a tutti",
"Enum.AnimeAgeRatingFilter.PG": "Bambini",
"Enum.AnimeAgeRatingFilter.PG13": "Ragazzi (13+)",
"Enum.AnimeAgeRatingFilter.R17": "Adulti",
"Enum.AnimeAgeRatingFilter.R": "Contenuti espliciti",
"Enum.AnimeAgeRatingFilter.RX": "Hentai",

"Enum.AiringStatus.Airing": "In onda",
"Enum.AiringStatus.Complete": "Completato",
"Enum.AiringStatus.Upcoming": "In arrivo",

"Enum.AnimeType.TvAnime": "TV",
"Enum.AnimeType.TvSpecial": "Speciale TV",
"Enum.AnimeType.OVA" : "OVA",
"Enum.AnimeType.Movie": "Film",
"Enum.AnimeType.Special": "Speciale",
"Enum.AnimeType.ONA": "ONA",
"Enum.AnimeType.Music": "Musica",
"Enum.AnimeType.PromoVideo": "Video promozionale",
"Enum.AnimeType.Commercial": "Messaggio pubblicitario",

"Jikan.AnimeType.TvAnime": "TV",
"Jikan.AnimeType.TvSpecial": "Speciale TV",
"Jikan.AnimeType.OVA" : "OVA",
"Jikan.AnimeType.Movie": "Film",
"Jikan.AnimeType.Special": "Speciale",
"Jikan.AnimeType.ONA": "ONA",
"Jikan.AnimeType.Music": "Musica",
"Jikan.AnimeType.PromoVideo": "Video promozionale",
"Jikan.AnimeType.Commercial": "Messaggio pubblicitario",

"Jikan.Season.Spring": "Primavera",
"Jikan.Season.Summer": "Estate",
"Jikan.Season.Fall": "Autunno",
"Jikan.Season.Winter": "Inverno"
"Enum.Season.Spring": "Primavera",
"Enum.Season.Summer": "Estate",
"Enum.Season.Fall": "Autunno",
"Enum.Season.Winter": "Inverno"
}
2 changes: 2 additions & 0 deletions Aosta.Ava/Aosta.Ava/Assets/Resources/Colors.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,12 @@
<ResourceDictionary x:Key="Light">
<SolidColorBrush x:Key="MainBackgroundBrush" Color="{StaticResource Gray100}"/>
<SolidColorBrush x:Key="TitleBarBackgroundBrush" Color="{StaticResource Gray100}"/>
<SolidColorBrush x:Key="FloatingPaneBackgroundBrush" Color="{StaticResource BaseColor90L}"/>
</ResourceDictionary>
<ResourceDictionary x:Key="Dark">
<SolidColorBrush x:Key="MainBackgroundBrush" Color="{StaticResource Gray950}"/>
<SolidColorBrush x:Key="TitleBarBackgroundBrush" Color="{StaticResource Gray900}"/>
<SolidColorBrush x:Key="FloatingPaneBackgroundBrush" Color="{StaticResource BaseColor10L}"/>
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
</ResourceDictionary>
Loading

0 comments on commit df18e18

Please sign in to comment.