mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-22 18:07:31 -07:00
Merge branch 'develop' of https://github.com/syuilo/misskey into develop
This commit is contained in:
commit
6026866556
1 changed files with 16 additions and 1 deletions
|
@ -1,11 +1,17 @@
|
||||||
<template>
|
<template>
|
||||||
<router-link class="ldlomzub" :to="`/${ canonical }`" v-user-preview="canonical">
|
<router-link class="ldlomzub" :to="url" v-user-preview="canonical" v-if="url.startsWith('/')">
|
||||||
<span class="me" v-if="isMe">{{ $t('@.you') }}</span>
|
<span class="me" v-if="isMe">{{ $t('@.you') }}</span>
|
||||||
<span class="main">
|
<span class="main">
|
||||||
<span class="username">@{{ username }}</span>
|
<span class="username">@{{ username }}</span>
|
||||||
<span class="host" :class="{ fade: $store.state.settings.contrastedAcct }" v-if="(host != localHost) || $store.state.settings.showFullAcct">@{{ toUnicode(host) }}</span>
|
<span class="host" :class="{ fade: $store.state.settings.contrastedAcct }" v-if="(host != localHost) || $store.state.settings.showFullAcct">@{{ toUnicode(host) }}</span>
|
||||||
</span>
|
</span>
|
||||||
</router-link>
|
</router-link>
|
||||||
|
<a class="ldlomzub" :href="url" target="_blank" rel="noopener" v-else>
|
||||||
|
<span class="main">
|
||||||
|
<span class="username">@{{ username }}</span>
|
||||||
|
<span class="host" :class="{ fade: $store.state.settings.contrastedAcct }">@{{ toUnicode(host) }}</span>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
@ -32,6 +38,15 @@ export default Vue.extend({
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
url(): string {
|
||||||
|
switch (this.host) {
|
||||||
|
case 'twitter.com':
|
||||||
|
case 'github.com':
|
||||||
|
return `https://${this.host}/${this.username}`;
|
||||||
|
default:
|
||||||
|
return `/${this.canonical}`;
|
||||||
|
}
|
||||||
|
},
|
||||||
canonical(): string {
|
canonical(): string {
|
||||||
return this.host === localHost ? `@${this.username}` : `@${this.username}@${toUnicode(this.host)}`;
|
return this.host === localHost ? `@${this.username}` : `@${this.username}@${toUnicode(this.host)}`;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue