Show bubble instances in about panel #123

Merged
floatingghost merged 2 commits from bubble-instances into develop 2022-08-09 02:16:24 +00:00
7 changed files with 71 additions and 1 deletions

View file

@ -285,6 +285,7 @@ const getNodeInfo = async ({ store }) => {
})
store.dispatch('setInstanceOption', { name: 'federationPolicy', value: federation })
store.dispatch('setInstanceOption', { name: 'localBubbleInstances', value: metadata.localBubbleInstances })
store.dispatch('setInstanceOption', {
name: 'federating',
value: typeof federation.enabled === 'undefined'

View file

@ -3,6 +3,7 @@ import FeaturesPanel from '../features_panel/features_panel.vue'
import TermsOfServicePanel from '../terms_of_service_panel/terms_of_service_panel.vue'
import StaffPanel from '../staff_panel/staff_panel.vue'
import MRFTransparencyPanel from '../mrf_transparency_panel/mrf_transparency_panel.vue'
import LocalBubblePanel from '../local_bubble_panel/local_bubble_panel.vue'
const About = {
components: {
@ -10,7 +11,8 @@ const About = {
FeaturesPanel,
TermsOfServicePanel,
StaffPanel,
MRFTransparencyPanel
MRFTransparencyPanel,
LocalBubblePanel
},
computed: {
showFeaturesPanel () { return this.$store.state.instance.showFeaturesPanel },

View file

@ -3,6 +3,7 @@
<instance-specific-panel v-if="showInstanceSpecificPanel" />
<staff-panel />
<terms-of-service-panel />
<LocalBubblePanel />
<MRFTransparencyPanel />
<features-panel v-if="showFeaturesPanel" />
</div>

View file

@ -0,0 +1,12 @@
import { mapState } from 'vuex'
import { get } from 'lodash'
const LocalBubblePanel = {
computed: {
...mapState({
bubbleInstances: state => get(state, 'instance.localBubbleInstances')
})
}
}
export default LocalBubblePanel

View file

@ -0,0 +1,21 @@
.mrf-section {
margin: 1em;
table {
width:100%;
text-align: left;
padding-left:10px;
padding-bottom:20px;
th, td {
width: 180px;
max-width: 360px;
overflow: hidden;
vertical-align: text-top;
}
th+th, td+td {
width: auto;
}
}
}

View file

@ -0,0 +1,31 @@
<template>
<div
v-if="bubbleInstances"
class="bubble-panel"
>
<div class="panel panel-default base01-background">
<div class="panel-heading timeline-heading base02-background">
<div class="title">
{{ $t("about.bubble_instances") }}
</div>
</div>
<div class="panel-body">
<p>{{ $t("about.bubble_instances_description")}}:</p>
<ul>
<li
v-for="instance in bubbleInstances"
:key="instance"
v-text="instance"
/>
</ul>
</div>
</div>
</div>
</template>
<script src="./local_bubble_panel.js"></script>
<style lang="scss">
@import '../../_variables.scss';
@import './local_bubble_panel.scss';
</style>

View file

@ -1,5 +1,7 @@
{
"about": {
"bubble_instances": "Local Bubble Instances",
"bubble_instances_description": "Instances chosen by the admins to represent the local area of this instance",
"mrf": {
"federation": "Federation",
"keyword": {