feat(gui): added relative time ago tooltip to timestamps#10325
feat(gui): added relative time ago tooltip to timestamps#10325Kaya-Sem wants to merge 2 commits intosyncthing:mainfrom
Conversation
|
I forgot internationalization. Displays always in english |
Yeah, this does need to work with translations. |
|
not sure what to make out of all those edits 😅 |
|
Please ignore the edits, I think with the moment.js library you could easily do translations like |
|
There are many places in the GUI where dates and times are presented. Is there something special about last scan to warrant special treatment, or should this be a more general thing? |
There is nothing special about it. If I can sort out the internationalization, this could be applied in other cases too. Although not sure if anyone wants this feature except me |
|
I don't particularly desire it, but I see no reason to reject it out of hand -- other than if it becomes a specific hack for the scan time. If it's applied to the timestamp there and in recent changes and last device connection time and maybe log popups etc would make sense. |
|
https://github.com/cmldk/HumanizeDuration.js provides relative time. If internationalization is needed, perhaps the easiest way would be to merge this fork's changes into https://github.com/rasa/HumanizeDuration.js, though I haven't looked into how easy that would be. |
I think I'll start with the |
For the record, we already use that package (to translate shorthand time formats). I think the package was first introduced into Syncthing maybe ~2 years ago or so, and it seemed like the only way to actually do what we needed, with the alternative being to translate everything ourselves. |
|
seems like a decent choice then |
Purpose
Adds a tooltip to the last scanned GUI row to show relative time. Implements #10324
Screenshots