Add hyperlink to learn more about file manager usage in settings dialog

This commit is contained in:
DB p 2025-05-20 22:07:41 +09:00
parent aadfde09d5
commit f262263934
3 changed files with 24 additions and 6 deletions

View file

@ -367,6 +367,7 @@
<!-- FileManager Setting Dialog -->
<system:String x:Key="fileManagerWindow">Select File Manager</system:String>
<system:String x:Key="fileManager_files_btn">Do you use Files?</system:String>
<system:String x:Key="fileManager_learnMore">Learn more</system:String>
<system:String x:Key="fileManager_files_tips">Depending on the version, Files may use either "Files" or "Files-stable" as its path. (This can vary depending on which version you're using.) For more details, see:</system:String>
<system:String x:Key="fileManager_tips">Please specify the file location of the file manager you using and add arguments as required. The &quot;%d&quot; represents the directory path to open for, used by the Arg for Folder field and for commands opening specific directories. The &quot;%f&quot; represents the file path to open for, used by the Arg for File field and for commands opening specific files.</system:String>
<system:String x:Key="fileManager_tips2">For example, if the file manager uses a command such as &quot;totalcmd.exe /A c:\windows&quot; to open the c:\windows directory, the File Manager Path will be totalcmd.exe, and the Arg For Folder will be /A &quot;%d&quot;. Certain file managers like QTTabBar may just require a path to be supplied, in this instance use &quot;%d&quot; as the File Manager Path and leave the rest of the fileds blank.</system:String>

View file

@ -73,12 +73,19 @@
<TextBlock Margin="0 14 0 0" FontSize="14">
<TextBlock Text="{DynamicResource fileManager_tips2}" TextWrapping="WrapWithOverflow" />
</TextBlock>
<Button
x:Name="btnTips"
Margin="0 14 0 0"
HorizontalAlignment="Left"
Click="btnTips_Click"
Content="{DynamicResource fileManager_files_btn}" />
<StackPanel Margin="0 14 0 0" Orientation="Horizontal">
<Button
x:Name="btnTips"
Margin="0 14 0 0"
HorizontalAlignment="Left"
Click="btnTips_Click"
Content="{DynamicResource fileManager_files_btn}" />
<TextBlock Margin="10 8 0 0" VerticalAlignment="Center">
<Hyperlink NavigateUri="https://www.flowlauncher.com/docs/#/filemanager" RequestNavigate="Hyperlink_RequestNavigate">
<TextBlock FontSize="14" Text="{DynamicResource fileManager_learnMore}" />
</Hyperlink>
</TextBlock>
</StackPanel>
</StackPanel>
<Rectangle
Height="1"

View file

@ -45,6 +45,16 @@ namespace Flow.Launcher
{
Close();
}
private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e)
{
Process.Start(new ProcessStartInfo
{
FileName = e.Uri.AbsoluteUri,
UseShellExecute = true
});
e.Handled = true;
}
private void btnDone_Click(object sender, RoutedEventArgs e)
{