Skip to content

Commit 2aff751

Browse files
committed
[FIX] webui-templates: update time-elements library
The `@github/time-element` library is now deprecated. Its authors recommend using `@github/relative-time-element` instead. This commit was motivated by the fact that Runboat uses the `<time-ago>` and `time-elements@latest` library, which currently points to version 4.0.0. In this release, the `<time-ago>` component was removed in favor of `<relative-time>`. Alternatively, pin the `time-elements@3.6.0` instead of `latest`.
1 parent abc930f commit 2aff751

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/runboat/webui-templates/runboat-build-element.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {LitElement, html, css} from 'https://esm.run/lit@2.1.2?module';
2-
import 'https://esm.run/@github/time-elements@latest?module';
2+
import 'https://esm.run/@github/relative-time-element@latest?module';
33

44
class RunboatBuildElement extends LitElement {
55
static get properties() {
@@ -36,9 +36,10 @@ class RunboatBuildElement extends LitElement {
3636
.build-status-failed {
3737
background-color: lightcoral;
3838
}
39-
time-ago {
39+
relative-time {
4040
color: gray;
4141
white-space: nowrap;
42+
font-size: small
4243
}
4344
p {
4445
margin-top: 0.5em;
@@ -61,7 +62,7 @@ class RunboatBuildElement extends LitElement {
6162
${this.build.commit_info?.git_commit?
6263
html`(<a href="${this.build.repo_commit_link}">${this.build.commit_info?.git_commit.substring(0, 8)}</a>)`:""
6364
}
64-
<time-ago datetime="${this.build.created}"></time-ago>
65+
<relative-time datetime="${this.build.created}"></relative-time>
6566
</p>
6667
<p>
6768
${this.build.status || "undeployed"}

0 commit comments

Comments
 (0)