1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-04 16:09:59 +00:00

style: following, follows you, mutual

This commit is contained in:
patak 2022-11-24 09:54:52 +01:00
parent 5aea158cf0
commit 70645180aa
3 changed files with 56 additions and 5 deletions

View file

@ -17,16 +17,20 @@ async function toggleFollow() {
<template>
<button
v-if="!isSelf && relationship"
flex gap-1 items-center h-fit rounded hover="op100 text-white b-purple" group
flex gap-1 items-center h-fit rounded hover="op100 text-white b-orange" group
@click="toggleFollow"
>
<div rounded w-28 p2 :group-hover="relationship?.following ? 'bg-red/30' : 'bg-purple/30'" :class="!relationship?.following ? 'bg-cyan/10' : ' bg-purple/10'">
<div rounded w-28 p2 :group-hover="relationship?.following ? 'bg-red/75' : 'bg-orange/40'" :class="!relationship?.following ? relationship?.followedBy ? 'bg-orange/20' : 'bg-white/10' : relationship?.followedBy ? ' bg-orange/70' : 'bg-orange/50'">
<template v-if="relationship?.following">
<span group-hover="hidden">Following</span>
<span group-hover="hidden">{{ relationship?.followedBy ? 'Mutual' : 'Following' }}</span>
<span hidden group-hover="inline">Unfollow</span>
</template>
<template v-else-if="relationship?.followedBy">
<span group-hover="hidden">Follows you</span>
<span hidden group-hover="inline">Follow back</span>
</template>
<template v-else>
{{ relationship?.followedBy ? 'Follow back' : 'Follow' }}
<span>Follow</span>
</template>
</div>
</button>

View file

@ -10,7 +10,7 @@ const { notification } = defineProps<{
<div flex flex-col>
<template v-if="notification.type === 'follow'">
<div flex ml-4 items-center>
<div i-ri:user-follow-fill mr-3 color-purple />
<div i-ri:user-follow-fill mr-3 color-primary />
<AccountLink :account="notification.account" mr1 /> followed you
</div>
<AccountCard :account="notification.account" p3 />

View file

@ -0,0 +1,47 @@
{
"mastodon.social": {
"id": "1505854",
"name": "Elk",
"website": null,
"redirect_uri": "urn:ietf:wg:oauth:2.0:oob\nhttp://localhost:3000/api/mastodon.social/oauth\nhttps://elk.netlify.app/api/mastodon.social/oauth\nhttps://elk.zone/api/mastodon.social/oauth",
"client_id": "MsxxG2t3ETcH0oNL571ckUfwUOmWhBPBK6EWrnSSqgg",
"client_secret": "V6p1tuKpoVJ2QR2zbBqxVxDhsFtjPIfpc946_sQxFn8",
"vapid_key": "BCk-QqERU0q-CfYZjcuB6lnyyOYfJ2AifKqfeGIm7Z-HiTU5T9eTG5GxVA0_OH5mMlI4UkkDTpaZwozy0TzdZ2M="
},
"mas.to": {
"id": "218417",
"name": "Elk",
"website": null,
"redirect_uri": "urn:ietf:wg:oauth:2.0:oob\nhttp://localhost:3000/api/mas.to/oauth\nhttps://elk.netlify.app/api/mas.to/oauth\nhttps://elk.zone/api/mas.to/oauth",
"client_id": "b076ebc4xMQQI80m0aGxW6B41st33mOaARnrSc379L0",
"client_secret": "wEuorjZ5QkmyCFgGVzcHZdYV31uY4-YNkdBg7Wah7XA",
"vapid_key": "BN3Nf2bG70_5AVlWDOw9AJQwkrXS6WQPNkLIKlYSkWjYxPSqAJ6oxEzNYMNQhFch1gCyTAuI4fu5z1uyboHLO0o="
},
"fosstodon.org": {
"id": "101752",
"name": "Elk",
"website": null,
"redirect_uri": "urn:ietf:wg:oauth:2.0:oob\nhttp://localhost:3000/api/fosstodon.org/oauth\nhttps://elk.netlify.app/api/fosstodon.org/oauth\nhttps://elk.zone/api/fosstodon.org/oauth",
"client_id": "uNXRXIjQRJUEs5Zg-86E5FUCsMQX-BHeoetqn11TEwc",
"client_secret": "GALHIKfNfHyEA72-6fzNMJp8lsfbhTTu_7wMC3IEFs4",
"vapid_key": "BHKY6hkaUL7WByhqx8H8Knbfrpixu8vqTNjiu3XblHR-H6eY2ZD9LYe7fUxOuav6eCfwmK2LHWmzL22vvwN8B2E="
},
"m.cmx.im": {
"id": "91206",
"name": "Elk",
"website": null,
"redirect_uri": "urn:ietf:wg:oauth:2.0:oob\nhttp://localhost:3000/api/m.cmx.im/oauth\nhttps://elk.netlify.app/api/m.cmx.im/oauth\nhttps://elk.zone/api/m.cmx.im/oauth",
"client_id": "-wu49ZeEI3oDca7ZKsFPiGr6kUNmIlISgbMtjCtOYL8",
"client_secret": "8Dhgwn0rs6-HYl7GYGyMTBXlfv7r8ZrkxcjA46jbodU",
"vapid_key": "BOtsUyc0M779KJ0j-AAsv_wANoDuLkh6tTh6l1muA8OY3xVs34iGsUichN7VXNxcMoGKdSbyIEZsnsbJf6e46DA"
},
"mastodon.world": {
"id": "189312",
"name": "Elk",
"website": null,
"redirect_uri": "urn:ietf:wg:oauth:2.0:oob\nhttp://localhost:3000/api/mastodon.world/oauth\nhttps://elk.netlify.app/api/mastodon.world/oauth\nhttps://elk.zone/api/mastodon.world/oauth",
"client_id": "s_t9JSDmAVbkQuZ38LApZZO12-nFYjUyloiMObOK0X0",
"client_secret": "YpYOn-k3VBa4uY7pS1uHtC2qxxm0lpMITulwsZUOB4c",
"vapid_key": ""
}
}