diff --git a/resources/index.html b/resources/index.html index b2aecd5..6c914e0 100644 --- a/resources/index.html +++ b/resources/index.html @@ -318,13 +318,14 @@ (x) => x.id === parseInt(urlInput.value, 36) ) ) { - urlInput.classList.add("conflict"); + urlInput.setCustomValidity("ID already in use"); } else { - urlInput.classList.remove("conflict"); + urlInput.setCustomValidity(""); } submitButton.disabled = inputs[group].some( (input) => - input.validity != undefined && !input.validity.valid + input.validity !== undefined && + !input.validity.valid ); }; checkValidity(); @@ -394,6 +395,7 @@ fetch(url, { method: "PUT", body: JSON.stringify({ forward }), + headers: { "Content-Type": "application/json" }, }) .then((response) => { status = response.status; @@ -421,6 +423,7 @@ fetch(url, { method: "PUT", body: JSON.stringify({ contents, highlight }), + headers: { "Content-Type": "application/json" }, }) .then((response) => { status = response.status; diff --git a/src/setup.rs b/src/setup.rs index 01c3b44..81538b7 100644 --- a/src/setup.rs +++ b/src/setup.rs @@ -277,7 +277,7 @@ pub fn init(init: bool) -> Config { } let keep_empty = Confirmation::new() - .with_text("Are you sure you want to leave an empty password? This will disable authentication") + .with_text("Are you sure you want to leave an empty password? This will disable authentication.") .default(false) .interact() .unwrap_or_else(|e| {