Merge pull request 'Move to action area after liking/boosting/commenting' (#1074) from action-id into main

Reviewed-on: https://git.joinplu.me/Plume/Plume/pulls/1074
This commit is contained in:
KitaitiMakoto 2022-05-08 10:24:15 +00:00
commit a9219efee4
2 changed files with 9 additions and 8 deletions

View File

@ -8,13 +8,14 @@
- Basque language (#1013) - Basque language (#1013)
- Unit tests for ActivityPub (#1021) - Unit tests for ActivityPub (#1021)
- Move to action area after liking/boosting/commenting (#1074)
### Changed ### Changed
- Bump Rust to nightly 2022-01-26 (#1015) - Bump Rust to nightly 2022-01-26 (#1015)
- Remove "Latest articles" timeline (#1069) - Remove "Latest articles" timeline (#1069)
- Change order of timeline tabs (#1069, #1070, #1072) - Change order of timeline tabs (#1069, #1070, #1072)
- Migrate ActivityPub-related crates from activitypub 0.1 to activitystreams 0.7 - Migrate ActivityPub-related crates from activitypub 0.1 to activitystreams 0.7 (#1022)
### Fixed ### Fixed

View File

@ -78,7 +78,7 @@
</section> </section>
@if ctx.2.is_some() { @if ctx.2.is_some() {
<section class="actions"> <section class="actions">
<form class="likes" action="@uri!(likes::create: blog = &blog.fqn, slug = &article.slug)" method="POST"> <form id="likes" class="likes" action="@uri!(likes::create: blog = &blog.fqn, slug = &article.slug)#likes" method="POST">
<p aria-label="@i18n!(ctx.1, "One like", "{0} likes"; n_likes)" title="@i18n!(ctx.1, "One like", "{0} likes"; n_likes)"> <p aria-label="@i18n!(ctx.1, "One like", "{0} likes"; n_likes)" title="@i18n!(ctx.1, "One like", "{0} likes"; n_likes)">
@n_likes @n_likes
</p> </p>
@ -89,7 +89,7 @@
<button type="submit" class="action">@icon!("heart") @i18n!(ctx.1, "Add yours")</button> <button type="submit" class="action">@icon!("heart") @i18n!(ctx.1, "Add yours")</button>
} }
</form> </form>
<form class="reshares" action="@uri!(reshares::create: blog = &blog.fqn, slug = &article.slug)" method="POST"> <form id="reshares" class="reshares" action="@uri!(reshares::create: blog = &blog.fqn, slug = &article.slug)#reshares" method="POST">
<p aria-label="@i18n!(ctx.1, "One boost", "{0} boosts"; n_reshares)" title="@i18n!(ctx.1, "One boost", "{0} boosts"; n_reshares)"> <p aria-label="@i18n!(ctx.1, "One boost", "{0} boosts"; n_reshares)" title="@i18n!(ctx.1, "One boost", "{0} boosts"; n_reshares)">
@n_reshares @n_reshares
</p> </p>
@ -108,14 +108,14 @@
)) ))
</p> </p>
<section class="actions"> <section class="actions">
<div class="likes"> <div id="likes" class="likes">
<p aria-label="@i18n!(ctx.1, "One like", "{0} likes"; n_likes)" title="@i18n!(ctx.1, "One like", "{0} likes"; n_likes)"> <p aria-label="@i18n!(ctx.1, "One like", "{0} likes"; n_likes)" title="@i18n!(ctx.1, "One like", "{0} likes"; n_likes)">
@n_likes @n_likes
</p> </p>
<a href="@uri!(posts::remote_interact: blog_name = &blog.fqn, slug = &article.slug)" class="action">@icon!("heart") @i18n!(ctx.1, "Add yours")</a> <a href="@uri!(posts::remote_interact: blog_name = &blog.fqn, slug = &article.slug)" class="action">@icon!("heart") @i18n!(ctx.1, "Add yours")</a>
</div> </div>
<div class="reshares"> <div id="reshares" class="reshares">
<p aria-label="@i18n!(ctx.1, "One boost", "{0} boost"; n_reshares)" title="@i18n!(ctx.1, "One boost", "{0} boosts"; n_reshares)"> <p aria-label="@i18n!(ctx.1, "One boost", "{0} boost"; n_reshares)" title="@i18n!(ctx.1, "One boost", "{0} boosts"; n_reshares)">
@n_reshares @n_reshares
</p> </p>
@ -140,11 +140,11 @@
} }
</div> </div>
</section> </section>
<section class="comments" dir="auto"> <section id="comments" class="comments" dir="auto">
<h2>@i18n!(ctx.1, "Comments")</h2> <h2>@i18n!(ctx.1, "Comments")</h2>
@if ctx.2.is_some() { @if ctx.2.is_some() {
<form method="post" action="@uri!(comments::create: blog_name = &blog.fqn, slug = &article.slug)"> <form method="post" action="@uri!(comments::create: blog_name = &blog.fqn, slug = &article.slug)#comments">
@(Input::new("warning", i18n!(ctx.1, "Content warning")) @(Input::new("warning", i18n!(ctx.1, "Content warning"))
.default(&comment_form.warning) .default(&comment_form.warning)
.error(&comment_errors) .error(&comment_errors)
@ -155,7 +155,7 @@
@if let Some(ref prev) = previous_comment { @if let Some(ref prev) = previous_comment {
<input type="hidden" name="responding_to" value="@prev.id"/> <input type="hidden" name="responding_to" value="@prev.id"/>
} }
<textarea id="plume-editor" name="content" dir="auto">@comment_form.content</textarea> <textarea id="plume-editor" name="content" dir="auto" required>@comment_form.content</textarea>
<input type="submit" value="@i18n!(ctx.1, "Submit comment")" /> <input type="submit" value="@i18n!(ctx.1, "Submit comment")" />
</form> </form>
} }