feat(about): logs + settings paths open the folder in Explorer
The two %APPDATA% / %LOCALAPPDATA% paths in Settings → אודות are now hyperlinks. Click to open the folder (creates it lazily if it's not there yet, so the link works before the first log is written). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -123,10 +123,22 @@
|
|||||||
Foreground="{Binding UpdateStatusBrush}"
|
Foreground="{Binding UpdateStatusBrush}"
|
||||||
TextWrapping="Wrap"
|
TextWrapping="Wrap"
|
||||||
Margin="0,4,0,0" />
|
Margin="0,4,0,0" />
|
||||||
<TextBlock Margin="0,16,0,0" TextWrapping="Wrap"
|
<TextBlock Margin="0,16,0,0" TextWrapping="Wrap">
|
||||||
Text="לוגים: %LOCALAPPDATA%\MarcusLaw\OutlookAddin\logs" />
|
<Run Text="לוגים: " />
|
||||||
<TextBlock TextWrapping="Wrap"
|
<Hyperlink Tag="%LOCALAPPDATA%\MarcusLaw\OutlookAddin\logs"
|
||||||
Text="הגדרות: %APPDATA%\MarcusLaw\OutlookAddin\settings.json" />
|
Click="OnOpenFolderHyperlink"
|
||||||
|
ToolTip="פתח את התיקייה ב-Explorer">
|
||||||
|
<Run Text="%LOCALAPPDATA%\MarcusLaw\OutlookAddin\logs" />
|
||||||
|
</Hyperlink>
|
||||||
|
</TextBlock>
|
||||||
|
<TextBlock TextWrapping="Wrap">
|
||||||
|
<Run Text="הגדרות: " />
|
||||||
|
<Hyperlink Tag="%APPDATA%\MarcusLaw\OutlookAddin"
|
||||||
|
Click="OnOpenFolderHyperlink"
|
||||||
|
ToolTip="פתח את התיקייה ב-Explorer">
|
||||||
|
<Run Text="%APPDATA%\MarcusLaw\OutlookAddin\settings.json" />
|
||||||
|
</Hyperlink>
|
||||||
|
</TextBlock>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
using System.Windows.Documents;
|
||||||
using MarcusLaw.OutlookAddin.UI.ViewModels;
|
using MarcusLaw.OutlookAddin.UI.ViewModels;
|
||||||
|
|
||||||
namespace MarcusLaw.OutlookAddin.UI.Dialogs
|
namespace MarcusLaw.OutlookAddin.UI.Dialogs
|
||||||
@@ -40,5 +43,23 @@ namespace MarcusLaw.OutlookAddin.UI.Dialogs
|
|||||||
DialogResult = _viewModel?.DialogResult;
|
DialogResult = _viewModel?.DialogResult;
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnOpenFolderHyperlink(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (!(sender is Hyperlink h) || !(h.Tag is string raw)) return;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var path = Environment.ExpandEnvironmentVariables(raw);
|
||||||
|
// Create the folder lazily so the link works even on the very
|
||||||
|
// first run, before any log has been written.
|
||||||
|
if (!Directory.Exists(path)) Directory.CreateDirectory(path);
|
||||||
|
Process.Start(new ProcessStartInfo("explorer.exe", "\"" + path + "\"") { UseShellExecute = true });
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show("פתיחת התיקייה נכשלה: " + ex.Message, "Klear",
|
||||||
|
MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
<PublishUrl>C:\Users\Chaim\source\repos\OutlookAddin\Publish\</PublishUrl>
|
<PublishUrl>C:\Users\Chaim\source\repos\OutlookAddin\Publish\</PublishUrl>
|
||||||
<InstallUrl>https://gitea.dev.marcus-law.co.il/espocrm-extensions/OutlookAddin/raw/branch/main/Publish/</InstallUrl>
|
<InstallUrl>https://gitea.dev.marcus-law.co.il/espocrm-extensions/OutlookAddin/raw/branch/main/Publish/</InstallUrl>
|
||||||
<TargetCulture>en</TargetCulture>
|
<TargetCulture>en</TargetCulture>
|
||||||
<ApplicationVersion>1.2.0.0</ApplicationVersion>
|
<ApplicationVersion>1.2.1.0</ApplicationVersion>
|
||||||
<AutoIncrementApplicationRevision>false</AutoIncrementApplicationRevision>
|
<AutoIncrementApplicationRevision>false</AutoIncrementApplicationRevision>
|
||||||
<UpdateEnabled>true</UpdateEnabled>
|
<UpdateEnabled>true</UpdateEnabled>
|
||||||
<UpdateInterval>7</UpdateInterval>
|
<UpdateInterval>7</UpdateInterval>
|
||||||
|
|||||||
@@ -33,6 +33,6 @@ using System.Security;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0.0")]
|
[assembly: AssemblyVersion("1.2.1.0")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0.0")]
|
[assembly: AssemblyFileVersion("1.2.1.0")]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user