mirror of
https://gitlab.com/itsulu-odoo/runboat.git
synced 2026-05-30 23:41:27 +00:00
[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`.
This commit is contained in:
parent
abc930fd6d
commit
2aff7512bc
1 changed files with 4 additions and 3 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
import {LitElement, html, css} from 'https://esm.run/lit@2.1.2?module';
|
import {LitElement, html, css} from 'https://esm.run/lit@2.1.2?module';
|
||||||
import 'https://esm.run/@github/time-elements@latest?module';
|
import 'https://esm.run/@github/relative-time-element@latest?module';
|
||||||
|
|
||||||
class RunboatBuildElement extends LitElement {
|
class RunboatBuildElement extends LitElement {
|
||||||
static get properties() {
|
static get properties() {
|
||||||
|
|
@ -36,9 +36,10 @@ class RunboatBuildElement extends LitElement {
|
||||||
.build-status-failed {
|
.build-status-failed {
|
||||||
background-color: lightcoral;
|
background-color: lightcoral;
|
||||||
}
|
}
|
||||||
time-ago {
|
relative-time {
|
||||||
color: gray;
|
color: gray;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
font-size: small
|
||||||
}
|
}
|
||||||
p {
|
p {
|
||||||
margin-top: 0.5em;
|
margin-top: 0.5em;
|
||||||
|
|
@ -61,7 +62,7 @@ class RunboatBuildElement extends LitElement {
|
||||||
${this.build.commit_info?.git_commit?
|
${this.build.commit_info?.git_commit?
|
||||||
html`(<a href="${this.build.repo_commit_link}">${this.build.commit_info?.git_commit.substring(0, 8)}</a>)`:""
|
html`(<a href="${this.build.repo_commit_link}">${this.build.commit_info?.git_commit.substring(0, 8)}</a>)`:""
|
||||||
}
|
}
|
||||||
<time-ago datetime="${this.build.created}"></time-ago>
|
<relative-time datetime="${this.build.created}"></relative-time>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
${this.build.status || "undeployed"}
|
${this.build.status || "undeployed"}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue