File tree 2 files changed +16
-3
lines changed
src/NexusMods.App.UI/Overlays/Generic/MessageBox/Ok
2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 45
45
Text =" Description" />
46
46
47
47
<!-- Supporting Markdown -->
48
- <reactiveUi : ViewModelViewHost x : Name =" MarkdownRendererViewModelViewHost" MaxHeight =" 640"
49
- MaxWidth =" 600" />
48
+ <StackPanel Orientation =" Vertical" x : Name =" DetailsSection" >
49
+ <controls : StandardButton x : Name =" CopyDetailsButton"
50
+ LeftIcon =" {x:Static icons:IconValues.Copy}"
51
+ ShowIcon =" Left"
52
+ ShowLabel =" False" />
53
+ <reactiveUi : ViewModelViewHost x : Name =" MarkdownRendererViewModelViewHost" MaxHeight =" 640"
54
+ MaxWidth =" 600" />
55
+ </StackPanel >
56
+
50
57
</StackPanel >
51
58
52
59
</DockPanel >
Original file line number Diff line number Diff line change 1
1
using System . Reactive . Disposables ;
2
2
using System . Reactive . Linq ;
3
+ using Avalonia . Controls ;
3
4
using Avalonia . ReactiveUI ;
4
5
using R3 ;
5
6
using ReactiveUI ;
@@ -28,7 +29,7 @@ public MessageBoxOkView()
28
29
29
30
this . WhenAnyValue ( view => view . ViewModel ! . MarkdownRenderer )
30
31
. Select ( vm => vm != null )
31
- . BindTo ( this , v => v . MarkdownRendererViewModelViewHost . IsVisible )
32
+ . BindTo ( this , v => v . DetailsSection . IsVisible )
32
33
. DisposeWith ( disposables ) ;
33
34
34
35
// Bind commands
@@ -41,6 +42,11 @@ public MessageBoxOkView()
41
42
{
42
43
ViewModel ! . Complete ( Unit . Default ) ;
43
44
} ) ;
45
+
46
+ CopyDetailsButton . Command = ReactiveCommand . CreateFromTask ( async ( ) =>
47
+ {
48
+ await TopLevel . GetTopLevel ( this ) ! . Clipboard ! . SetTextAsync ( ViewModel ? . MarkdownRenderer ? . Contents ) ;
49
+ } ) ;
44
50
} ) ;
45
51
}
46
52
}
You can’t perform that action at this time.
0 commit comments