mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
Use t instead of tag
This commit is contained in:
parent
f01d5d95d9
commit
7f1b3e25e8
@ -15,7 +15,6 @@ limitations under the License.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import {renderStaticAvatar} from "../../../avatar";
|
import {renderStaticAvatar} from "../../../avatar";
|
||||||
import {tag} from "../../../general/html";
|
|
||||||
import {TemplateView} from "../../../general/TemplateView";
|
import {TemplateView} from "../../../general/TemplateView";
|
||||||
import {viewClassForEntry} from "../TimelineView";
|
import {viewClassForEntry} from "../TimelineView";
|
||||||
|
|
||||||
@ -29,7 +28,7 @@ export class ReplyPreviewView extends TemplateView {
|
|||||||
const viewClass = viewClassForEntry(vm);
|
const viewClass = viewClassForEntry(vm);
|
||||||
const view = new viewClass(vm)
|
const view = new viewClass(vm)
|
||||||
const rendered = this._renderContent(t, vm, view);
|
const rendered = this._renderContent(t, vm, view);
|
||||||
return this._renderReplyHeader(vm, [rendered]);
|
return this._renderReplyHeader(t, vm, [rendered]);
|
||||||
}
|
}
|
||||||
|
|
||||||
_renderContent(t, vm, view) {
|
_renderContent(t, vm, view) {
|
||||||
@ -42,12 +41,12 @@ export class ReplyPreviewView extends TemplateView {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_renderReplyHeader(vm, children = []) {
|
_renderReplyHeader(t, vm, children = []) {
|
||||||
return tag.blockquote(
|
return t.blockquote(
|
||||||
[
|
[
|
||||||
tag.a({ className: "link", href: `https://matrix.to/#/${vm.roomId}/${vm.eventId}` }, "In reply to"),
|
t.a({ className: "link", href: `https://matrix.to/#/${vm.roomId}/${vm.eventId}` }, "In reply to"),
|
||||||
tag.a({ className: "pill", href: `https://matrix.to/#/${vm.sender}` }, [renderStaticAvatar(vm, 12, undefined, true), vm.displayName]),
|
t.a({ className: "pill", href: `https://matrix.to/#/${vm.sender}` }, [renderStaticAvatar(vm, 12, undefined, true), vm.displayName]),
|
||||||
tag.br(),
|
t.br(),
|
||||||
...children
|
...children
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user