mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-25 10:03:09 +02:00
Improve usability
This commit is contained in:
parent
c4a2a31cf3
commit
31b0e552a2
1 changed files with 5 additions and 5 deletions
|
@ -3,10 +3,10 @@
|
||||||
<ui-card>
|
<ui-card>
|
||||||
<div slot="title"><fa :icon="faTerminal"/> {{ $t('federation') }}</div>
|
<div slot="title"><fa :icon="faTerminal"/> {{ $t('federation') }}</div>
|
||||||
<section class="fit-top">
|
<section class="fit-top">
|
||||||
<ui-input class="target" v-model="target" type="text" @enter="showInstance">
|
<ui-input class="target" v-model="target" type="text" @enter="showInstance()">
|
||||||
<span>{{ $t('host') }}</span>
|
<span>{{ $t('host') }}</span>
|
||||||
</ui-input>
|
</ui-input>
|
||||||
<ui-button @click="showInstance"><fa :icon="faSearch"/> {{ $t('lookup') }}</ui-button>
|
<ui-button @click="showInstance()"><fa :icon="faSearch"/> {{ $t('lookup') }}</ui-button>
|
||||||
|
|
||||||
<div class="instance" v-if="instance">
|
<div class="instance" v-if="instance">
|
||||||
<ui-input :value="instance.host" type="text" readonly>
|
<ui-input :value="instance.host" type="text" readonly>
|
||||||
|
@ -115,7 +115,7 @@
|
||||||
<span>{{ $t('status') }}</span>
|
<span>{{ $t('status') }}</span>
|
||||||
</header>
|
</header>
|
||||||
<div v-for="instance in instances">
|
<div v-for="instance in instances">
|
||||||
<span>{{ instance.host }}</span>
|
<a @click.prevent="showInstance(instance.host)" target="_blank" :href="`https://${instance.host}`">{{ instance.host }}</a>
|
||||||
<span>{{ instance.notesCount | number }}</span>
|
<span>{{ instance.notesCount | number }}</span>
|
||||||
<span>{{ instance.usersCount | number }}</span>
|
<span>{{ instance.usersCount | number }}</span>
|
||||||
<span>{{ instance.followingCount | number }}</span>
|
<span>{{ instance.followingCount | number }}</span>
|
||||||
|
@ -233,9 +233,9 @@ export default Vue.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
showInstance() {
|
showInstance(target?: string) {
|
||||||
this.$root.api('federation/show-instance', {
|
this.$root.api('federation/show-instance', {
|
||||||
host: this.target
|
host: target || this.target
|
||||||
}).then(instance => {
|
}).then(instance => {
|
||||||
if (instance == null) {
|
if (instance == null) {
|
||||||
this.$root.dialog({
|
this.$root.dialog({
|
||||||
|
|
Loading…
Reference in a new issue