mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
show eventkey in ui for debugging purposes
This commit is contained in:
parent
a59014475b
commit
e3b4f898d0
@ -58,4 +58,8 @@ export default class SimpleTile {
|
|||||||
updateNextSibling(next) {
|
updateNextSibling(next) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get internalId() {
|
||||||
|
return this._entry.asEventKey().toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ export default class TimelineTile {
|
|||||||
function renderTile(tile) {
|
function renderTile(tile) {
|
||||||
switch (tile.shape) {
|
switch (tile.shape) {
|
||||||
case "message":
|
case "message":
|
||||||
return html.li(null, tile.label);
|
return html.li(null, [html.strong(null, tile.internalId+" "), tile.label]);
|
||||||
case "gap": {
|
case "gap": {
|
||||||
const button = html.button(null, (tile.isUp ? "🠝" : "🠟") + " fill gap");
|
const button = html.button(null, (tile.isUp ? "🠝" : "🠟") + " fill gap");
|
||||||
const handler = () => {
|
const handler = () => {
|
||||||
@ -31,11 +31,11 @@ function renderTile(tile) {
|
|||||||
button.removeEventListener("click", handler);
|
button.removeEventListener("click", handler);
|
||||||
};
|
};
|
||||||
button.addEventListener("click", handler);
|
button.addEventListener("click", handler);
|
||||||
return html.li(null, button);
|
return html.li(null, [html.strong(null, tile.internalId+" "), button]);
|
||||||
}
|
}
|
||||||
case "announcement":
|
case "announcement":
|
||||||
return html.li(null, tile.label);
|
return html.li(null, [html.strong(null, tile.internalId+" "), tile.label]);
|
||||||
default:
|
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 New Issue
Block a user