Dashboard subscribers widget
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
use crate::{domain::PostEntry, routes::DashboardStats};
|
||||
use crate::{
|
||||
domain::{PostEntry, SubscriberEntry},
|
||||
routes::DashboardStats,
|
||||
};
|
||||
use askama::Template;
|
||||
use uuid::Uuid;
|
||||
|
||||
@@ -25,6 +28,9 @@ pub struct DashboardTemplate {
|
||||
pub idempotency_key_1: String,
|
||||
pub idempotency_key_2: String,
|
||||
pub stats: DashboardStats,
|
||||
pub subscribers: Vec<SubscriberEntry>,
|
||||
pub current_page: i64,
|
||||
pub max_page: i64,
|
||||
}
|
||||
|
||||
#[derive(Template)]
|
||||
@@ -51,6 +57,14 @@ pub struct PostTemplate {
|
||||
pub post: PostEntry,
|
||||
}
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(path = "dashboard.html", block = "subs")]
|
||||
pub struct SubListTemplate {
|
||||
pub subscribers: Vec<SubscriberEntry>,
|
||||
pub current_page: i64,
|
||||
pub max_page: i64,
|
||||
}
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(path = "confirm.html")]
|
||||
pub struct ConfirmTemplate;
|
||||
|
||||
Reference in New Issue
Block a user