diff --git a/src/MaaWpfGui/Constants/ConfigurationKeys.cs b/src/MaaWpfGui/Constants/ConfigurationKeys.cs
index 1ac2e1f792..3aa28897f8 100644
--- a/src/MaaWpfGui/Constants/ConfigurationKeys.cs
+++ b/src/MaaWpfGui/Constants/ConfigurationKeys.cs
@@ -29,6 +29,8 @@ namespace MaaWpfGui.Constants
public const string MinimizeToTray = "GUI.MinimizeToTray";
public const string HideCloseButton = "GUI.HideCloseButton";
public const string UseNotify = "GUI.UseNotify";
+ public const string UseLogItemDateFormat = "GUI.UseLogItemDateFormat";
+ public const string LogItemDateFormat = "GUI.LogItemDateFormatString";
public const string WindowPlacement = "GUI.Placement";
public const string LoadWindowPlacement = "GUI.Placement.Load";
public const string SaveWindowPlacement = "GUI.Placement.SaveOnClosing";
diff --git a/src/MaaWpfGui/Res/Localizations/en-us.xaml b/src/MaaWpfGui/Res/Localizations/en-us.xaml
index 7a32fe69ae..28cd5dffc0 100644
--- a/src/MaaWpfGui/Res/Localizations/en-us.xaml
+++ b/src/MaaWpfGui/Res/Localizations/en-us.xaml
@@ -239,6 +239,8 @@ Please do not check it when the stage OF-1 is not unlocked.
Hide to tray when minimized
System Notification
Hide close button
+ Custom log date format
+ Date format string
Whether to restart immediately to apply changes?
Use alternative stage
Use remaining sanity stage
diff --git a/src/MaaWpfGui/Res/Localizations/ja-jp.xaml b/src/MaaWpfGui/Res/Localizations/ja-jp.xaml
index fce130617f..48cc148b67 100644
--- a/src/MaaWpfGui/Res/Localizations/ja-jp.xaml
+++ b/src/MaaWpfGui/Res/Localizations/ja-jp.xaml
@@ -231,6 +231,8 @@
最小化した際にトレイに表示
重要な通知をポップアップする
「閉じる」ボタンを隠す
+ カスタムログ日付形式
+ 日付書式文字列
変更を適用するためにすぐに再起動しますか?
代替ステージを選択可能にする
余剰理性の使用
diff --git a/src/MaaWpfGui/Res/Localizations/ko-kr.xaml b/src/MaaWpfGui/Res/Localizations/ko-kr.xaml
index b31a0c6a6e..9da0827039 100644
--- a/src/MaaWpfGui/Res/Localizations/ko-kr.xaml
+++ b/src/MaaWpfGui/Res/Localizations/ko-kr.xaml
@@ -243,6 +243,8 @@ OF-1을 해금하지 않았다면 선택하지 말아 주세요.
트레이로 최소화
중요 알림 팝업
닫기 버튼 숨기기
+ 사용자 정의 로그 날짜 형식
+ 날짜 형식 문자열
변경 사항을 적용하려면 즉시 다시 시작하시겠습니까?
대체 스테이지 사용
남은 이성 활용
diff --git a/src/MaaWpfGui/Res/Localizations/zh-cn.xaml b/src/MaaWpfGui/Res/Localizations/zh-cn.xaml
index 9c7a6dca4b..efed7f68a5 100644
--- a/src/MaaWpfGui/Res/Localizations/zh-cn.xaml
+++ b/src/MaaWpfGui/Res/Localizations/zh-cn.xaml
@@ -243,6 +243,8 @@
最小化时隐藏至托盘
重要信息弹出系统通知
隐藏关闭按钮
+ 自选日志日期格式
+ 日期格式字符串
是否立刻重启应用更改?
使用备选关卡
使用剩余理智
diff --git a/src/MaaWpfGui/Res/Localizations/zh-tw.xaml b/src/MaaWpfGui/Res/Localizations/zh-tw.xaml
index b55c91ae90..14d861340d 100644
--- a/src/MaaWpfGui/Res/Localizations/zh-tw.xaml
+++ b/src/MaaWpfGui/Res/Localizations/zh-tw.xaml
@@ -242,7 +242,9 @@
最小化時隱藏至工作列
重要訊息彈出系統通知
隱藏關閉按鈕
- 是否立刻重開應用更改?
+ 自訂日誌日期格式
+ 日期格式字串
+ 是否立刻重啟應用更改?
使用備選關卡
使用剩餘理智
在完成主任務後刷取指定關卡,不再自動回復理智
diff --git a/src/MaaWpfGui/ViewModels/LogItemViewModel.cs b/src/MaaWpfGui/ViewModels/LogItemViewModel.cs
index 73202a7c3d..bb91699712 100644
--- a/src/MaaWpfGui/ViewModels/LogItemViewModel.cs
+++ b/src/MaaWpfGui/ViewModels/LogItemViewModel.cs
@@ -12,7 +12,9 @@
//
using System;
+using System.Collections.Generic;
using MaaWpfGui.Constants;
+using MaaWpfGui.Helper;
using Stylet;
namespace MaaWpfGui.ViewModels
@@ -28,9 +30,15 @@ namespace MaaWpfGui.ViewModels
/// The content.
/// The font color.
/// The font weight.
- public LogItemViewModel(string content, string color = UiLogColor.Message, string weight = "Regular")
+ /// The Date format string
+ public LogItemViewModel(string content, string color = UiLogColor.Message, string weight = "Regular", string dateFormat = "MM'-'dd' 'HH':'mm':'ss")
{
- Time = DateTime.Now.ToString("MM'-'dd' 'HH':'mm':'ss");
+ if (Instances.SettingsViewModel.UseLogItemDateFormat)
+ {
+ dateFormat = Instances.SettingsViewModel.LogItemDateFormatString;
+ }
+
+ Time = DateTime.Now.ToString(dateFormat);
Content = content;
Color = color;
Weight = weight;
diff --git a/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs b/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs
index 80a1c64c69..dbc295c949 100644
--- a/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs
+++ b/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs
@@ -2902,6 +2902,41 @@ namespace MaaWpfGui.ViewModels.UI
}
}
+ private bool _useLogItemDateFormat = Convert.ToBoolean(ConfigurationHelper.GetValue(ConfigurationKeys.UseLogItemDateFormat, bool.FalseString));
+
+ public bool UseLogItemDateFormat
+ {
+ get => _useLogItemDateFormat;
+ set
+ {
+ SetAndNotify(ref _useLogItemDateFormat, value);
+ ConfigurationHelper.SetValue(ConfigurationKeys.UseLogItemDateFormat, value.ToString());
+ }
+ }
+
+ public List LogItemDateFormatStringList { get; } = new List
+ {
+ "HH:mm:ss",
+ "MM-dd HH:mm:ss",
+ "MM/dd HH:mm:ss",
+ "MM.dd HH:mm:ss",
+ "dd-MM HH:mm:ss",
+ "dd/MM HH:mm:ss",
+ "dd.MM HH:mm:ss",
+ };
+
+ private string _logItemDateFormatString = ConfigurationHelper.GetValue(ConfigurationKeys.LogItemDateFormat, "HH:mm:ss");
+
+ public string LogItemDateFormatString
+ {
+ get => _logItemDateFormatString;
+ set
+ {
+ SetAndNotify(ref _logItemDateFormatString, value);
+ ConfigurationHelper.SetValue(ConfigurationKeys.LogItemDateFormat, value);
+ }
+ }
+
private bool _useAlternateStage = Convert.ToBoolean(ConfigurationHelper.GetValue(ConfigurationKeys.UseAlternateStage, bool.FalseString));
///
diff --git a/src/MaaWpfGui/Views/UI/TaskQueueView.xaml b/src/MaaWpfGui/Views/UI/TaskQueueView.xaml
index 6a294f5635..ecba308739 100644
--- a/src/MaaWpfGui/Views/UI/TaskQueueView.xaml
+++ b/src/MaaWpfGui/Views/UI/TaskQueueView.xaml
@@ -288,23 +288,30 @@
ItemsSource="{Binding Path=LogItemViewModels}">
-
+
+
+
+
+
+
-
+
diff --git a/src/MaaWpfGui/Views/UserControl/GUISettingsUserControl.xaml b/src/MaaWpfGui/Views/UserControl/GUISettingsUserControl.xaml
index d7c4e4da82..54a347ef32 100644
--- a/src/MaaWpfGui/Views/UserControl/GUISettingsUserControl.xaml
+++ b/src/MaaWpfGui/Views/UserControl/GUISettingsUserControl.xaml
@@ -26,96 +26,110 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
+
+
+
+
+
+
-
-
-
-
+ Rows="4">
+
+
+
+
+