mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
UI - Fix Markdown link issues
This commit is contained in:
1 parent
00948de9d6
commit
4552b3ba17
8 files changed
+75
-1
No files matched your search
@@ -65,7 +65,7 @@ public class RootViewModel : RoutableHostScreen<RoutableScreen>, IMainWindowProv
|
||||
|
||||
router.SetRoot(this);
|
||||
mainWindowService.ConfigureMainWindowProvider(this);
|
||||
|
||||
|
||||
OpenScreen = ReactiveCommand.Create<string?>(ExecuteOpenScreen);
|
||||
OpenDebugger = ReactiveCommand.CreateFromTask(ExecuteOpenDebugger);
|
||||
Exit = ReactiveCommand.CreateFromTask(ExecuteExit);
|
||||
@@ -107,6 +107,9 @@ public class RootViewModel : RoutableHostScreen<RoutableScreen>, IMainWindowProv
|
||||
_windowService.ShowExceptionDialog("Fatal error occured during initialization", e);
|
||||
}
|
||||
});
|
||||
|
||||
// This isn't pretty, but it's the most straightforward way to make sure the ArtemisLinkCommand has access to the router
|
||||
ArtemisLinkCommand.Router = router;
|
||||
}
|
||||
|
||||
public SidebarViewModel SidebarViewModel { get; }
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
xmlns:converters="clr-namespace:Artemis.UI.Converters"
|
||||
xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
|
||||
xmlns:mdxaml="https://github.com/whistyun/Markdown.Avalonia.Tight"
|
||||
xmlns:ui="clr-namespace:Artemis.UI"
|
||||
mc:Ignorable="d" d:DesignWidth="1000" d:DesignHeight="1400"
|
||||
x:Class="Artemis.UI.Screens.Settings.Updating.ReleaseDetailsView"
|
||||
x:DataType="updating:ReleaseDetailsViewModel">
|
||||
@@ -14,6 +15,7 @@
|
||||
<shared:BytesToStringConverter x:Key="BytesToStringConverter" />
|
||||
<converters:SubstringConverter x:Key="SubstringConverter" />
|
||||
<converters:DateTimeConverter x:Key="DateTimeConverter" />
|
||||
<ui:ArtemisLinkCommand x:Key="ArtemisLinkCommand" />
|
||||
</UserControl.Resources>
|
||||
<UserControl.Styles>
|
||||
<Style Selector="Grid.info-container">
|
||||
@@ -142,6 +144,9 @@
|
||||
<Border Grid.Row="1" Classes="card-separator" />
|
||||
|
||||
<mdxaml:MarkdownScrollViewer Grid.Row="2" Markdown="{CompiledBinding Release.Changelog}" MarkdownStyleName="FluentAvalonia">
|
||||
<mdxaml:MarkdownScrollViewer.Engine>
|
||||
<mdxaml:Markdown HyperlinkCommand="{StaticResource ArtemisLinkCommand}" />
|
||||
</mdxaml:MarkdownScrollViewer.Engine>
|
||||
<mdxaml:MarkdownScrollViewer.Styles>
|
||||
<StyleInclude Source="/Styles/Markdown.axaml"/>
|
||||
</mdxaml:MarkdownScrollViewer.Styles>
|
||||
|
||||
@@ -4,9 +4,13 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:mdxaml="https://github.com/whistyun/Markdown.Avalonia.Tight"
|
||||
xmlns:entryReleases="clr-namespace:Artemis.UI.Screens.Workshop.EntryReleases"
|
||||
xmlns:ui="clr-namespace:Artemis.UI"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="Artemis.UI.Screens.Workshop.EntryReleases.EntryReleaseView"
|
||||
x:DataType="entryReleases:EntryReleaseViewModel">
|
||||
<UserControl.Resources>
|
||||
<ui:ArtemisLinkCommand x:Key="ArtemisLinkCommand" />
|
||||
</UserControl.Resources>
|
||||
<Grid RowDefinitions="Auto,Auto">
|
||||
<Border Grid.Row="0" Classes="card" Margin="0 0 0 10">
|
||||
<ContentControl Content="{CompiledBinding EntryReleaseInfoViewModel}"/>
|
||||
@@ -24,6 +28,9 @@
|
||||
Markdown="{CompiledBinding Release.Changelog}"
|
||||
MarkdownStyleName="FluentAvalonia"
|
||||
IsVisible="{CompiledBinding Release.Changelog, Converter={x:Static StringConverters.IsNotNullOrEmpty}}">
|
||||
<mdxaml:MarkdownScrollViewer.Engine>
|
||||
<mdxaml:Markdown HyperlinkCommand="{StaticResource ArtemisLinkCommand}" />
|
||||
</mdxaml:MarkdownScrollViewer.Engine>
|
||||
<mdxaml:MarkdownScrollViewer.Styles>
|
||||
<StyleInclude Source="/Styles/Markdown.axaml" />
|
||||
</mdxaml:MarkdownScrollViewer.Styles>
|
||||
|
||||
@@ -4,9 +4,13 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:mdxaml="https://github.com/whistyun/Markdown.Avalonia.Tight"
|
||||
xmlns:layout="clr-namespace:Artemis.UI.Screens.Workshop.Layout"
|
||||
xmlns:ui="clr-namespace:Artemis.UI"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="Artemis.UI.Screens.Workshop.Layout.LayoutDescriptionView"
|
||||
x:DataType="layout:LayoutDescriptionViewModel">
|
||||
<UserControl.Resources>
|
||||
<ui:ArtemisLinkCommand x:Key="ArtemisLinkCommand" />
|
||||
</UserControl.Resources>
|
||||
<StackPanel Spacing="10">
|
||||
<Border Classes="card">
|
||||
<ContentControl Content="{CompiledBinding ReleaseInfoViewModel}"/>
|
||||
@@ -14,6 +18,9 @@
|
||||
|
||||
<Border Classes="card">
|
||||
<mdxaml:MarkdownScrollViewer Markdown="{CompiledBinding Entry.Description}" MarkdownStyleName="FluentAvalonia">
|
||||
<mdxaml:MarkdownScrollViewer.Engine>
|
||||
<mdxaml:Markdown HyperlinkCommand="{StaticResource ArtemisLinkCommand}" />
|
||||
</mdxaml:MarkdownScrollViewer.Engine>
|
||||
<mdxaml:MarkdownScrollViewer.Styles>
|
||||
<StyleInclude Source="/Styles/Markdown.axaml" />
|
||||
</mdxaml:MarkdownScrollViewer.Styles>
|
||||
|
||||
@@ -4,9 +4,13 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:plugins="clr-namespace:Artemis.UI.Screens.Workshop.Plugins"
|
||||
xmlns:mdxaml="https://github.com/whistyun/Markdown.Avalonia.Tight"
|
||||
xmlns:ui="clr-namespace:Artemis.UI"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="Artemis.UI.Screens.Workshop.Plugins.PluginDescriptionView"
|
||||
x:DataType="plugins:PluginDescriptionViewModel">
|
||||
<UserControl.Resources>
|
||||
<ui:ArtemisLinkCommand x:Key="ArtemisLinkCommand" />
|
||||
</UserControl.Resources>
|
||||
<StackPanel Spacing="10">
|
||||
<Border Classes="card">
|
||||
<ContentControl Content="{CompiledBinding ReleaseInfoViewModel}"/>
|
||||
@@ -14,6 +18,9 @@
|
||||
|
||||
<Border Classes="card">
|
||||
<mdxaml:MarkdownScrollViewer Markdown="{CompiledBinding Entry.Description}" MarkdownStyleName="FluentAvalonia">
|
||||
<mdxaml:MarkdownScrollViewer.Engine>
|
||||
<mdxaml:Markdown HyperlinkCommand="{StaticResource ArtemisLinkCommand}" />
|
||||
</mdxaml:MarkdownScrollViewer.Engine>
|
||||
<mdxaml:MarkdownScrollViewer.Styles>
|
||||
<StyleInclude Source="/Styles/Markdown.axaml" />
|
||||
</mdxaml:MarkdownScrollViewer.Styles>
|
||||
|
||||
@@ -4,9 +4,13 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:profile="clr-namespace:Artemis.UI.Screens.Workshop.Profile"
|
||||
xmlns:mdxaml="https://github.com/whistyun/Markdown.Avalonia.Tight"
|
||||
xmlns:ui="clr-namespace:Artemis.UI"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="Artemis.UI.Screens.Workshop.Profile.ProfileDescriptionView"
|
||||
x:DataType="profile:ProfileDescriptionViewModel">
|
||||
<UserControl.Resources>
|
||||
<ui:ArtemisLinkCommand x:Key="ArtemisLinkCommand" />
|
||||
</UserControl.Resources>
|
||||
<StackPanel Spacing="10">
|
||||
<Border Classes="card">
|
||||
<ContentControl Content="{CompiledBinding ReleaseInfoViewModel}"/>
|
||||
@@ -14,6 +18,9 @@
|
||||
|
||||
<Border Classes="card">
|
||||
<mdxaml:MarkdownScrollViewer Markdown="{CompiledBinding Entry.Description}" MarkdownStyleName="FluentAvalonia" Name="MarkdownScrollViewer" >
|
||||
<mdxaml:MarkdownScrollViewer.Engine>
|
||||
<mdxaml:Markdown HyperlinkCommand="{StaticResource ArtemisLinkCommand}" />
|
||||
</mdxaml:MarkdownScrollViewer.Engine>
|
||||
<mdxaml:MarkdownScrollViewer.Styles>
|
||||
<StyleInclude Source="/Styles/Markdown.axaml" />
|
||||
</mdxaml:MarkdownScrollViewer.Styles>
|
||||
|
||||
Reference in new issue
Block a user