From 7840e8b160cfb6044bf5c39dd7cc715d6a5e9c76 Mon Sep 17 00:00:00 2001 From: Urgau Date: Mon, 25 May 2026 22:49:18 +0200 Subject: [PATCH] Use GitHub `relative-time-element` library to display elapsed time --- src/gh_comments.rs | 31 +- .../relative-time-element@5.0.0.js | 853 ++++++++++++++++++ src/main.rs | 4 + 3 files changed, 876 insertions(+), 12 deletions(-) create mode 100644 src/gh_comments/relative-time-element@5.0.0.js diff --git a/src/gh_comments.rs b/src/gh_comments.rs index ab261668..99d22ce4 100644 --- a/src/gh_comments.rs +++ b/src/gh_comments.rs @@ -32,6 +32,7 @@ use crate::{ pub const STYLE_URL: &str = "/gh-comments/style@0.0.8.css"; pub const MARKDOWN_URL: &str = "/gh-comments/github-markdown@20260117.css"; pub const SELF_CONTAINED_URL: &str = "/gh-comments/self_contained@0.0.3.js"; +pub const RELATIVE_TIME_ELEMENT_URL: &str = "/gh-comments/relative-time-element@5.0.0.js"; pub const GH_COMMENTS_CACHE_CAPACITY_BYTES: usize = 35 * 1024 * 1024; // 35 Mb @@ -181,6 +182,7 @@ pub async fn gh_comments( +