Add some feedback when performing some actions (#552)

* Add a way to display flash messages

* Make the flash messages look nice

* Add actual feedback messages

* cargo fmt

* Move flash messages to PlumeRocket

And add trait to convert PlumeRocket to BaseContext

* Remove useless lifetime
This commit is contained in:
Baptiste Gelez
2019-04-30 11:04:25 +01:00
committed by GitHub
parent 18ae6e26b3
commit 8f1ab3485e
40 changed files with 3255 additions and 445 deletions
-3
View File
@@ -45,7 +45,6 @@ use plume_models::{
search::{Searcher as UnmanagedSearcher, SearcherError},
Connection, Error, CONFIG,
};
use rocket::State;
use rocket_csrf::CsrfFairingBuilder;
use scheduled_thread_pool::ScheduledThreadPool;
use std::process::exit;
@@ -69,8 +68,6 @@ include!(concat!(env!("OUT_DIR"), "/templates.rs"));
compile_i18n!();
type Searcher<'a> = State<'a, Arc<UnmanagedSearcher>>;
/// Initializes a database pool.
fn init_pool() -> Option<DbPool> {
dotenv::dotenv().ok();