add tips and userdata location commands for Sys plugin

This commit is contained in:
Jeremy Wu 2021-04-19 07:23:50 +10:00
parent 41c3f8a793
commit a01e0d484a
2 changed files with 26 additions and 2 deletions

View file

@ -20,6 +20,8 @@
<system:String x:Key="flowlauncher_plugin_sys_reload_plugin_data">Refreshes plugin data with new content</system:String>
<system:String x:Key="flowlauncher_plugin_sys_open_log_location">Open Flow Launcher's log location</system:String>
<system:String x:Key="flowlauncher_plugin_sys_check_for_update">Check for new Flow Launcher update</system:String>
<system:String x:Key="flowlauncher_plugin_sys_open_docs_tips">Visit Flow Launcher's documentation for more help and how to use tips</system:String>
<system:String x:Key="flowlauncher_plugin_sys_open_userdata_location">Open the location where Flow Launcher's settings are stored</system:String>
<!--Dialogs-->
<system:String x:Key="flowlauncher_plugin_sys_dlgtitle_success">Success</system:String>

View file

@ -278,11 +278,33 @@ namespace Flow.Launcher.Plugin.Sys
Action = c =>
{
var logPath = Path.Combine(DataLocation.DataDirectory(), "Logs", Constant.Version);
Process.Start("explorer".SetProcessStartInfo(arguments: logPath));
FilesFolders.OpenPath(logPath);
return true;
}
},
new Result
{
Title = "Flow Launcher Tips",
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_open_docs_tips"),
IcoPath = "Images\\app.png",
Action = c =>
{
SearchWeb.NewTabInBrowser(Constant.Documentation);
return true;
}
},
new Result
{
Title = "Flow Launcher UserData Folder",
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_open_userdata_location"),
IcoPath = "Images\\app.png",
Action = c =>
{
FilesFolders.OpenPath(DataLocation.DataDirectory());
return true;
}
}
});
});
return results;
}