mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
fix(fedi): better remote AP instance display, help address #387
This commit is contained in:
parent
e17ee4982c
commit
c38e5d984e
3 changed files with 15 additions and 10 deletions
|
@ -14,14 +14,14 @@ v-footer(aria-label='Footer')
|
|||
v-btn.ml-1(v-bind='attrs' v-on='on' color='primary' text) {{ settings.trusted_instances_label || $t('admin.trusted_instances_label_default')}}
|
||||
v-list(subheaders two-lines max-width=550)
|
||||
v-list-item(v-for='instance in trusted_instances'
|
||||
:key='instance.name'
|
||||
:key='instance.ap_id'
|
||||
target='_blank'
|
||||
:href='instance?.object?.url ?? instance?.ap_id'
|
||||
two-line)
|
||||
v-list-item-avatar
|
||||
v-img(:src='instance?.object?.icon?.url ?? `${instance.url}/favicon.ico`')
|
||||
v-list-item-content
|
||||
v-list-item-title {{instance?.instance?.data?.metadata?.nodeLabel ?? instance?.object?.name ?? instance?.object?.preferredUsername }} - {{ instance?.object?.url ?? instance?.ap_id }}
|
||||
v-list-item-title {{ instance?.object?.name ?? instance?.object?.preferredUsername }}
|
||||
v-list-item-subtitle {{ instance?.object?.summary ?? instance?.instance?.data?.metadata?.nodeDescription }}
|
||||
|
||||
v-btn.ml-1(v-if='settings.enable_federation' color='primary' text rel='me' @click.prevent='showFollowMe=true') {{$t('event.interact_with_me')}}
|
||||
|
|
|
@ -50,18 +50,22 @@ v-container
|
|||
//- @focus='searchActors'
|
||||
v-autocomplete(v-model='filterActors'
|
||||
cache-items
|
||||
:prepend-inner-icon="mdiTagMultiple"
|
||||
:prepend-inner-icon="mdiWeb"
|
||||
chips small-chips multiple deletable-chips hide-no-data hide-selected persistent-hint
|
||||
:disabled="!collection.id"
|
||||
placeholder='Local'
|
||||
return-object
|
||||
item-value='ap_id'
|
||||
item-text='instanceDomain'
|
||||
item-text='ap_id'
|
||||
:delimiters="[',', ';']"
|
||||
:items="actors"
|
||||
:label="$t('common.trusted_instances')")
|
||||
template(v-slot:item="{ item }")
|
||||
v-list-item-content @{{ item?.object?.preferredUsername }}@{{ item?.instanceDomain }}
|
||||
v-list-item-avatar
|
||||
v-img(:src='item?.object?.icon?.url ?? `${item.url}/favicon.ico`')
|
||||
v-list-item-content
|
||||
v-list-item-title {{ item?.object?.name }}
|
||||
v-list-item-subtitle @{{ item?.object?.preferredUsername }}@{{ item?.instanceDomain }}
|
||||
template(v-slot:selection="{ item, on, attrs, selected, parent }")
|
||||
v-chip(v-bind="attrs" close :close-icon='mdiCloseCircle' @click:close='parent.selectItem(item)'
|
||||
:input-value="selected" label small) @{{ item?.object?.preferredUsername }}@{{ item?.instanceDomain }}
|
||||
|
@ -156,12 +160,12 @@ import debounce from 'lodash/debounce'
|
|||
import isEqual from 'lodash/isEqual'
|
||||
import sortBy from 'lodash/sortBy'
|
||||
|
||||
import { mdiPencil, mdiChevronLeft, mdiChevronRight, mdiMagnify, mdiPlus, mdiTagMultiple, mdiMapMarker, mdiDeleteForever, mdiCloseCircle, mdiChevronDown } from '@mdi/js'
|
||||
import { mdiPencil, mdiChevronLeft, mdiChevronRight, mdiMagnify, mdiPlus, mdiTagMultiple, mdiMapMarker, mdiDeleteForever, mdiCloseCircle, mdiChevronDown, mdiWeb } from '@mdi/js'
|
||||
|
||||
export default {
|
||||
data({ $store }) {
|
||||
return {
|
||||
mdiPencil, mdiChevronRight, mdiChevronLeft, mdiMagnify, mdiPlus, mdiTagMultiple, mdiMapMarker, mdiDeleteForever, mdiCloseCircle, mdiChevronDown,
|
||||
mdiPencil, mdiChevronRight, mdiChevronLeft, mdiMagnify, mdiPlus, mdiTagMultiple, mdiMapMarker, mdiDeleteForever, mdiCloseCircle, mdiChevronDown, mdiWeb,
|
||||
loading: false,
|
||||
dialog: false,
|
||||
valid: false,
|
||||
|
|
|
@ -75,11 +75,12 @@ v-container
|
|||
template(v-slot:item.logo="{item}")
|
||||
v-img(height=20 width=20 :src="item?.object?.icon?.url")
|
||||
template(v-slot:item.name="{item}")
|
||||
span @{{ item?.object?.name ?? item?.instance?.data?.metadata?.nodeName}}@{{ item.instance.domain }}
|
||||
span {{ item.object.name }}<br/>
|
||||
span @{{ item?.object?.preferredUsername ?? item?.instance?.data?.metadata?.nodeName}}@{{ item.instance.domain }}
|
||||
template(v-slot:item.info="{item}")
|
||||
span {{ item?.object?.summary ?? item?.instance?.data?.metadata?.nodeDescription}} / {{ item.instance.name }}
|
||||
span {{ item?.object?.summary ?? item?.instance?.data?.metadata?.nodeDescription}}
|
||||
template(v-slot:item.url="{item}")
|
||||
a(:href='item.ap_id') {{ item.ap_id }}
|
||||
a(:href='item.object.url') {{ item.object.url }}
|
||||
template(v-slot:item.following="{ item }")
|
||||
v-switch(:input-value='item.following' :disabled='item.loading' :loading="item.loading === true" @change="() => toggleFollowing(item)" inset hide-details)
|
||||
template(v-slot:item.follower="{item}")
|
||||
|
|
Loading…
Reference in a new issue