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]
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"
env_logger = "0.7.1"
log = "0.4.8"

View File

@ -155,7 +155,10 @@ struct Config {
#[actix_rt::main]
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();
let pool: PgPool = setup_db().await;

View File

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

View File

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

View File

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

View File

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