2020-07-25 21:41:22 +02:00
|
|
|
<template lang="pug">
|
2022-07-01 15:55:09 +02:00
|
|
|
v-footer(aria-label='Footer')
|
2021-05-19 16:17:48 +02:00
|
|
|
|
2022-07-01 15:55:09 +02:00
|
|
|
v-dialog(v-model='showFollowMe' destroy-on-close max-width='700px' :fullscreen='$vuetify.breakpoint.xsOnly')
|
|
|
|
FollowMe(@close='showFollowMe=false' is-dialog)
|
2021-05-19 16:17:48 +02:00
|
|
|
|
2022-07-01 15:55:09 +02:00
|
|
|
v-btn.ml-1(v-for='link in footerLinks'
|
|
|
|
:key='link.label' color='primary' text
|
|
|
|
:href='link.href' :to='link.to' :target="link.href && '_blank'") {{link.label}}
|
2020-11-17 00:31:55 +01:00
|
|
|
|
2022-07-01 15:55:09 +02:00
|
|
|
v-menu(v-if='settings.enable_trusted_instances && settings.trusted_instances && settings.trusted_instances.length'
|
|
|
|
offset-y bottom open-on-hover transition="slide-y-transition")
|
|
|
|
template(v-slot:activator="{ on, attrs }")
|
2022-11-21 00:52:02 +01:00
|
|
|
v-btn.ml-1(v-bind='attrs' v-on='on' color='primary' text) {{ settings.trusted_instances_label || $t('admin.trusted_instances_label_default')}}
|
2022-07-01 15:55:09 +02:00
|
|
|
v-list(subheaders two-lines)
|
|
|
|
v-list-item(v-for='instance in settings.trusted_instances'
|
|
|
|
:key='instance.name'
|
|
|
|
target='_blank'
|
|
|
|
:href='instance.url'
|
|
|
|
two-line)
|
|
|
|
v-list-item-avatar
|
|
|
|
v-img(:src='`${instance.url}/logo.png`')
|
|
|
|
v-list-item-content
|
|
|
|
v-list-item-title {{instance.name}}
|
|
|
|
v-list-item-subtitle {{instance.label}}
|
2020-11-17 00:31:55 +01:00
|
|
|
|
2022-07-01 15:55:09 +02:00
|
|
|
v-btn.ml-1(v-if='settings.enable_federation' color='primary' text rel='me' @click.prevent='showFollowMe=true') {{$t('event.interact_with_me')}}
|
2022-11-24 01:00:30 +01:00
|
|
|
v-spacer
|
|
|
|
v-btn(color='primary' text href='https://gancio.org' target='_blank' rel="noopener") Gancio <small>{{settings.version}}</small>
|
|
|
|
|
2020-07-25 21:41:22 +02:00
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
import { mapState } from 'vuex'
|
2021-05-19 16:17:48 +02:00
|
|
|
import FollowMe from '../components/FollowMe'
|
2020-07-25 21:41:22 +02:00
|
|
|
|
|
|
|
export default {
|
2021-05-19 16:17:48 +02:00
|
|
|
components: { FollowMe },
|
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
showFollowMe: false
|
|
|
|
}
|
|
|
|
},
|
2021-06-19 22:47:25 +02:00
|
|
|
computed: {
|
|
|
|
...mapState(['settings']),
|
|
|
|
footerLinks () {
|
2021-12-02 11:14:53 +01:00
|
|
|
if (!this.settings || !this.settings.footerLinks) return []
|
2021-06-19 22:47:25 +02:00
|
|
|
return this.settings.footerLinks.map(link => {
|
|
|
|
if (/^https?:\/\//.test(link.href)) {
|
2022-11-25 09:47:46 +01:00
|
|
|
return { href: link.href, label: link.label.startsWith('common.') ? this.$t(link.label) : link.label }
|
2021-06-19 22:47:25 +02:00
|
|
|
} else {
|
2022-11-25 09:47:46 +01:00
|
|
|
return { to: link.href, label: link.label.startsWith('common.') ? this.$t(link.label) : link.label }
|
2021-06-19 22:47:25 +02:00
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
2020-07-25 21:41:22 +02:00
|
|
|
}
|
|
|
|
</script>
|