Skip to content

Commit

Permalink
improve impex (#2649)
Browse files Browse the repository at this point in the history
- copy execution command to clipboard
- add tooltips to import & export menu items
  • Loading branch information
MyDrift-user authored Aug 30, 2024
1 parent bddf57b commit a397f20
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions functions/public/Invoke-WPFImpex.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ function Invoke-WPFImpex {
if ($type -eq "export") {
$jsonFile = Get-WinUtilCheckBoxes -unCheck $false
$jsonFile | ConvertTo-Json | Out-File $FileBrowser.FileName -Force
$runscript = "iex ""& { `$(irm christitus.com/win) } -Config '$($FileBrowser.FileName)'"""
$runscript | Set-Clipboard
}
if ($type -eq "import") {
$jsonFile = Get-Content $Config | ConvertFrom-Json
Expand Down
12 changes: 10 additions & 2 deletions xaml/inputXML.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -782,8 +782,16 @@
HorizontalAlignment="Right" VerticalAlignment="Top">
<Border Background="{MainBackgroundColor}" BorderBrush="{MainForegroundColor}" BorderThickness="1" CornerRadius="0" Margin="0">
<StackPanel Background="{MainBackgroundColor}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<MenuItem FontSize="{ButtonFontSize}" Header="Import" Name="ImportMenuItem" Foreground="{MainForegroundColor}"/>
<MenuItem FontSize="{ButtonFontSize}" Header="Export" Name="ExportMenuItem" Foreground="{MainForegroundColor}"/>
<MenuItem FontSize="{ButtonFontSize}" Header="Import" Name="ImportMenuItem" Foreground="{MainForegroundColor}">
<MenuItem.ToolTip>
<ToolTip Content="Import Configuration from exported file."/>
</MenuItem.ToolTip>
</MenuItem>
<MenuItem FontSize="{ButtonFontSize}" Header="Export" Name="ExportMenuItem" Foreground="{MainForegroundColor}">
<MenuItem.ToolTip>
<ToolTip Content="Export Selected Elements and copy execution command to clipboard."/>
</MenuItem.ToolTip>
</MenuItem>
<Separator/>
<MenuItem FontSize="{ButtonFontSize}" Header="About" Name="AboutMenuItem" Foreground="{MainForegroundColor}"/>
<MenuItem FontSize="{ButtonFontSize}" Header="Sponsors" Name="SponsorMenuItem" Foreground="{MainForegroundColor}"/>
Expand Down

0 comments on commit a397f20

Please sign in to comment.