diff --git a/Cargo.lock b/Cargo.lock index bdca66b..2de1a38 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -424,7 +424,7 @@ dependencies = [ [[package]] name = "datatrash" -version = "2.2.2" +version = "2.3.0" dependencies = [ "actix-files", "actix-governor", diff --git a/Cargo.toml b/Cargo.toml index 85c071d..1c6c115 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "datatrash" -version = "2.2.2" +version = "2.3.0" authors = ["neri"] edition = "2021" diff --git a/static/index.css b/static/index.css index cb978be..96382f9 100644 --- a/static/index.css +++ b/static/index.css @@ -157,6 +157,19 @@ a.button:visited { color: var(--fg-light); } +.usage > p { + display: flex; + flex-direction: column; +} + +.usage > p > label { + font-weight: 500; +} + +.usage > p > code { + margin-left: 1rem; +} + .large-link { display: inline-block; margin-bottom: 1em; diff --git a/static/origin.js b/static/origin.js new file mode 100644 index 0000000..610addc --- /dev/null +++ b/static/origin.js @@ -0,0 +1,4 @@ +const originSpans = document.querySelectorAll(".origin"); +for (const originSpan of originSpans) { + originSpan.textContent = window.location.origin; +} diff --git a/template/index.html b/template/index.html index 7641fc9..183c352 100644 --- a/template/index.html +++ b/template/index.html @@ -40,22 +40,41 @@
nutzung als api -
-datei hochladen
-  curl -F 'file=@yourfile.rs' <domain>/upload
-
-text hochladen
-  curl -F 'text=your text' <domain>/upload
-
-zeitbegrenzung setzen
-  curl -F 'text=your text' -F 'keep_for=1800' <domain>/upload
-
-nach einem download löschen
-  curl -F 'text=your text' -F 'delete_on_download=true' <domain>/upload
-
-authentifizieren
-  curl -F 'text=your text' -F 'password=…' <domain>/upload
+

+ + curl -F 'file=@yourfile.rs' + <origin>/upload +

+

+ + curl -F 'text=your text' + <origin>/upload +

+

+ + curl -F 'text=your text' -F 'keep_for=1800' + <origin>/upload +

+

+ + curl -F 'text=your text' -F 'delete_on_download=true' + <origin>/upload +

+

+ + curl -F 'text=your text' -F 'password=…' + <origin>/upload +

+