Merge pull request #415 from Flow-Launcher/add_tips_userdata_sys_plugin

Add tips and UserData location commands for Sys plugin
This commit is contained in:
Jeremy Wu 2021-04-20 01:04:37 +10:00 committed by GitHub
commit 43d75c9d4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 27 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,34 @@ 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;
}

View file

@ -4,7 +4,7 @@
"Name": "System Commands",
"Description": "Provide System related commands. e.g. shutdown,lock, setting etc.",
"Author": "qianlifeng",
"Version": "1.2.3",
"Version": "1.3.0",
"Language": "csharp",
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
"ExecuteFileName": "Flow.Launcher.Plugin.Sys.dll",