show password compoenent
This commit is contained in:
parent
6b740a980b
commit
0421cb681c
7 changed files with 33 additions and 10 deletions
13
Cargo.lock
generated
13
Cargo.lock
generated
|
@ -281,7 +281,7 @@ dependencies = [
|
|||
"actix-threadpool",
|
||||
"actix-tls",
|
||||
"actix-utils",
|
||||
"actix-web-codegen",
|
||||
"actix-web-codegen 0.4.0",
|
||||
"awc",
|
||||
"bytes 0.5.6",
|
||||
"derive_more",
|
||||
|
@ -314,6 +314,16 @@ dependencies = [
|
|||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "actix-web-codegen"
|
||||
version = "0.5.0-beta.2"
|
||||
source = "git+https://github.com/realaravinth/actix-web#b91607bfb263d101c4a33b2b9b01b2093c1713d0"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "actix_derive"
|
||||
version = "0.5.0"
|
||||
|
@ -1301,6 +1311,7 @@ dependencies = [
|
|||
"actix-rt",
|
||||
"actix-service",
|
||||
"actix-web",
|
||||
"actix-web-codegen 0.5.0-beta.2",
|
||||
"argon2-creds",
|
||||
"cache-buster",
|
||||
"config",
|
||||
|
|
|
@ -29,6 +29,7 @@ actix-http = "2.2"
|
|||
actix-rt = "1"
|
||||
actix-cors= "0.5.4"
|
||||
actix-service = "1.0.6"
|
||||
my-codegen = {package = "actix-web-codegen", git ="https://github.com/realaravinth/actix-web"}
|
||||
|
||||
|
||||
mime_guess = "2.0.3"
|
||||
|
|
|
@ -27,6 +27,8 @@ use crate::errors::*;
|
|||
use crate::Data;
|
||||
use crate::*;
|
||||
|
||||
pub const AUTH: routes::Auth = routes::Auth::new();
|
||||
|
||||
pub mod routes {
|
||||
pub struct Auth {
|
||||
pub login: &'static str,
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
use actix_web::{HttpResponse, Responder};
|
||||
use lazy_static::lazy_static;
|
||||
use sailfish::TemplateOnce;
|
||||
use my_codegen::get;
|
||||
use crate::PAGES;
|
||||
|
||||
#[derive(Clone, TemplateOnce)]
|
||||
#[template(path = "auth/login/index.html")]
|
||||
|
@ -35,7 +37,11 @@ lazy_static! {
|
|||
static ref INDEX: String = IndexPage::default().render_once().unwrap();
|
||||
}
|
||||
|
||||
const ROUTE: &str = PAGES.auth.login;
|
||||
|
||||
#[get(path="ROUTE")]
|
||||
pub async fn login() -> impl Responder {
|
||||
struct Foo;
|
||||
HttpResponse::Ok()
|
||||
.content_type("text/html; charset=utf-8")
|
||||
.body(&*INDEX)
|
||||
|
|
|
@ -22,7 +22,8 @@ pub fn services(cfg: &mut actix_web::web::ServiceConfig) {
|
|||
use crate::define_resource;
|
||||
use crate::PAGES;
|
||||
|
||||
define_resource!(cfg, PAGES.auth.login, Methods::Get, login::login);
|
||||
cfg.service(login::login);
|
||||
// define_resource!(cfg, PAGES.auth.login, Methods::Get, login::login);
|
||||
define_resource!(cfg, PAGES.auth.join, Methods::Get, register::join);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<meta
|
||||
name="description"
|
||||
content="HTML and CSS Tips and Tricks for creating applications that are both responsive and accessible out of the box"
|
||||
content="mCaptcha is an AGPL'd, privacy focued, proof-of-work based CAPTCHA System"
|
||||
/>
|
||||
|
||||
<meta name="author" content="Aravinth Manivannan" />
|
||||
|
@ -36,7 +36,8 @@
|
|||
property="og:description"
|
||||
content="mCaptcha is an AGPL'd, privacy focued, proof-of-work based CAPTCHA System"
|
||||
/>
|
||||
<meta property="og:site_name" content="Responsible Web Applications" />
|
||||
<meta property="og:site_name"
|
||||
content="mCaptcha is an AGPL'd, privacy focued, proof-of-work based CAPTCHA System"
|
||||
/>
|
||||
</head>
|
||||
<body class="layout"></body>
|
||||
</html>
|
||||
<body class="layout">
|
||||
|
|
|
@ -18,10 +18,11 @@
|
|||
@import '../../vars';
|
||||
|
||||
$img-height: 0.69;
|
||||
$img-width: #{$form-input-height * $img-height};
|
||||
|
||||
@mixin show-password-img {
|
||||
display: block;
|
||||
width: #{$form-input-height * $img-height};
|
||||
width: $img-width;
|
||||
}
|
||||
|
||||
.show-password--show {
|
||||
|
@ -34,9 +35,9 @@ $img-height: 0.69;
|
|||
}
|
||||
|
||||
.show-password-container {
|
||||
position: absolute;
|
||||
right: 40px;
|
||||
margin-top: #{$form-input-height * $img-height / 2.5};
|
||||
position: relative;
|
||||
top: -#{$form-input-height * ($img-height * 1.15)};
|
||||
left: #{$form-content-width * 0.99};
|
||||
}
|
||||
|
||||
.show-password-container:hover {
|
||||
|
|
Loading…
Reference in a new issue