aboutsummaryrefslogtreecommitdiffstats
path: root/teleterm-web/src/views/page.rs
blob: 350e981360cce929a3ea80a5fb17c579ab28e0da (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::prelude::*;

pub(crate) fn render(model: &crate::model::Model) -> Vec<Node<crate::Msg>> {
    let mut view = vec![seed::h1![model.title()]];

    if !model.logged_in() {
        view.extend(super::login::render(model))
    } else if model.watching() {
        view.extend(super::watch::render(model))
    } else {
        view.extend(super::list::render(model))
    }

    view
}