forked from mystiq/hydrogen-web
show eventkey in ui for debugging purposes
This commit is contained in:
parent
a59014475b
commit
e3b4f898d0
2 changed files with 8 additions and 4 deletions
|
@ -58,4 +58,8 @@ export default class SimpleTile {
|
|||
updateNextSibling(next) {
|
||||
|
||||
}
|
||||
|
||||
get internalId() {
|
||||
return this._entry.asEventKey().toString();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ export default class TimelineTile {
|
|||
function renderTile(tile) {
|
||||
switch (tile.shape) {
|
||||
case "message":
|
||||
return html.li(null, tile.label);
|
||||
return html.li(null, [html.strong(null, tile.internalId+" "), tile.label]);
|
||||
case "gap": {
|
||||
const button = html.button(null, (tile.isUp ? "🠝" : "🠟") + " fill gap");
|
||||
const handler = () => {
|
||||
|
@ -31,11 +31,11 @@ function renderTile(tile) {
|
|||
button.removeEventListener("click", handler);
|
||||
};
|
||||
button.addEventListener("click", handler);
|
||||
return html.li(null, button);
|
||||
return html.li(null, [html.strong(null, tile.internalId+" "), button]);
|
||||
}
|
||||
case "announcement":
|
||||
return html.li(null, tile.label);
|
||||
return html.li(null, [html.strong(null, tile.internalId+" "), tile.label]);
|
||||
default:
|
||||
return html.li(null, "unknown tile shape: " + tile.shape);
|
||||
return html.li(null, [html.strong(null, tile.internalId+" "), "unknown tile shape: " + tile.shape]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue