mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-10-30 15:06:06 +00:00
Ze changement
This commit is contained in:
parent
3821ba610b
commit
6470ba9d3e
2 changed files with 24 additions and 4 deletions
|
|
@ -86,8 +86,21 @@ namespace AideDeJeu.ViewModels
|
||||||
}
|
}
|
||||||
else //if (currentItem is Items)
|
else //if (currentItem is Items)
|
||||||
{
|
{
|
||||||
var items = currentItem; // as Items;
|
if (currentItem.GetNewFilterViewModel() == null)
|
||||||
items.AddChild(subItem);
|
{
|
||||||
|
var level = Math.Max(1, Math.Min(6, subItem.NameLevel));
|
||||||
|
currentItem.Markdown += $"\n\n{new String('#', level)} [{subItem.Name}]({(subItem is LinkItem ? (subItem as LinkItem).Link : subItem.Id)})\n\n";
|
||||||
|
if(!string.IsNullOrEmpty(subItem.AltNameText))
|
||||||
|
{
|
||||||
|
var altlevel = Math.Max(1, Math.Min(6, subItem.NameLevel + 2));
|
||||||
|
currentItem.Markdown += $"{new String('#', altlevel)} {subItem.AltNameText}\n\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var items = currentItem; // as Items;
|
||||||
|
items.AddChild(subItem);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
enumerator.MoveNext();
|
enumerator.MoveNext();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,14 @@
|
||||||
<ToolbarItem Name="AddToFavorites" Text="Ajouter aux favoris" Order="Primary" Icon="round_star.png" Command="{Binding Main.Navigator.AddToFavoritesCommand}" />
|
<ToolbarItem Name="AddToFavorites" Text="Ajouter aux favoris" Order="Primary" Icon="round_star.png" Command="{Binding Main.Navigator.AddToFavoritesCommand}" />
|
||||||
</ContentPage.ToolbarItems>
|
</ContentPage.ToolbarItems>
|
||||||
<Grid>
|
<Grid>
|
||||||
<ListView BackgroundColor="{StaticResource HDWhite}" x:Name="ItemsListView" ItemsSource="{Binding Children}" VerticalOptions="FillAndExpand" HasUnevenRows="true" CachingStrategy="RecycleElement" SelectedItem="{Binding SelectedItem}" ItemTapped="ItemsListView_ItemTapped">
|
<ScrollView Orientation="Vertical">
|
||||||
|
<mdview:MarkdownView
|
||||||
|
Theme="{StaticResource MonsterMarkdownTheme}"
|
||||||
|
Markdown="{Binding BindingContext.Items.Markdown, Source={x:Reference This}}"
|
||||||
|
NavigateToLinkCommand="{Binding Main.Navigator.NavigateToLinkCommand, Source={x:Reference This}}"
|
||||||
|
/>
|
||||||
|
</ScrollView>
|
||||||
|
<!--<ListView BackgroundColor="{StaticResource HDWhite}" x:Name="ItemsListView" ItemsSource="{Binding Children}" VerticalOptions="FillAndExpand" HasUnevenRows="true" CachingStrategy="RecycleElement" SelectedItem="{Binding SelectedItem}" ItemTapped="ItemsListView_ItemTapped">
|
||||||
<ListView.Header>
|
<ListView.Header>
|
||||||
<mdview:MarkdownView
|
<mdview:MarkdownView
|
||||||
Theme="{StaticResource MonsterMarkdownTheme}"
|
Theme="{StaticResource MonsterMarkdownTheme}"
|
||||||
|
|
@ -38,7 +45,7 @@
|
||||||
</ViewCell>
|
</ViewCell>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListView.ItemTemplate>
|
</ListView.ItemTemplate>
|
||||||
</ListView>
|
</ListView>-->
|
||||||
<ActivityIndicator
|
<ActivityIndicator
|
||||||
VerticalOptions="StartAndExpand"
|
VerticalOptions="StartAndExpand"
|
||||||
HorizontalOptions="End"
|
HorizontalOptions="End"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue