mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
replace custom error view with staticview
This commit is contained in:
parent
fa8bec0b56
commit
de83d7740b
@ -26,7 +26,12 @@ export class RootView extends TemplateView {
|
|||||||
return t.mapView(vm => vm.activeSection, activeSection => {
|
return t.mapView(vm => vm.activeSection, activeSection => {
|
||||||
switch (activeSection) {
|
switch (activeSection) {
|
||||||
case "error":
|
case "error":
|
||||||
return new StatusView({header: "Something went wrong", message: vm.errorText});
|
return new StaticView(t => {
|
||||||
|
return t.div({className: "StatusView"}, [
|
||||||
|
t.h1("Something went wrong"),
|
||||||
|
t.p(vm.errorText),
|
||||||
|
])
|
||||||
|
});
|
||||||
case "session":
|
case "session":
|
||||||
return new SessionView(vm.sessionViewModel);
|
return new SessionView(vm.sessionViewModel);
|
||||||
case "login":
|
case "login":
|
||||||
@ -43,12 +48,3 @@ export class RootView extends TemplateView {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class StatusView extends TemplateView {
|
|
||||||
render(t, vm) {
|
|
||||||
return t.div({className: "StatusView"}, [
|
|
||||||
t.h1(vm.header),
|
|
||||||
t.p(vm.message),
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user