Add option to reverse message order in exports (#1487)

Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This commit is contained in:
Copilot
2026-02-26 21:14:57 +02:00
committed by GitHub
parent 522caba420
commit c4bfb3424e
18 changed files with 253 additions and 10 deletions

View File

@@ -104,6 +104,9 @@ public partial class LocalizationManager
[nameof(MessageFilterLabel)] = "Message filter",
[nameof(MessageFilterTooltip)] =
"Only include messages that satisfy this filter (e.g. 'from:foo#1234' or 'has:image'). See the documentation for more info.",
[nameof(ReverseMessageOrderLabel)] = "Reverse messages",
[nameof(ReverseMessageOrderTooltip)] =
"Export messages in reverse chronological order (newest first)",
[nameof(FormatMarkdownLabel)] = "Format markdown",
[nameof(FormatMarkdownTooltip)] =
"Process markdown, mentions, and other special tokens",

View File

@@ -106,6 +106,9 @@ public partial class LocalizationManager
[nameof(MessageFilterLabel)] = "Filtre de messages",
[nameof(MessageFilterTooltip)] =
"Inclure uniquement les messages satisfaisant ce filtre (ex. 'from:foo#1234' ou 'has:image'). Voir la documentation pour plus d'informations.",
[nameof(ReverseMessageOrderLabel)] = "Inverser l'ordre des messages",
[nameof(ReverseMessageOrderTooltip)] =
"Exporter les messages en ordre chronologique inversé (les plus récents en premier)",
[nameof(FormatMarkdownLabel)] = "Formater le markdown",
[nameof(FormatMarkdownTooltip)] =
"Traiter le markdown, les mentions et autres tokens spéciaux",

View File

@@ -110,6 +110,9 @@ public partial class LocalizationManager
[nameof(MessageFilterLabel)] = "Nachrichtenfilter",
[nameof(MessageFilterTooltip)] =
"Nur Nachrichten einschließen, die diesem Filter entsprechen (z. B. 'from:foo#1234' oder 'has:image'). Weitere Informationen finden Sie in der Dokumentation.",
[nameof(ReverseMessageOrderLabel)] = "Nachrichtenreihenfolge umkehren",
[nameof(ReverseMessageOrderTooltip)] =
"Nachrichten in umgekehrter chronologischer Reihenfolge exportieren (neueste zuerst)",
[nameof(FormatMarkdownLabel)] = "Markdown formatieren",
[nameof(FormatMarkdownTooltip)] =
"Markdown, Erwähnungen und andere spezielle Token verarbeiten",

View File

@@ -104,6 +104,9 @@ public partial class LocalizationManager
[nameof(MessageFilterLabel)] = "Filtro de mensajes",
[nameof(MessageFilterTooltip)] =
"Solo incluir mensajes que satisfagan este filtro (p. ej. 'from:foo#1234' o 'has:image'). Consulte la documentación para más información.",
[nameof(ReverseMessageOrderLabel)] = "Invertir orden de mensajes",
[nameof(ReverseMessageOrderTooltip)] =
"Exportar mensajes en orden cronológico inverso (los más recientes primero)",
[nameof(FormatMarkdownLabel)] = "Formatear markdown",
[nameof(FormatMarkdownTooltip)] =
"Procesar markdown, menciones y otros tokens especiales",

View File

@@ -104,6 +104,9 @@ public partial class LocalizationManager
[nameof(MessageFilterLabel)] = "Фільтр повідомлень",
[nameof(MessageFilterTooltip)] =
"Включати лише повідомлення, що відповідають цьому фільтру (напр. 'from:foo#1234' або 'has:image'). Дивіться документацію для більш детальної інформації.",
[nameof(ReverseMessageOrderLabel)] = "Зворотній порядок повідомлень",
[nameof(ReverseMessageOrderTooltip)] =
"Експортувати повідомлення у зворотному хронологічному порядку (найновіші спочатку)",
[nameof(FormatMarkdownLabel)] = "Форматувати markdown",
[nameof(FormatMarkdownTooltip)] =
"Обробляти markdown, згадки та інші спеціальні токени",

View File

@@ -135,6 +135,8 @@ public partial class LocalizationManager
public string PartitionLimitTooltip => Get();
public string MessageFilterLabel => Get();
public string MessageFilterTooltip => Get();
public string ReverseMessageOrderLabel => Get();
public string ReverseMessageOrderTooltip => Get();
public string FormatMarkdownLabel => Get();
public string FormatMarkdownTooltip => Get();
public string DownloadAssetsLabel => Get();

View File

@@ -61,6 +61,9 @@ public partial class SettingsService()
[ObservableProperty]
public partial string? LastMessageFilterValue { get; set; }
[ObservableProperty]
public partial bool LastIsReverseMessageOrder { get; set; }
[ObservableProperty]
public partial bool LastShouldFormatMarkdown { get; set; } = true;

View File

@@ -275,6 +275,7 @@ public partial class DashboardViewModel : ViewModelBase
dialog.Before?.Pipe(Snowflake.FromDate),
dialog.PartitionLimit,
dialog.MessageFilter,
dialog.IsReverseMessageOrder,
dialog.ShouldFormatMarkdown,
dialog.ShouldDownloadAssets,
dialog.ShouldReuseAssets,

View File

@@ -62,6 +62,9 @@ public partial class ExportSetupViewModel(
[NotifyPropertyChangedFor(nameof(MessageFilter))]
public partial string? MessageFilterValue { get; set; }
[ObservableProperty]
public partial bool IsReverseMessageOrder { get; set; }
[ObservableProperty]
public partial bool ShouldFormatMarkdown { get; set; }
@@ -106,6 +109,7 @@ public partial class ExportSetupViewModel(
SelectedFormat = settingsService.LastExportFormat;
PartitionLimitValue = settingsService.LastPartitionLimitValue;
MessageFilterValue = settingsService.LastMessageFilterValue;
IsReverseMessageOrder = settingsService.LastIsReverseMessageOrder;
ShouldFormatMarkdown = settingsService.LastShouldFormatMarkdown;
ShouldDownloadAssets = settingsService.LastShouldDownloadAssets;
ShouldReuseAssets = settingsService.LastShouldReuseAssets;
@@ -120,7 +124,8 @@ public partial class ExportSetupViewModel(
|| !string.IsNullOrWhiteSpace(MessageFilterValue)
|| ShouldDownloadAssets
|| ShouldReuseAssets
|| !string.IsNullOrWhiteSpace(AssetsDirPath);
|| !string.IsNullOrWhiteSpace(AssetsDirPath)
|| IsReverseMessageOrder;
}
[RelayCommand]
@@ -184,6 +189,7 @@ public partial class ExportSetupViewModel(
settingsService.LastExportFormat = SelectedFormat;
settingsService.LastPartitionLimitValue = PartitionLimitValue;
settingsService.LastMessageFilterValue = MessageFilterValue;
settingsService.LastIsReverseMessageOrder = IsReverseMessageOrder;
settingsService.LastShouldFormatMarkdown = ShouldFormatMarkdown;
settingsService.LastShouldDownloadAssets = ShouldDownloadAssets;
settingsService.LastShouldReuseAssets = ShouldReuseAssets;

View File

@@ -196,6 +196,15 @@
Theme="{DynamicResource FilledTextBox}"
ToolTip.Tip="{Binding LocalizationManager.MessageFilterTooltip}" />
<!-- Reverse message order -->
<DockPanel
Margin="16,8"
LastChildFill="False"
ToolTip.Tip="{Binding LocalizationManager.ReverseMessageOrderTooltip}">
<TextBlock DockPanel.Dock="Left" Text="{Binding LocalizationManager.ReverseMessageOrderLabel}" />
<ToggleSwitch DockPanel.Dock="Right" IsChecked="{Binding IsReverseMessageOrder}" />
</DockPanel>
<!-- Markdown formatting -->
<DockPanel
Margin="16,8"