small front changes
This commit is contained in:
@@ -106,10 +106,7 @@ pub async fn publish_newsletter(
|
|||||||
.await
|
.await
|
||||||
.context("Failed to enqueue delivery tasks.")?;
|
.context("Failed to enqueue delivery tasks.")?;
|
||||||
|
|
||||||
let message = format!(
|
let message = String::from("Your email has been queued for delivery.");
|
||||||
r#"The newsletter issue "{}" has been published!"#,
|
|
||||||
form.title
|
|
||||||
);
|
|
||||||
let template = MessageTemplate::Success { message };
|
let template = MessageTemplate::Success { message };
|
||||||
let response = Html(template.render().unwrap()).into_response();
|
let response = Html(template.render().unwrap()).into_response();
|
||||||
let response = save_response(transaction, &idempotency_key, user_id, response)
|
let response = save_response(transaction, &idempotency_key, user_id, response)
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ pub async fn create_post(
|
|||||||
.context("Failed to enqueue delivery tasks.")?;
|
.context("Failed to enqueue delivery tasks.")?;
|
||||||
|
|
||||||
let template = MessageTemplate::Success {
|
let template = MessageTemplate::Success {
|
||||||
message: "Your new post has been saved. Subscribers will be notified.".into(),
|
message: "Your new post has been published!".into(),
|
||||||
};
|
};
|
||||||
let response = Html(template.render().unwrap()).into_response();
|
let response = Html(template.render().unwrap()).into_response();
|
||||||
let response = save_response(transaction, &idempotency_key, user_id, response)
|
let response = save_response(transaction, &idempotency_key, user_id, response)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<div class="flex-1 flex items-center justify-center">
|
<div class="flex-1 flex items-center justify-center">
|
||||||
<div class="max-w-4xl mx-auto text-center">
|
<div class="max-w-4xl mx-auto text-center">
|
||||||
<div class="mb-8">
|
<div class="mb-8">
|
||||||
<h1 class="text-4xl font-semibold text-red-600 mb-4">500</h1>
|
<h1 class="text-4xl font-semibold text-gray-700 mb-4">500</h1>
|
||||||
<h2 class="text-2xl font-semibold text-gray-500 mb-6">Internal Server Error</h2>
|
<h2 class="text-2xl font-semibold text-gray-500 mb-6">Internal Server Error</h2>
|
||||||
<p class="text-gray-600 mb-8 max-w-2xl mx-auto">
|
<p class="text-gray-600 mb-8 max-w-2xl mx-auto">
|
||||||
Something went wrong. Please try again in a few minutes or contact me if the problem persists.
|
Something went wrong. Please try again in a few minutes or contact me if the problem persists.
|
||||||
|
|||||||
@@ -101,7 +101,7 @@
|
|||||||
</svg>
|
</svg>
|
||||||
Write a new post
|
Write a new post
|
||||||
</h2>
|
</h2>
|
||||||
<p class="text-sm text-gray-600 mt-1">Publish a new post online.</p>
|
<p class="text-sm text-gray-600 mt-1">Publish a new post online. Subscribers will be notified.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-6">
|
<div class="p-6">
|
||||||
<form hx-post="/admin/posts"
|
<form hx-post="/admin/posts"
|
||||||
|
|||||||
Reference in New Issue
Block a user