mirror of
https://github.com/elk-zone/elk.git
synced 2025-03-04 07:05:36 +03:00
feat: support local-only posts from Hometown
This checks the ActivityPub object for any given status to see if it has a `localOnly` property. If it does and it is set to true, then a local-only icon is displayed in the `StatusAction` bar. This mimicks the current Hometown layout and behavior.
This commit is contained in:
parent
3563b58651
commit
23ba49f33e
2 changed files with 15 additions and 1 deletions
|
@ -105,7 +105,7 @@ const reply = () => {
|
||||||
</StatusActionButton>
|
</StatusActionButton>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div flex-none>
|
<div :class="status.localOnly ? 'flex-1' : 'flex-none'">
|
||||||
<StatusActionButton
|
<StatusActionButton
|
||||||
:content="$t('action.bookmark')"
|
:content="$t('action.bookmark')"
|
||||||
color="text-yellow" hover="text-yellow" group-hover="bg-yellow/10"
|
color="text-yellow" hover="text-yellow" group-hover="bg-yellow/10"
|
||||||
|
@ -117,5 +117,18 @@ const reply = () => {
|
||||||
@click="toggleBookmark()"
|
@click="toggleBookmark()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
v-if="status.localOnly"
|
||||||
|
class="i-ri:link-unlink-m local-only"
|
||||||
|
flex-none
|
||||||
|
text-secondary
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.local-only {
|
||||||
|
margin: 0.5em;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -53,6 +53,7 @@
|
||||||
"favourite": "Favorite",
|
"favourite": "Favorite",
|
||||||
"favourite_count": "{0}",
|
"favourite_count": "{0}",
|
||||||
"favourited": "Favorited",
|
"favourited": "Favorited",
|
||||||
|
"local_only": "Local only",
|
||||||
"more": "More",
|
"more": "More",
|
||||||
"next": "Next",
|
"next": "Next",
|
||||||
"prev": "Prev",
|
"prev": "Prev",
|
||||||
|
|
Loading…
Add table
Reference in a new issue