1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-22 08:42:32 -05:00
forgejo/web_src/js/utils
silverwind 427ab550a6
Set user's 24h preference from their current OS locale (#29651)
Fixes: https://github.com/go-gitea/gitea/issues/28371

Fixed by using a JS solution that formats according to `lang`, but alters the 24h format setting as per user's locale. This will work for all tooltips:

<img width="243" alt="Screenshot 2024-03-07 at 23 03 35" src="https://github.com/go-gitea/gitea/assets/115237/6d16c71c-6786-4eda-8cdc-50ec68ba62c6">
<img width="250" alt="Screenshot 2024-03-07 at 23 03 17" src="https://github.com/go-gitea/gitea/assets/115237/4e26bbb7-12df-4b81-bd37-14705e87e8f7">
<img width="310" alt="Screenshot 2024-03-07 at 23 14 34" src="https://github.com/go-gitea/gitea/assets/115237/1ef599f0-6401-4e19-b1da-59cdfc09b0f6">

I think there is only one other place in the UI where we render such absolute dates, which is in the actions view and which I've also fixed:

<img width="275" alt="Screenshot 2024-03-07 at 23 04 00" src="https://github.com/go-gitea/gitea/assets/115237/df0fbe1f-96ee-4338-ab5e-2b10e215005d">

(cherry picked from commit f86e9a03673b70d660a4b7a1e53748757d7a45fa)
2024-03-11 23:36:59 +07:00
..
color.js Implement code frequency graph (#29191) 2024-02-26 22:30:26 +01:00
color.test.js Use vitest globals (#27102) 2023-09-27 04:37:13 +00:00
dom.js Remove jQuery from the Unicode escape button (#29369) 2024-02-26 22:30:27 +01:00
image.js Downscale pasted PNG images based on metadata (#29123) 2024-02-19 22:58:33 +01:00
image.test.js Downscale pasted PNG images based on metadata (#29123) 2024-02-19 22:58:33 +01:00
match.js Avoiding accessing undefined mentionValues (#26461) 2023-08-12 08:36:23 +00:00
match.test.js Use vitest globals (#27102) 2023-09-27 04:37:13 +00:00
time.js Set user's 24h preference from their current OS locale (#29651) 2024-03-11 23:36:59 +07:00
time.test.js Implement contributors graph (#27882) 2024-02-17 23:24:31 +01:00
url.js Refactor branch/tag selector to Vue SFC (#23421) 2023-03-14 17:51:20 +08:00
url.test.js Use vitest globals (#27102) 2023-09-27 04:37:13 +00:00