slack status without the slack status.zzstoatzz.io
hatk statusphere
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at 03546a3f62f8a305e602c02e0b2db23b852aed30 51 lines 1.2 kB view raw
1///The askama template types for HTML 2/// 3use crate::db::StatusFromDb; 4use askama::Template; 5use serde::{Deserialize, Serialize}; 6 7#[derive(Serialize, Deserialize, Debug, Clone)] 8pub struct Profile { 9 pub did: String, 10 pub display_name: Option<String>, 11 pub handle: Option<String>, 12} 13 14#[derive(Template)] 15#[template(path = "login.html")] 16pub struct LoginTemplate<'a> { 17 #[allow(dead_code)] 18 pub title: &'a str, 19 pub error: Option<&'a str>, 20} 21 22#[derive(Template)] 23#[template(path = "error.html")] 24pub struct ErrorTemplate<'a> { 25 #[allow(dead_code)] 26 pub title: &'a str, 27 pub error: &'a str, 28} 29 30#[derive(Template)] 31#[template(path = "status.html")] 32pub struct StatusTemplate<'a> { 33 #[allow(dead_code)] 34 pub title: &'a str, 35 pub handle: String, 36 pub current_status: Option<StatusFromDb>, 37 pub history: Vec<StatusFromDb>, 38 pub is_owner: bool, 39 pub is_admin: bool, 40} 41 42#[derive(Template)] 43#[template(path = "feed.html")] 44pub struct FeedTemplate<'a> { 45 #[allow(dead_code)] 46 pub title: &'a str, 47 pub profile: Option<Profile>, 48 pub statuses: Vec<StatusFromDb>, 49 pub is_admin: bool, 50 pub dev_mode: bool, 51}