mirror of
https://github.com/ViViDboarder/bitwarden_rs.git
synced 2024-11-22 13:16:39 +00:00
Implement unofficial warning message
This commit is contained in:
parent
8b07ecb937
commit
c5aef60bd7
13
src/main.rs
13
src/main.rs
@ -21,7 +21,7 @@ extern crate derive_more;
|
|||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate num_derive;
|
extern crate num_derive;
|
||||||
|
|
||||||
use rocket::Rocket;
|
use rocket::{fairing::AdHoc, Rocket};
|
||||||
use std::{
|
use std::{
|
||||||
path::Path,
|
path::Path,
|
||||||
process::{exit, Command},
|
process::{exit, Command},
|
||||||
@ -47,6 +47,7 @@ fn init_rocket() -> Rocket {
|
|||||||
.manage(db::init_pool())
|
.manage(db::init_pool())
|
||||||
.manage(api::start_notification_server())
|
.manage(api::start_notification_server())
|
||||||
.attach(util::AppHeaders())
|
.attach(util::AppHeaders())
|
||||||
|
.attach(unofficial_warning())
|
||||||
}
|
}
|
||||||
|
|
||||||
// Embed the migrations from the migrations folder into the application
|
// Embed the migrations from the migrations folder into the application
|
||||||
@ -219,6 +220,16 @@ fn check_web_vault() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn unofficial_warning() -> AdHoc {
|
||||||
|
AdHoc::on_launch("Unofficial Warning", |_| {
|
||||||
|
warn!("/--------------------------------------------------------------------\\");
|
||||||
|
warn!("| This is an *unofficial* Bitwarden implementation, DO NOT use the |");
|
||||||
|
warn!("| official channels to report bugs/features, regardless of client. |");
|
||||||
|
warn!("| Report URL: https://github.com/dani-garcia/bitwarden_rs/issues/new |");
|
||||||
|
warn!("\\--------------------------------------------------------------------/");
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
// Load the config from .env or from environment variables
|
// Load the config from .env or from environment variables
|
||||||
static ref CONFIG: Config = Config::load();
|
static ref CONFIG: Config = Config::load();
|
||||||
|
Loading…
Reference in New Issue
Block a user