use ActivityPub logo

This commit is contained in:
smitten 2023-07-26 12:18:17 -04:00
parent b842f17fd2
commit 9638a642c7
5 changed files with 30 additions and 27 deletions

View file

@ -0,0 +1,13 @@
const facActivityPub = {
prefix: "fac",
iconName: "activity-pub",
icon: [
512,
512,
[],
"",
"M 290.92666,118.68967 -10,292.14045 V 361.7994 L 230.32337,223.17809 v 277.9392 l 60.60329,34.13289 z m 59.90669,0 v 69.65894 L 591.85331,326.96993 350.83335,466.28782 v 68.96236 L 651.76,361.7994 v -69.65895 z m 0,139.3179 v 138.6213 L 471.34334,326.96993 Z M 170.41668,326.96993 49.906701,396.62887 170.41668,466.28782 Z"
]
}
export default facActivityPub

View file

@ -1,5 +1,6 @@
import Popover from '../popover/popover.vue'
import ConfirmModal from '../confirm_modal/confirm_modal.vue'
import facActivityPub from '../../assets/icons/activity-pub'
import { library } from '@fortawesome/fontawesome-svg-core'
import {
faEllipsisH,
@ -10,7 +11,6 @@ import {
faExternalLinkAlt,
faHistory,
faFilePen,
faCircleNodes,
} from '@fortawesome/free-solid-svg-icons'
import {
faBookmark as faBookmarkReg,
@ -18,19 +18,6 @@ import {
} from '@fortawesome/free-regular-svg-icons'
import { mapState } from 'vuex'
// TODO - Consider another icon here? Some kind of node graph
// const facFediverse = {
// prefix: "fac",
// iconName: "fediverse",
// icon: [
// 512,
// 512,
// [],
// "f0000",
// "m 95.502029,190.43105 a 53.875516,53.865668 0 0 1 0.59263,11.02116 53.875516,53.865668 0 0 1 -5.59941,21.09705 l 79.273101,12.72998 15.5809,-30.42157 z m 135.865981,21.81479 -15.58244,30.42462 187.30544,30.07648 a 53.875517,53.865668 0 0 1 -0.54375,-10.72642 53.875517,53.865668 0 0 1 5.74757,-21.36431 z m 66.51786,-82.91758 a 53.875516,53.865668 0 0 1 -27.35709,5.85037 53.875516,53.865668 0 0 1 -4.71506,-0.49479 l 12.37034,79.19752 33.7538,5.41515 z m -12.51238,130.59553 29.248,187.24674 a 53.875517,53.865668 0 0 1 26.52161,-5.42886 53.875517,53.865668 0 0 1 5.63608,0.61848 L 319.12882,265.3374 Z M 220.35705,90.081498 80.7062,160.84021 A 53.875517,53.865668 0 0 1 95.402749,189.837 L 235.05207,119.07524 A 53.875516,53.865668 0 0 1 220.35705,90.081498 Z M 91.204009,201.18619 A 48.977741,48.968787 0 0 1 39.634902,247.41911 48.977741,48.968787 0 0 1 -6.6064739,195.85943 48.977741,48.968787 0 0 1 44.962636,149.6265 48.977741,48.968787 0 0 1 91.204009,201.18619 Z M 131.2238,457.13565 A 48.977741,48.968787 0 0 1 79.654691,503.36857 48.977741,48.968787 0 0 1 33.413315,451.80889 48.977741,48.968787 0 0 1 84.982429,405.57598 48.977741,48.968787 0 0 1 131.2238,457.13565 Z m 255.89363,41.05477 a 48.977741,48.968787 0 0 1 -51.56914,46.23294 48.977741,48.968787 0 0 1 -46.24137,-51.5597 48.977741,48.968787 0 0 1 51.5691,-46.23291 48.977741,48.968787 0 0 1 46.24141,51.55967 z m 118.1311,-230.5762 a 48.977741,48.968787 0 0 1 -51.56911,46.23294 48.977741,48.968787 0 0 1 -46.24136,-51.5597 48.977741,48.968787 0 0 1 51.5691,-46.23292 48.977741,48.968787 0 0 1 46.24137,51.55968 z M 322.364,84.055525 A 48.977741,48.968787 0 0 1 270.79489,130.28845 48.977741,48.968787 0 0 1 224.55353,78.728768 48.977741,48.968787 0 0 1 276.12263,32.495842 48.977741,48.968787 0 0 1 322.364,84.055525 Z m -1.17625,22.210305 a 53.875516,53.865668 0 0 1 -23.04681,22.93416 l 110.47312,110.87899 a 53.875517,53.865668 0 0 1 23.04527,-22.93417 z m 97.29172,196.93171 -71.33525,139.23894 a 53.875516,53.865668 0 0 1 28.9303,14.84202 L 447.40825,318.04107 A 53.875517,53.865668 0 0 1 418.47947,303.19754 Z M 135.55022,446.55205 a 53.875516,53.865668 0 0 1 0.5636,10.85015 53.875516,53.865668 0 0 1 -5.68342,21.25128 l 154.55055,24.7957 a 53.875517,53.865668 0 0 1 -0.56514,-10.85166 53.875517,53.865668 0 0 1 5.68495,-21.24974 z M 66.28305,246.68218 a 53.875516,53.865668 0 0 1 -26.914153,5.62588 53.875516,53.865668 0 0 1 -5.200765,-0.54362 l 24.166379,154.54822 a 53.875517,53.865668 0 0 1 26.914148,-5.62585 53.875517,53.865668 0 0 1 5.19771,0.54363 z M 235.59735,119.6418 153.89112,279.12263 178.01473,303.33498 264.5246,134.48227 A 53.875516,53.865668 0 0 1 235.59735,119.6418 Z M 132.64053,320.60202 91.254359,401.38163 a 53.875517,53.865668 0 0 1 28.924201,14.83894 l 36.58406,-71.40773 z m 270.60016,-46.96632 -71.61476,36.28724 5.28019,33.76902 81.0296,-41.05947 A 53.875517,53.865668 0 0 1 403.24069,273.6357 Z m -113.18881,57.35222 -169.32805,85.79921 a 53.875516,53.865668 0 0 1 14.69808,28.99986 L 295.33208,364.75845 Z M 90.027859,223.3968 a 53.875516,53.865668 0 0 1 -23.042207,22.93109 l 126.498488,126.96864 30.49741,-15.45285 z m 166.855211,167.46914 -30.49741,15.45284 64.09695,64.33567 a 53.875517,53.865668 0 0 1 23.0468,-22.93414 z"
// ]
// }
library.add(
faEllipsisH,
faBookmark,
@ -39,7 +26,7 @@ library.add(
faThumbtack,
faShareAlt,
faExternalLinkAlt,
faCircleNodes,
facActivityPub,
faFlag,
faHistory,
faFilePen
@ -111,7 +98,7 @@ const ExtraButtons = {
.catch(err => this.$emit('onError', err.error.error))
},
copyFediLink () {
navigator.clipboard.writeText(this.fediLink)
navigator.clipboard.writeText(this.fediLinkURL)
.then(() => this.$emit('onSuccess'))
.catch(err => this.$emit('onError', err.error.error))
},
@ -206,8 +193,12 @@ const ExtraButtons = {
return this.status.external_url
}
},
fediLink () {
return this.statusLink.replace(/^https/, 'web+ap')
fediLinkURL () {
try {
return this.statusLink.replace(/^https?/, 'web+ap')
} catch (e) {
return null
}
},
shouldConfirmDelete () {
return this.$store.getters.mergedConfig.modalOnDelete

View file

@ -128,14 +128,14 @@
/><span>{{ $t("status.copy_link") }}</span>
</button>
<button
v-if="loggedIn"
v-if="fediLinkURL && loggedIn"
class="button-default dropdown-item dropdown-item-icon"
@click.prevent="copyFediLink"
@click="close"
>
<FAIcon
fixed-width
icon="circle-nodes"
:icon="['fac', 'activity-pub']"
/><span>{{ $t("status.copy_fedi_link") }}</span>
</button>
<a
@ -151,15 +151,15 @@
/><span>{{ $t("status.external_source") }}</span>
</a>
<a
v-if="!loggedIn"
v-if="fediLinkURL && !loggedIn"
class="button-default dropdown-item dropdown-item-icon"
title="Source"
:href="fediLink"
:href="fediLinkURL"
target="_blank"
>
<FAIcon
fixed-width
icon="circle-nodes"
:icon="['fac', 'activity-pub']"
/><span>{{ $t("status.open_fedi_link") }}</span>
</a>
<button

View file

@ -8,6 +8,7 @@ import Select from '../select/select.vue'
import RichContent from 'src/components/rich_content/rich_content.jsx'
import ConfirmModal from '../confirm_modal/confirm_modal.vue'
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
import facActivityPub from '../../assets/icons/activity-pub'
import { mapGetters } from 'vuex'
import { library } from '@fortawesome/fontawesome-svg-core'
import {
@ -16,7 +17,6 @@ import {
faSearchPlus,
faExternalLinkAlt,
faEdit,
faCircleNodes
} from '@fortawesome/free-solid-svg-icons'
library.add(
@ -25,7 +25,7 @@ library.add(
faSearchPlus,
faExternalLinkAlt,
faEdit,
faCircleNodes
facActivityPub
)
export default {
@ -47,7 +47,6 @@ export default {
return this.$store.getters.findUser(this.userId)
},
fediLinkURL () {
console.log(this.user)
try {
return this.user._original.pleroma.ap_id.replace(/^https?/, 'web+ap')
} catch (e) {

View file

@ -77,7 +77,7 @@
>
<FAIcon
class="icon"
icon="circle-nodes"
:icon="['fac', 'activity-pub']"
/>
</a>
<a