forked from AkkomaGang/akkoma-fe
Show bubble instances in about panel (#123)
Reviewed-on: AkkomaGang/pleroma-fe#123
This commit is contained in:
parent
d4f8934e8a
commit
4d27064db3
7 changed files with 71 additions and 1 deletions
|
@ -285,6 +285,7 @@ const getNodeInfo = async ({ store }) => {
|
||||||
})
|
})
|
||||||
|
|
||||||
store.dispatch('setInstanceOption', { name: 'federationPolicy', value: federation })
|
store.dispatch('setInstanceOption', { name: 'federationPolicy', value: federation })
|
||||||
|
store.dispatch('setInstanceOption', { name: 'localBubbleInstances', value: metadata.localBubbleInstances })
|
||||||
store.dispatch('setInstanceOption', {
|
store.dispatch('setInstanceOption', {
|
||||||
name: 'federating',
|
name: 'federating',
|
||||||
value: typeof federation.enabled === 'undefined'
|
value: typeof federation.enabled === 'undefined'
|
||||||
|
|
|
@ -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 TermsOfServicePanel from '../terms_of_service_panel/terms_of_service_panel.vue'
|
||||||
import StaffPanel from '../staff_panel/staff_panel.vue'
|
import StaffPanel from '../staff_panel/staff_panel.vue'
|
||||||
import MRFTransparencyPanel from '../mrf_transparency_panel/mrf_transparency_panel.vue'
|
import MRFTransparencyPanel from '../mrf_transparency_panel/mrf_transparency_panel.vue'
|
||||||
|
import LocalBubblePanel from '../local_bubble_panel/local_bubble_panel.vue'
|
||||||
|
|
||||||
const About = {
|
const About = {
|
||||||
components: {
|
components: {
|
||||||
|
@ -10,7 +11,8 @@ const About = {
|
||||||
FeaturesPanel,
|
FeaturesPanel,
|
||||||
TermsOfServicePanel,
|
TermsOfServicePanel,
|
||||||
StaffPanel,
|
StaffPanel,
|
||||||
MRFTransparencyPanel
|
MRFTransparencyPanel,
|
||||||
|
LocalBubblePanel
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
showFeaturesPanel () { return this.$store.state.instance.showFeaturesPanel },
|
showFeaturesPanel () { return this.$store.state.instance.showFeaturesPanel },
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
<instance-specific-panel v-if="showInstanceSpecificPanel" />
|
<instance-specific-panel v-if="showInstanceSpecificPanel" />
|
||||||
<staff-panel />
|
<staff-panel />
|
||||||
<terms-of-service-panel />
|
<terms-of-service-panel />
|
||||||
|
<LocalBubblePanel />
|
||||||
<MRFTransparencyPanel />
|
<MRFTransparencyPanel />
|
||||||
<features-panel v-if="showFeaturesPanel" />
|
<features-panel v-if="showFeaturesPanel" />
|
||||||
</div>
|
</div>
|
||||||
|
|
12
src/components/local_bubble_panel/local_bubble_panel.js
Normal file
12
src/components/local_bubble_panel/local_bubble_panel.js
Normal 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
|
21
src/components/local_bubble_panel/local_bubble_panel.scss
Normal file
21
src/components/local_bubble_panel/local_bubble_panel.scss
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
31
src/components/local_bubble_panel/local_bubble_panel.vue
Normal file
31
src/components/local_bubble_panel/local_bubble_panel.vue
Normal 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>
|
|
@ -1,5 +1,7 @@
|
||||||
{
|
{
|
||||||
"about": {
|
"about": {
|
||||||
|
"bubble_instances": "Local Bubble Instances",
|
||||||
|
"bubble_instances_description": "Instances chosen by the admins to represent the local area of this instance",
|
||||||
"mrf": {
|
"mrf": {
|
||||||
"federation": "Federation",
|
"federation": "Federation",
|
||||||
"keyword": {
|
"keyword": {
|
||||||
|
|
Loading…
Reference in a new issue