datatrash
- + ++ Herunterladen +
diff --git a/src/main.rs b/src/main.rs
index 83a50cf..304e26c 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -110,7 +110,7 @@ async fn download(
let mut path = config.files_dir.clone();
path.push(&file_id);
- if kind == FileKind::TEXT.to_string() {
+ if kind == FileKind::TEXT.to_string() && !req.query_string().contains("raw") {
let content = fs::read_to_string(path).await.map_err(|_| {
error::ErrorInternalServerError("this file should be here but could not be found")
})?;
diff --git a/static/index.css b/static/index.css
index d639a79..4aaa4a7 100644
--- a/static/index.css
+++ b/static/index.css
@@ -30,7 +30,9 @@ label {
input,
select,
-textarea {
+textarea,
+.button,
+.button:visited {
background-color: #222222;
color: #dddddd;
padding: 0.5rem;
@@ -40,6 +42,19 @@ textarea {
max-width: calc(100vw - 3rem - 4px);
}
-input[type="submit"] {
+.button {
+ cursor: pointer;
+ text-decoration: none;
+}
+
+.button:hover {
+ background-color: #444444;
+}
+
+.button.main {
background-color: green;
}
+
+.button.main:hover {
+ background-color: forestgreen;
+}
diff --git a/template/index.html b/template/index.html
index b5a9fc0..ce2e145 100644
--- a/template/index.html
+++ b/template/index.html
@@ -29,7 +29,7 @@
-
+