when using macros!() we need to import the things that they use

This commit is contained in:
Igor Galić 2020-01-27 23:45:09 +01:00
parent 45c335e17b
commit 022e037eea
No known key found for this signature in database
GPG Key ID: ACFEFF7F6A123A86
6 changed files with 12 additions and 1 deletions

View File

@ -7,6 +7,7 @@ use rocket_i18n::I18n;
use scheduled_thread_pool::ScheduledThreadPool; use scheduled_thread_pool::ScheduledThreadPool;
use serde_json; use serde_json;
use std::str::FromStr; use std::str::FromStr;
use std::path::PathBuf;
use validator::{Validate, ValidationErrors}; use validator::{Validate, ValidationErrors};
use crate::inbox; use crate::inbox;

View File

@ -11,7 +11,7 @@ use std::{
use validator::{Validate, ValidationError, ValidationErrors}; use validator::{Validate, ValidationError, ValidationErrors};
use crate::routes::{ use crate::routes::{
comments::NewCommentForm, errors::ErrorPage, ContentLen, RemoteForm, RespondOrRedirect, comments::NewCommentForm, errors::ErrorPage, Page, ContentLen, RemoteForm, RespondOrRedirect,
}; };
use crate::template_utils::{IntoContext, Ructe}; use crate::template_utils::{IntoContext, Ructe};
use plume_common::activity_pub::{broadcast, ActivityStream, ApRequest}; use plume_common::activity_pub::{broadcast, ActivityStream, ApRequest};

View File

@ -1,8 +1,12 @@
@use plume_models::CONFIG; @use plume_models::CONFIG;
@use plume_models::instance::Instance; @use plume_models::instance::Instance;
@use rocket::http::RawStr;
@use rocket::request::Form;
@use std::path::Path; @use std::path::Path;
@use std::path::PathBuf;
@use crate::template_utils::*; @use crate::template_utils::*;
@use crate::routes::*; @use crate::routes::*;
@use crate::routes::search::SearchQuery;
@(ctx: BaseContext, title: String, head: Content, header: Content, content: Content) @(ctx: BaseContext, title: String, head: Content, header: Content, content: Content)

View File

@ -2,7 +2,9 @@
@use plume_models::instance::Instance; @use plume_models::instance::Instance;
@use plume_models::posts::Post; @use plume_models::posts::Post;
@use plume_models::users::User; @use plume_models::users::User;
@use rocket::http::RawStr;
@use std::path::Path; @use std::path::Path;
@use std::path::PathBuf;
@use crate::templates::{base, partials::post_card}; @use crate::templates::{base, partials::post_card};
@use crate::template_utils::*; @use crate::template_utils::*;
@use crate::routes::*; @use crate::routes::*;

View File

@ -5,10 +5,12 @@
@use crate::template_utils::*; @use crate::template_utils::*;
@use crate::templates::base; @use crate::templates::base;
@use crate::templates::partials::image_select; @use crate::templates::partials::image_select;
@use crate::routes::Page;
@use crate::routes::blogs; @use crate::routes::blogs;
@use crate::routes::blogs::EditForm; @use crate::routes::blogs::EditForm;
@use crate::routes::medias; @use crate::routes::medias;
@(ctx: BaseContext, blog: &Blog, medias: Vec<Media>, form: &EditForm, errors: ValidationErrors) @(ctx: BaseContext, blog: &Blog, medias: Vec<Media>, form: &EditForm, errors: ValidationErrors)
@:base(ctx, i18n!(ctx.1, "Edit \"{}\""; &blog.title), {}, { @:base(ctx, i18n!(ctx.1, "Edit \"{}\""; &blog.title), {}, {

View File

@ -3,7 +3,9 @@
@use plume_models::posts::Post; @use plume_models::posts::Post;
@use plume_models::tags::Tag; @use plume_models::tags::Tag;
@use plume_models::users::User; @use plume_models::users::User;
@use rocket::http::RawStr;
@use std::path::Path; @use std::path::Path;
@use std::path::PathBuf;
@use validator::ValidationErrors; @use validator::ValidationErrors;
@use crate::templates::{base, partials::comment}; @use crate::templates::{base, partials::comment};
@use crate::template_utils::*; @use crate::template_utils::*;