2019-12-03 11:29:51 +01:00
|
|
|
<template>
|
2020-06-25 11:36:35 +02:00
|
|
|
<div>
|
|
|
|
<nav class="breadcrumb" aria-label="breadcrumbs">
|
2020-02-18 08:57:00 +01:00
|
|
|
<ul>
|
2020-06-25 11:36:35 +02:00
|
|
|
<li>
|
|
|
|
<router-link :to="{ name: RouteName.ADMIN }">{{ $t("Admin") }}</router-link>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<router-link :to="{ name: RouteName.RELAYS }">{{ $t("Federation") }}</router-link>
|
|
|
|
</li>
|
|
|
|
<li class="is-active" v-if="$route.name == RouteName.RELAY_FOLLOWINGS">
|
|
|
|
<router-link :to="{ name: RouteName.RELAY_FOLLOWINGS }">{{
|
|
|
|
$t("Followings")
|
|
|
|
}}</router-link>
|
|
|
|
</li>
|
|
|
|
<li class="is-active" v-if="$route.name == RouteName.RELAY_FOLLOWERS">
|
|
|
|
<router-link :to="{ name: RouteName.RELAY_FOLLOWERS }">{{ $t("Followers") }}</router-link>
|
|
|
|
</li>
|
2020-02-18 08:57:00 +01:00
|
|
|
</ul>
|
2020-06-25 11:36:35 +02:00
|
|
|
</nav>
|
|
|
|
<section>
|
|
|
|
<h1 class="title">{{ $t("Instances") }}</h1>
|
|
|
|
<div class="tabs is-boxed">
|
|
|
|
<ul>
|
|
|
|
<router-link
|
|
|
|
tag="li"
|
|
|
|
active-class="is-active"
|
|
|
|
:to="{ name: RouteName.RELAY_FOLLOWINGS }"
|
|
|
|
exact
|
|
|
|
>
|
|
|
|
<a>
|
|
|
|
<b-icon icon="inbox-arrow-down"></b-icon>
|
|
|
|
<span>
|
|
|
|
{{ $t("Followings") }}
|
|
|
|
<b-tag rounded>{{ relayFollowings.total }}</b-tag>
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
</router-link>
|
|
|
|
<router-link
|
|
|
|
tag="li"
|
|
|
|
active-class="is-active"
|
|
|
|
:to="{ name: RouteName.RELAY_FOLLOWERS }"
|
|
|
|
exact
|
|
|
|
>
|
|
|
|
<a>
|
|
|
|
<b-icon icon="inbox-arrow-up"></b-icon>
|
|
|
|
<span>
|
|
|
|
{{ $t("Followers") }}
|
|
|
|
<b-tag rounded>{{ relayFollowers.total }}</b-tag>
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
</router-link>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<router-view></router-view>
|
|
|
|
</section>
|
|
|
|
</div>
|
2019-12-03 11:29:51 +01:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2020-02-18 08:57:00 +01:00
|
|
|
import { Component, Vue } from "vue-property-decorator";
|
|
|
|
import { RELAY_FOLLOWERS, RELAY_FOLLOWINGS } from "@/graphql/admin";
|
|
|
|
import { Paginate } from "@/types/paginate";
|
|
|
|
import { IFollower } from "@/types/actor/follower.model";
|
|
|
|
import RouteName from "../../router/name";
|
2019-12-03 11:29:51 +01:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
apollo: {
|
|
|
|
relayFollowings: {
|
|
|
|
query: RELAY_FOLLOWINGS,
|
2020-02-18 08:57:00 +01:00
|
|
|
fetchPolicy: "cache-and-network",
|
2020-10-27 09:13:17 +01:00
|
|
|
variables: {
|
|
|
|
page: 1,
|
|
|
|
limit: 10,
|
|
|
|
},
|
2019-12-03 11:29:51 +01:00
|
|
|
},
|
|
|
|
relayFollowers: {
|
|
|
|
query: RELAY_FOLLOWERS,
|
2020-02-18 08:57:00 +01:00
|
|
|
fetchPolicy: "cache-and-network",
|
2020-10-27 09:13:17 +01:00
|
|
|
variables: {
|
|
|
|
page: 1,
|
|
|
|
limit: 10,
|
|
|
|
},
|
2019-12-03 11:29:51 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
export default class Follows extends Vue {
|
|
|
|
RouteName = RouteName;
|
2020-02-18 08:57:00 +01:00
|
|
|
|
|
|
|
activeTab = 0;
|
2019-12-03 11:29:51 +01:00
|
|
|
|
|
|
|
relayFollowings: Paginate<IFollower> = { elements: [], total: 0 };
|
2020-02-18 08:57:00 +01:00
|
|
|
|
2019-12-03 11:29:51 +01:00
|
|
|
relayFollowers: Paginate<IFollower> = { elements: [], total: 0 };
|
|
|
|
}
|
|
|
|
</script>
|
2020-06-17 15:54:24 +02:00
|
|
|
<style lang="scss" scoped>
|
2020-02-18 08:57:00 +01:00
|
|
|
.tab-item {
|
|
|
|
form {
|
|
|
|
margin-bottom: 1.5rem;
|
|
|
|
}
|
|
|
|
}
|
2020-06-17 15:54:24 +02:00
|
|
|
|
|
|
|
a {
|
|
|
|
text-decoration: none !important;
|
|
|
|
}
|
2020-02-18 08:57:00 +01:00
|
|
|
</style>
|