[PR #17384] [CLOSED] UPD: Centralization of dayjs #11209

Closed
opened 2025-11-11 19:25:40 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/17384
Author: @rgaricano
Created: 9/12/2025
Status: Closed

Base: devHead: dev-Fix_dayjs


📝 Commits (5)

  • d830371 Global Dayjs Store
  • 61857eb Update dayjs.js - Include Global Locale
  • 66fa32f Update Collapsible.svelte - For Centralized dayjs
  • ea56aa5 Update Notes.svelte - For Centralize dayjs
  • e6f10aa Update NoteEditor.svelte - For Centralize dayjs

📊 Changes

5 files changed (+47 additions, -48 deletions)

View changed files

📝 src/lib/components/common/Collapsible.svelte (+1 -18)
📝 src/lib/components/notes/NoteEditor.svelte (+1 -15)
📝 src/lib/components/notes/Notes.svelte (+1 -15)
📝 src/lib/dayjs.js (+13 -0)
src/lib/stores/dayjs.js (+31 -0)

📄 Description

UPD: Centralization of dayjs

Centralization of dayjs localization for easier and more consistent across components.
Solve https://github.com/open-webui/open-webui/issues/17357

Added:
Global dayjs store at $lib/stores/dayjs.js

Modified:

  • $lib/dayjs.js to include global locale management.
  • Components: Collapsable, Notes & NoteEditor to use centralize dayjs

NOTE:
In future use of dayjs in components use import dayjs from '$lib/stores/dayjs'; instead of import dayjs from '$lib/dayjs'; + individual loadLocale

openwebui_fix_dayjs2
openwebui_fix_dayjs1
openwebui_fix_dayjs


Contributor License Agreement

By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.


🔄 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/open-webui/open-webui/pull/17384 **Author:** [@rgaricano](https://github.com/rgaricano) **Created:** 9/12/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `dev-Fix_dayjs` --- ### 📝 Commits (5) - [`d830371`](https://github.com/open-webui/open-webui/commit/d830371d9cc0a78b1490976655d2c681dd12127e) Global Dayjs Store - [`61857eb`](https://github.com/open-webui/open-webui/commit/61857eb5bb9852b3db51a3af2538c5b126bd94ad) Update dayjs.js - Include Global Locale - [`66fa32f`](https://github.com/open-webui/open-webui/commit/66fa32fbc12c110b77e3d259add6f1ba4dace729) Update Collapsible.svelte - For Centralized dayjs - [`ea56aa5`](https://github.com/open-webui/open-webui/commit/ea56aa58232f9a01b94f9fc3ba8083fd1f8c1236) Update Notes.svelte - For Centralize dayjs - [`e6f10aa`](https://github.com/open-webui/open-webui/commit/e6f10aa92a66fa9de0e1a266b3160d545311ff01) Update NoteEditor.svelte - For Centralize dayjs ### 📊 Changes **5 files changed** (+47 additions, -48 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/common/Collapsible.svelte` (+1 -18) 📝 `src/lib/components/notes/NoteEditor.svelte` (+1 -15) 📝 `src/lib/components/notes/Notes.svelte` (+1 -15) 📝 `src/lib/dayjs.js` (+13 -0) ➕ `src/lib/stores/dayjs.js` (+31 -0) </details> ### 📄 Description ### UPD: Centralization of dayjs Centralization of dayjs localization for easier and more consistent across components. Solve https://github.com/open-webui/open-webui/issues/17357 Added: Global dayjs store at $lib/stores/dayjs.js Modified: - $lib/dayjs.js to include global locale management. - Components: Collapsable, Notes & NoteEditor to use centralize dayjs NOTE: In future use of dayjs in components use `import dayjs from '$lib/stores/dayjs';` instead of `import dayjs from '$lib/dayjs';` + individual loadLocale ![openwebui_fix_dayjs2](https://github.com/user-attachments/assets/ae548698-0831-406b-962c-c28c63d030e6) ![openwebui_fix_dayjs1](https://github.com/user-attachments/assets/0018f3de-5d75-4250-b09f-900f72bdff54) ![openwebui_fix_dayjs](https://github.com/user-attachments/assets/9c5478ba-3258-4c10-a946-ca0f3707798b) ____ ### Contributor License Agreement By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-11 19:25:40 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#11209