mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add log directory & version log directory & themes directory in data location
This commit is contained in:
parent
b50db58673
commit
601211173c
5 changed files with 13 additions and 11 deletions
|
|
@ -12,7 +12,7 @@ namespace Flow.Launcher.Infrastructure.Logger
|
|||
{
|
||||
public static class Log
|
||||
{
|
||||
public const string DirectoryName = "Logs";
|
||||
public const string DirectoryName = Constant.Logs;
|
||||
|
||||
public static string CurrentLogDirectory { get; }
|
||||
|
||||
|
|
|
|||
|
|
@ -25,8 +25,12 @@ namespace Flow.Launcher.Infrastructure.UserSettings
|
|||
return false;
|
||||
}
|
||||
|
||||
public static readonly string VersionLogDirectory = Path.Combine(LogDirectory, Constant.Version);
|
||||
|
||||
public static readonly string LogDirectory = Path.Combine(DataDirectory(), Constant.Logs);
|
||||
public static readonly string SettingsDirectorty = Path.Combine(DataDirectory(), Constant.Settings);
|
||||
public static readonly string PluginsDirectory = Path.Combine(DataDirectory(), Constant.Plugins);
|
||||
public static readonly string ThemesDirectory = Path.Combine(DataDirectory(), Constant.Themes);
|
||||
|
||||
public static readonly string PluginSettingsDirectory = Path.Combine(SettingsDirectorty, Constant.Plugins);
|
||||
public static readonly string PluginCacheDirectory = Path.Combine(DataDirectory(), Constant.Cache, Constant.Plugins);
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ public partial class SettingsPaneAboutViewModel : BaseModel
|
|||
|
||||
private static DirectoryInfo GetLogDir(string version = "")
|
||||
{
|
||||
return new DirectoryInfo(Path.Combine(DataLocation.DataDirectory(), Constant.Logs, version));
|
||||
return new DirectoryInfo(Path.Combine(DataLocation.LogDirectory, version));
|
||||
}
|
||||
|
||||
private static List<FileInfo> GetLogFiles(string version = "")
|
||||
|
|
|
|||
|
|
@ -420,7 +420,7 @@ public partial class SettingsPaneThemeViewModel : BaseModel
|
|||
[RelayCommand]
|
||||
private void OpenThemesFolder()
|
||||
{
|
||||
App.API.OpenDirectory(Path.Combine(DataLocation.DataDirectory(), Constant.Themes));
|
||||
App.API.OpenDirectory(DataLocation.ThemesDirectory);
|
||||
}
|
||||
|
||||
public void UpdateColorScheme()
|
||||
|
|
|
|||
|
|
@ -147,8 +147,6 @@ namespace Flow.Launcher.Plugin.Sys
|
|||
private List<Result> Commands()
|
||||
{
|
||||
var results = new List<Result>();
|
||||
var logPath = Path.Combine(DataLocation.DataDirectory(), "Logs", Constant.Version);
|
||||
var userDataPath = DataLocation.DataDirectory();
|
||||
var recycleBinFolder = "shell:RecycleBinFolder";
|
||||
results.AddRange(new[]
|
||||
{
|
||||
|
|
@ -406,11 +404,11 @@ namespace Flow.Launcher.Plugin.Sys
|
|||
Title = "Open Log Location",
|
||||
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_open_log_location"),
|
||||
IcoPath = "Images\\app.png",
|
||||
CopyText = logPath,
|
||||
AutoCompleteText = logPath,
|
||||
CopyText = DataLocation.VersionLogDirectory,
|
||||
AutoCompleteText = DataLocation.VersionLogDirectory,
|
||||
Action = c =>
|
||||
{
|
||||
context.API.OpenDirectory(logPath);
|
||||
context.API.OpenDirectory(DataLocation.VersionLogDirectory);
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
|
@ -432,11 +430,11 @@ namespace Flow.Launcher.Plugin.Sys
|
|||
Title = "Flow Launcher UserData Folder",
|
||||
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_open_userdata_location"),
|
||||
IcoPath = "Images\\app.png",
|
||||
CopyText = userDataPath,
|
||||
AutoCompleteText = userDataPath,
|
||||
CopyText = DataLocation.DataDirectory(),
|
||||
AutoCompleteText = DataLocation.DataDirectory(),
|
||||
Action = c =>
|
||||
{
|
||||
context.API.OpenDirectory(userDataPath);
|
||||
context.API.OpenDirectory(DataLocation.DataDirectory());
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue