[PR #1031] [MERGED] Add configurable DateTime format options for file modification times in FileTransmitHost #3868

Closed
opened 2026-03-13 13:02:34 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/1Remote/1Remote/pull/1031
Author: @Copilot
Created: 11/19/2025
Status: Merged
Merged: 11/21/2025
Merged by: @VShawn

Base: mainHead: copilot/add-time-format-options


📝 Commits (4)

  • 913d4ac Initial plan
  • 445f127 Add DateTime format selection feature for FileTransmitHost
  • eb9b390 Use example date constants instead of descriptions in DateTime format menu
  • 643f5d2 improve

📊 Changes

8 files changed (+114 additions, -21 deletions)

View changed files

📝 Ui/Model/Protocol/FileTransmit/Transmitters/TransmissionController/TransmitTask.cs (+2 -7)
📝 Ui/Resources/Languages/en-us.xaml (+1 -0)
📝 Ui/Resources/Languages/zh-cn.xaml (+1 -0)
📝 Ui/Resources/Languages/zh-tw.xaml (+1 -0)
📝 Ui/Service/ConfigurationService.cs (+13 -0)
Ui/View/Host/ProtocolHosts/DateTimeFormatConverter.cs (+42 -0)
📝 Ui/View/Host/ProtocolHosts/FileTransmitHost.xaml (+5 -14)
📝 Ui/View/Host/ProtocolHosts/VmFileTransmitHost.cs (+49 -0)

📄 Description

Implementation Plan for DateTime Format Selection in FileTransmitHost

Based on issue #1029, adding a context menu option to allow users to select different date/time formats for file modification times displayed in the FileTransmitHost.

Changes Completed:

  • Add date/time format settings storage (in GeneralConfig)
  • Create a DateTime to String converter with format options
  • Add context menu items in FileTransmitHost for format selection (12H/24H, time first/date first, etc.)
  • Update the LastUpdate display binding to use the new converter
  • Add localization strings for the new menu items (English, Chinese Simplified, Chinese Traditional)
  • Update menu items to show example dates (e.g., "1979-01-01 23:59:59") instead of format descriptions

Implementation Details:

  1. ConfigurationService.cs: Added FileTransmitDateTimeFormat property to GeneralConfig class with 6 format options
  2. DateTimeFormatConverter.cs: Created a new IValueConverter to format DateTime based on user selection
  3. FileTransmitHost.xaml: Updated XAML to use the new DateTimeFormatConverter for LastUpdate binding
  4. VmFileTransmitHost.cs: Added context menu with DateTime format selection using example date constants (1979-01-01 23:59:59) instead of translation keys
  5. Language files: Added only the main "DateTime Format" translation, removed individual format descriptions

Format Options Display:

The menu now shows actual formatted examples:

  • 1979-01-01 23:59:59
  • 1979-01-01 11:59:59 PM
  • 23:59:59 1979-01-01
  • 11:59:59 PM 1979-01-01
  • 01/01/1979 23:59:59
  • 01/01/1979 11:59:59 PM
Original prompt

根据 issue #1029 提出的需求,在 FileTransmitHost.xaml 中显示文件和文件夹的修改时间时,允许选择多种格式。在右键菜单中添加一个组给用户选择时间格式,包括12H制、24H制、时间在前、日期在前等提供多种选项。


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/1Remote/1Remote/pull/1031 **Author:** [@Copilot](https://github.com/apps/copilot-swe-agent) **Created:** 11/19/2025 **Status:** ✅ Merged **Merged:** 11/21/2025 **Merged by:** [@VShawn](https://github.com/VShawn) **Base:** `main` ← **Head:** `copilot/add-time-format-options` --- ### 📝 Commits (4) - [`913d4ac`](https://github.com/1Remote/1Remote/commit/913d4ac8c9482bc15ba22e651ea20d1afe97d506) Initial plan - [`445f127`](https://github.com/1Remote/1Remote/commit/445f12702a597ad515b9d8f90aa9a6749926228f) Add DateTime format selection feature for FileTransmitHost - [`eb9b390`](https://github.com/1Remote/1Remote/commit/eb9b390341c4c03e0c86ab1459423feacb34fbf2) Use example date constants instead of descriptions in DateTime format menu - [`643f5d2`](https://github.com/1Remote/1Remote/commit/643f5d256e7070de8002db19fb0b20e664f665c2) improve ### 📊 Changes **8 files changed** (+114 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `Ui/Model/Protocol/FileTransmit/Transmitters/TransmissionController/TransmitTask.cs` (+2 -7) 📝 `Ui/Resources/Languages/en-us.xaml` (+1 -0) 📝 `Ui/Resources/Languages/zh-cn.xaml` (+1 -0) 📝 `Ui/Resources/Languages/zh-tw.xaml` (+1 -0) 📝 `Ui/Service/ConfigurationService.cs` (+13 -0) ➕ `Ui/View/Host/ProtocolHosts/DateTimeFormatConverter.cs` (+42 -0) 📝 `Ui/View/Host/ProtocolHosts/FileTransmitHost.xaml` (+5 -14) 📝 `Ui/View/Host/ProtocolHosts/VmFileTransmitHost.cs` (+49 -0) </details> ### 📄 Description ## Implementation Plan for DateTime Format Selection in FileTransmitHost Based on issue #1029, adding a context menu option to allow users to select different date/time formats for file modification times displayed in the FileTransmitHost. ### Changes Completed: - [x] Add date/time format settings storage (in GeneralConfig) - [x] Create a DateTime to String converter with format options - [x] Add context menu items in FileTransmitHost for format selection (12H/24H, time first/date first, etc.) - [x] Update the LastUpdate display binding to use the new converter - [x] Add localization strings for the new menu items (English, Chinese Simplified, Chinese Traditional) - [x] Update menu items to show example dates (e.g., "1979-01-01 23:59:59") instead of format descriptions ### Implementation Details: 1. **ConfigurationService.cs**: Added `FileTransmitDateTimeFormat` property to `GeneralConfig` class with 6 format options 2. **DateTimeFormatConverter.cs**: Created a new IValueConverter to format DateTime based on user selection 3. **FileTransmitHost.xaml**: Updated XAML to use the new DateTimeFormatConverter for LastUpdate binding 4. **VmFileTransmitHost.cs**: Added context menu with DateTime format selection using example date constants (1979-01-01 23:59:59) instead of translation keys 5. **Language files**: Added only the main "DateTime Format" translation, removed individual format descriptions ### Format Options Display: The menu now shows actual formatted examples: - 1979-01-01 23:59:59 - 1979-01-01 11:59:59 PM - 23:59:59 1979-01-01 - 11:59:59 PM 1979-01-01 - 01/01/1979 23:59:59 - 01/01/1979 11:59:59 PM <!-- START COPILOT CODING AGENT SUFFIX --> <details> <summary>Original prompt</summary> > 根据 issue #1029 提出的需求,在 FileTransmitHost.xaml 中显示文件和文件夹的修改时间时,允许选择多种格式。在右键菜单中添加一个组给用户选择时间格式,包括12H制、24H制、时间在前、日期在前等提供多种选项。 </details> <!-- START COPILOT CODING AGENT TIPS --> --- 💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-13 13:02:34 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/1Remote#3868
No description provided.