[PR #483] [MERGED] feat: |UI| show local datetime string and add useUTCDate option #589

Closed
opened 2026-02-26 21:31:55 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dreamhunter2333/cloudflare_temp_email/pull/483
Author: @dreamhunter2333
Created: 11/14/2024
Status: Merged
Merged: 11/14/2024
Merged by: @dreamhunter2333

Base: mainHead: feature/dev


📝 Commits (1)

  • ce0232a feat: |UI| show local datetime string and add useUTCDate option

📊 Changes

7 files changed (+38 additions, -13 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 frontend/src/components/MailBox.vue (+6 -5)
📝 frontend/src/components/SendBox.vue (+6 -5)
📝 frontend/src/store/index.js (+2 -0)
📝 frontend/src/utils/index.ts (+14 -0)
📝 frontend/src/views/common/Appearance.vue (+6 -1)
📝 frontend/src/views/telegram/Mail.vue (+3 -2)

📄 Description

User description

#480


PR Type

enhancement, documentation


Description

  • Added a feature to display mail timestamps in the local timezone, with an option to toggle between local and UTC time.
  • Introduced a new global state useUTCDate to manage the timezone display setting.
  • Updated various components (MailBox.vue, SendBox.vue, Appearance.vue, Mail.vue) to use the new utcToLocalDate function for date conversion.
  • Enhanced the settings UI to include a switch for toggling between local and UTC time.
  • Updated the changelog to document the new feature.

Changes walkthrough 📝

Relevant files
Enhancement
MailBox.vue
Add local date display option in MailBox component             

frontend/src/components/MailBox.vue

  • Added utcToLocalDate function to convert UTC date to local date.
  • Introduced useUTCDate state to toggle between UTC and local date.
  • Updated date display logic to use utcToLocalDate.
  • +6/-5     
    SendBox.vue
    Add local date display option in SendBox component             

    frontend/src/components/SendBox.vue

  • Added utcToLocalDate function to convert UTC date to local date.
  • Introduced useUTCDate state to toggle between UTC and local date.
  • Updated date display logic to use utcToLocalDate.
  • +6/-5     
    Appearance.vue
    Add UTC date toggle option in Appearance settings               

    frontend/src/views/common/Appearance.vue

  • Added useUTCDate state to global settings.
  • Updated UI to include a switch for useUTCDate.
  • Added localization for the new setting.
  • +6/-1     
    Mail.vue
    Add local date display option in Telegram Mail view           

    frontend/src/views/telegram/Mail.vue

  • Added utcToLocalDate function to convert UTC date to local date.
  • Introduced useUTCDate state to toggle between UTC and local date.
  • Updated date display logic to use utcToLocalDate.
  • +1/-1     
    index.ts
    Add utility function for UTC to local date conversion       

    frontend/src/utils/index.ts

  • Added utcToLocalDate utility function to convert UTC date to local
    date.
  • Included error handling for date conversion.
  • +14/-0   
    index.js
    Add `useUTCDate` state to global store                                     

    frontend/src/store/index.js

  • Added useUTCDate state to global store.
  • Integrated useUTCDate with local storage.
  • +2/-0     
    Documentation
    CHANGELOG.md
    Update changelog for local timezone display feature           

    CHANGELOG.md

  • Documented the new feature for displaying mail time in local timezone.

  • +1/-0     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information


    🔄 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/dreamhunter2333/cloudflare_temp_email/pull/483 **Author:** [@dreamhunter2333](https://github.com/dreamhunter2333) **Created:** 11/14/2024 **Status:** ✅ Merged **Merged:** 11/14/2024 **Merged by:** [@dreamhunter2333](https://github.com/dreamhunter2333) **Base:** `main` ← **Head:** `feature/dev` --- ### 📝 Commits (1) - [`ce0232a`](https://github.com/dreamhunter2333/cloudflare_temp_email/commit/ce0232af88bd307112c33239e53147f45f6c486e) feat: |UI| show local datetime string and add useUTCDate option ### 📊 Changes **7 files changed** (+38 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `frontend/src/components/MailBox.vue` (+6 -5) 📝 `frontend/src/components/SendBox.vue` (+6 -5) 📝 `frontend/src/store/index.js` (+2 -0) 📝 `frontend/src/utils/index.ts` (+14 -0) 📝 `frontend/src/views/common/Appearance.vue` (+6 -1) 📝 `frontend/src/views/telegram/Mail.vue` (+3 -2) </details> ### 📄 Description ### **User description** #480 ___ ### **PR Type** enhancement, documentation ___ ### **Description** - Added a feature to display mail timestamps in the local timezone, with an option to toggle between local and UTC time. - Introduced a new global state `useUTCDate` to manage the timezone display setting. - Updated various components (`MailBox.vue`, `SendBox.vue`, `Appearance.vue`, `Mail.vue`) to use the new `utcToLocalDate` function for date conversion. - Enhanced the settings UI to include a switch for toggling between local and UTC time. - Updated the changelog to document the new feature. ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table> <tr> <td> <details> <summary><strong>MailBox.vue</strong><dd><code>Add local date display option in MailBox component</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> frontend/src/components/MailBox.vue <li>Added <code>utcToLocalDate</code> function to convert UTC date to local date.<br> <li> Introduced <code>useUTCDate</code> state to toggle between UTC and local date.<br> <li> Updated date display logic to use <code>utcToLocalDate</code>.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/483/files#diff-ce7b47744c9011a27a8297d8e5095ccb9609a6849a9afe1a37e04ae47b2636f2">+6/-5</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>SendBox.vue</strong><dd><code>Add local date display option in SendBox component</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> frontend/src/components/SendBox.vue <li>Added <code>utcToLocalDate</code> function to convert UTC date to local date.<br> <li> Introduced <code>useUTCDate</code> state to toggle between UTC and local date.<br> <li> Updated date display logic to use <code>utcToLocalDate</code>.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/483/files#diff-5f29f390fb4b77b6c18f0e6ea8b42b5fcb5bf9fcd321224f4e95f6b7c1d71a88">+6/-5</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>Appearance.vue</strong><dd><code>Add UTC date toggle option in Appearance settings</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> frontend/src/views/common/Appearance.vue <li>Added <code>useUTCDate</code> state to global settings.<br> <li> Updated UI to include a switch for <code>useUTCDate</code>.<br> <li> Added localization for the new setting.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/483/files#diff-d02c2c39a55f775fe7195ed01515b5b4d1554c2b39e32179930917bb765ccf1e">+6/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>Mail.vue</strong><dd><code>Add local date display option in Telegram Mail view</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> frontend/src/views/telegram/Mail.vue <li>Added <code>utcToLocalDate</code> function to convert UTC date to local date.<br> <li> Introduced <code>useUTCDate</code> state to toggle between UTC and local date.<br> <li> Updated date display logic to use <code>utcToLocalDate</code>.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/483/files#diff-0b8768ec002961fa240a6c2f0ee66bf1f1bddaaa4f85c179cda3985344f5dbd1">+1/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>index.ts</strong><dd><code>Add utility function for UTC to local date conversion</code>&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> frontend/src/utils/index.ts <li>Added <code>utcToLocalDate</code> utility function to convert UTC date to local <br>date.<br> <li> Included error handling for date conversion.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/483/files#diff-4c41e43cd3a94a8ff36b23d708cfd1553ffe5fc6fb2df4a9f7be56ecd43d442d">+14/-0</a>&nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>index.js</strong><dd><code>Add `useUTCDate` state to global store</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> frontend/src/store/index.js <li>Added <code>useUTCDate</code> state to global store.<br> <li> Integrated <code>useUTCDate</code> with local storage.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/483/files#diff-0c36ce15651c51795b411359e8caaf5af7960c82674b4f2015b8dd5f480fde2c">+2/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></td></tr><tr><td><strong>Documentation</strong></td><td><table> <tr> <td> <details> <summary><strong>CHANGELOG.md</strong><dd><code>Update changelog for local timezone display feature</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> CHANGELOG.md <li>Documented the new feature for displaying mail time in local timezone.<br> <br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/483/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed">+1/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></td></tr></tr></tbody></table> ___ > 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull request to receive relevant information --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
    kerem 2026-02-26 21:31:55 +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/cloudflare_temp_email#589
    No description provided.