instance input for connecting to mastodon on existing accounts

This commit is contained in:
Lauren Liberda 2021-12-13 00:30:55 +01:00
parent ec48b9540a
commit e9fe1d10c8
No known key found for this signature in database
GPG Key ID: 734C629FD04BD319
1 changed files with 11 additions and 2 deletions

View File

@ -5,7 +5,15 @@
{{ providerOptions.name }}
</span>
<span v-if="connection === undefined">
<a :href="`${homeUrl}/api/user/social-redirect/${provider}/${config.locale}`" class="badge bg-light text-dark border">
<form :action="`${homeUrl}/api/user/social-redirect/${provider}/${config.locale}`"
v-if="providerOptions.instanceRequired" class="input-group input-group-sm">
<input type="text" name="instance" class="form-control"
:placeholder="$t('user.login.instancePlaceholder')">
<button type="submit" class="btn btn-outline-secondary">
<Icon v="link"/>
</button>
</form>
<a v-else :href="`${homeUrl}/api/user/social-redirect/${provider}/${config.locale}`" class="badge bg-light text-dark border">
<Icon v="link"/>
<T>user.socialConnection.connect</T>
</a>
@ -18,7 +26,8 @@
{{connection.name}}
</span>
<br class="d-md-none"/>
<a :href="`${homeUrl}/api/user/social-redirect/${provider}/${config.locale}`" class="badge bg-light text-dark border">
<a :href="`${homeUrl}/api/user/social-redirect/${provider}/${config.locale}` + (providerOptions.instanceRequired ? '?instance=' + connection.name.split('@')[1] : '')"
class="badge bg-light text-dark border">
<Icon v="sync"/>
<T>user.socialConnection.refresh</T>
</a>