Browse Source
			
			
			Modified navigation bar and corrected some comments
			
			
				pull/321/head
			
			
		 
		
			
				
					
						 Daniel García
					
					7 years ago
						Daniel García
					
					7 years ago
					
				 
				
			 
		 
		
			
				
					
					No known key found for this signature in database
					
						
							GPG Key ID: FC8A7D14C3CD543A
						
					
				
			
		
		
		
	
		
			
				 2 changed files with 
6 additions and 
7 deletions
			 
			
		 
		
			
				- 
					
					
					 
					src/error.rs
				
- 
					
					
					 
					src/static/admin.html
				
				
				
					
						
							
								
									
	
		
			
				
					|  |  | @ -24,7 +24,7 @@ macro_rules! make_error { | 
			
		
	
		
			
				
					|  |  |  |                    $struct::$name(e, _) => $struct::$name(e, msg.into()), | 
			
		
	
		
			
				
					|  |  |  |                 )+} | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |             // First value is log message, second is user message
 | 
			
		
	
		
			
				
					|  |  |  |             // Prints the log message and returns the user message
 | 
			
		
	
		
			
				
					|  |  |  |             pub fn display_error(self) -> String { | 
			
		
	
		
			
				
					|  |  |  |                 match &self {$( | 
			
		
	
		
			
				
					|  |  |  |                    $struct::$name(e, s) => { | 
			
		
	
	
		
			
				
					|  |  | @ -32,7 +32,7 @@ macro_rules! make_error { | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |                         error!("{}", log_msg); | 
			
		
	
		
			
				
					|  |  |  |                         if $show_cause { | 
			
		
	
		
			
				
					|  |  |  |                             error!("[CAUSE] {:?}", e); | 
			
		
	
		
			
				
					|  |  |  |                             error!("[CAUSE] {:#?}", e); | 
			
		
	
		
			
				
					|  |  |  |                         } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |                         $usr_msg_fun(e, s) | 
			
		
	
	
		
			
				
					|  |  | @ -40,7 +40,6 @@ macro_rules! make_error { | 
			
		
	
		
			
				
					|  |  |  |                 )+} | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     }; | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | @ -124,7 +123,7 @@ use rocket::response::{self, Responder, Response}; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | impl<'r> Responder<'r> for Error { | 
			
		
	
		
			
				
					|  |  |  |     fn respond_to(self, _: &Request) -> response::Result<'r> { | 
			
		
	
		
			
				
					|  |  |  |         // TODO: We could put the security headers here
 | 
			
		
	
		
			
				
					|  |  |  |         // TODO: We could put the security headers here, but it would only apply to the errors
 | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         let usr_msg = self.display_error(); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | 
 | 
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				
					|  |  | @ -127,14 +127,14 @@ | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | <body class="bg-light"> | 
			
		
	
		
			
				
					|  |  |  |     <nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top shadow"> | 
			
		
	
		
			
				
					|  |  |  |         <a class="navbar-brand" href="#">Bitwarden_rs Admin</a> | 
			
		
	
		
			
				
					|  |  |  |         <a class="navbar-brand" href="#">Bitwarden_rs</a> | 
			
		
	
		
			
				
					|  |  |  |         <div class="navbar-collapse"> | 
			
		
	
		
			
				
					|  |  |  |             <ul class="navbar-nav"> | 
			
		
	
		
			
				
					|  |  |  |                 <li class="nav-item active"> | 
			
		
	
		
			
				
					|  |  |  |                     <a class="nav-link" href="#">Dashboard</a> | 
			
		
	
		
			
				
					|  |  |  |                     <a class="nav-link" href="/admin">Admin Panel</a> | 
			
		
	
		
			
				
					|  |  |  |                 </li> | 
			
		
	
		
			
				
					|  |  |  |                 <li class="nav-item"> | 
			
		
	
		
			
				
					|  |  |  |                     <a class="nav-link" href="#">Other</a> | 
			
		
	
		
			
				
					|  |  |  |                     <a class="nav-link" href="/">Vault</a> | 
			
		
	
		
			
				
					|  |  |  |                 </li> | 
			
		
	
		
			
				
					|  |  |  |             </ul> | 
			
		
	
		
			
				
					|  |  |  |         </div> | 
			
		
	
	
		
			
				
					|  |  | 
 |