configurable logging, mobile friendliness

This commit is contained in:
neri 2020-07-13 15:59:16 +02:00
parent 5fb444216e
commit 42a3d61db8
6 changed files with 13 additions and 4 deletions

View File

@ -8,7 +8,7 @@ edition = "2018"
[dependencies] [dependencies]
actix-web = { version = "2.0.0", default-features = false, features = [ "compress" ] } actix-web = { version = "2.0.0", default-features = false, features = [ "compress" ] }
sqlx = { version = "0.3.5", default-features = false, features = [ "runtime-async-std", "macros", "postgres", "chrono" ] } sqlx = { version = "0.3.5", default-features = false, features = [ "runtime-async-std", "postgres", "chrono" ] }
actix-rt = "1.1.1" actix-rt = "1.1.1"
env_logger = "0.7.1" env_logger = "0.7.1"
log = "0.4.8" log = "0.4.8"

View File

@ -155,7 +155,10 @@ struct Config {
#[actix_rt::main] #[actix_rt::main]
async fn main() -> std::io::Result<()> { async fn main() -> std::io::Result<()> {
std::env::set_var("RUST_LOG", "warn,datatrash=info,actix_web=info"); env::set_var(
"RUST_LOG",
env::var("RUST_LOG").unwrap_or_else(|_| "info".to_string()),
);
env_logger::init(); env_logger::init();
let pool: PgPool = setup_db().await; let pool: PgPool = setup_db().await;

View File

@ -1,5 +1,6 @@
body { body {
background-color: #222222; background-color: #222222;
margin: 0;
} }
main { main {
@ -7,6 +8,7 @@ main {
font-family: sans; font-family: sans;
max-width: 1200px; max-width: 1200px;
margin: 0 auto; margin: 0 auto;
padding: 1rem;
} }
h1 > a, h1 > a,
@ -35,6 +37,7 @@ textarea {
border: 2px solid #dddddd; border: 2px solid #dddddd;
border-radius: 5px; border-radius: 5px;
margin-bottom: 1rem; margin-bottom: 1rem;
max-width: calc(100vw - 3rem - 4px);
} }
input[type="submit"] { input[type="submit"] {

View File

@ -3,6 +3,7 @@
<head> <head>
<title>datatrash</title> <title>datatrash</title>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="/static/index.css" rel="stylesheet" /> <link href="/static/index.css" rel="stylesheet" />
</head> </head>
<body> <body>

View File

@ -3,13 +3,14 @@
<head> <head>
<title>datatrash</title> <title>datatrash</title>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="/static/index.css" rel="stylesheet" /> <link href="/static/index.css" rel="stylesheet" />
</head> </head>
<body> <body>
<main> <main>
<h1><a href="/">datatrash</a></h1> <h1><a href="/">datatrash</a></h1>
<p> <p>
Datei ist verfügbar unter Datei-Link:
<a href="{server}/file/{id}"> <a href="{server}/file/{id}">
{server}/files/{id} {server}/files/{id}
</a> </a>

View File

@ -3,6 +3,7 @@
<head> <head>
<title>datatrash</title> <title>datatrash</title>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="/static/index.css" rel="stylesheet" /> <link href="/static/index.css" rel="stylesheet" />
</head> </head>
<body> <body>