Plume/templates/remote_interact_base.rs.html
fdb-hiroshima 0d708e1639 Add support for remote interact (#519)
Add support for remote interaction ([this thing](https://eldritch.cafe/users/Barmaid/remote_follow) in mastodon)

- [x] create the endpoint dispatching remote interactions to local pages
- [x] add this endpoint to web-finger
- [x] propose remote interaction when following and not connected
- [x] propose remote interaction when liking/sharing and not connected
- [x] propose remote interaction when commenting and not connected
- [x] fetch posts/comments we don't know but remote interaction was requested for ?
2019-04-17 21:09:07 +01:00

33 lines
1.2 KiB
HTML

@use templates::base;
@use routes::session::LoginForm;
@use routes::RemoteForm;
@use template_utils::*;
@use validator::ValidationErrors;
@(ctx: BaseContext, title: String, login_msg: String, remote_msg: String, header: Content, login_form: LoginForm, login_errs: ValidationErrors, remote_form: RemoteForm, remote_errs: ValidationErrors)
@:base(ctx, title, {}, {}, {
<div>
<header class="center">
@:header()
</header>
<div class="split">
<form method="post" action="/login">
<h2>@i18n!(ctx.1, "I'm from this instance")</h2>
<p>@login_msg</p>
@input!(ctx.1, email_or_name (text), "Username, or email", login_form, login_errs.clone(), "minlenght=\"1\"")
@input!(ctx.1, password (password), "Password", login_form, login_errs, "minlenght=\"1\"")
<input type="submit" value="@i18n!(ctx.1, "Log in")" />
</form>
<form method="post">
<h2>@i18n!(ctx.1, "I'm from another instance")</h2>
<p>@remote_msg</p>
@input!(ctx.1, remote (text), "Username", "Example: user@plu.me", remote_form, remote_errs.clone(), "minlenght=\"1\"")
<input type="submit" value="@i18n!(ctx.1, "Continue to your instance")"/>
</form>
</div>
</div>
})