social login providers - change order and give buttons more breathing space

This commit is contained in:
Andrea Vos 2022-12-09 20:04:04 +01:00
parent 7504b37254
commit 659a95b6fd
2 changed files with 14 additions and 8 deletions

View File

@ -1,5 +1,6 @@
<template>
<div v-if="options.instanceRequired && formShown" class="btn border-primary text-primary">
<div class="p-1">
<Icon :v="options.icon || provider" set="b"/>
{{ options.name }}
@ -11,13 +12,16 @@
<Icon v="arrow-right"/>
</button>
</form>
</div>
</div>
<button v-else-if="options.instanceRequired && !formShown"
class="btn btn-outline-primary"
class="btn btn-outline-primary p-2"
@click="showForm">
<div class="p-1">
<Icon :v="options.icon || provider" set="b"
:class="[options.icon && options.icon.endsWith('.png') ? 'mx-1 invertible' : '']"/>
{{ options.name }}
</div>
</button>
<a v-else-if="options.deprecated" :href="link"
class="btn btn-outline-secondary btn-sm"
@ -29,8 +33,10 @@
<a v-else :href="link"
class="btn btn-outline-primary"
>
<div class="p-1">
<Icon :v="options.icon || provider" set="b"/>
{{ options.name }}
</div>
</a>
</template>

View File

@ -14,13 +14,6 @@ export const socialProviders = {
iconMargin: true,
avatars: false,
},
twitter: {
name: 'Twitter',
linkRegex: (p) => `^https?://(?:www.)?twitter.com/${p.name}/?$`,
redirectViaHome: true,
avatars: true,
deprecated: 'https://en.pronouns.page/blog/twitter-login-deprecated',
},
discord: {
name: 'Discord',
redirectViaHome: true,
@ -31,6 +24,13 @@ export const socialProviders = {
redirectViaHome: true,
avatars: true,
},
twitter: {
name: 'Twitter',
linkRegex: (p) => `^https?://(?:www.)?twitter.com/${p.name}/?$`,
redirectViaHome: true,
avatars: true,
deprecated: 'https://en.pronouns.page/blog/twitter-login-deprecated',
},
facebook: {
name: 'Facebook',
redirectViaHome: true,