This commit is contained in:
syuilo 2020-03-21 13:07:02 +09:00
parent 1471e52307
commit ee6311e83d
3 changed files with 36 additions and 12 deletions

View File

@ -0,0 +1,29 @@
<template>
<div class="jmgmzlwq _panel"><fa :icon="faExclamationTriangle" style="margin-right: 8px;"/>{{ $t('remoteUserCaution') }}<a :href="href" rel="nofollow noopener" target="_blank">{{ $t('showOnRemote') }}</a></div>
</template>
<script lang="ts">
import Vue from 'vue';
import i18n from '../i18n';
export default Vue.extend({
i18n,
props: {
href: {
type: String,
required: true
},
},
});
</script>
<style lang="scss" scoped>
.jmgmzlwq {
font-size: 0.8em;
padding: 16px;
> a {
margin-left: 4px;
color: var(--accent);
}
}
</style>

View File

@ -9,6 +9,8 @@
</portal> </portal>
<div v-if="note"> <div v-if="note">
<mk-remote-caution v-if="note.user.host != null" :href="note.url" style="margin-bottom: var(--margin)"/>
<button class="_panel _button" v-if="hasNext && !showNext" @click="showNext = true" style="margin: 0 auto var(--margin) auto;"><fa :icon="faChevronUp"/></button> <button class="_panel _button" v-if="hasNext && !showNext" @click="showNext = true" style="margin: 0 auto var(--margin) auto;"><fa :icon="faChevronUp"/></button>
<x-notes v-if="showNext" ref="next" :pagination="next"/> <x-notes v-if="showNext" ref="next" :pagination="next"/>
<hr v-if="showNext"/> <hr v-if="showNext"/>
@ -32,6 +34,7 @@ import i18n from '../i18n';
import Progress from '../scripts/loading'; import Progress from '../scripts/loading';
import XNote from '../components/note.vue'; import XNote from '../components/note.vue';
import XNotes from '../components/notes.vue'; import XNotes from '../components/notes.vue';
import MkRemoteCaution from '../components/remote-caution.vue';
export default Vue.extend({ export default Vue.extend({
i18n, i18n,
@ -43,6 +46,7 @@ export default Vue.extend({
components: { components: {
XNote, XNote,
XNotes, XNotes,
MkRemoteCaution,
}, },
data() { data() {
return { return {

View File

@ -3,7 +3,7 @@
<portal to="title" v-if="user"><mk-user-name :user="user" :nowrap="false" class="name"/></portal> <portal to="title" v-if="user"><mk-user-name :user="user" :nowrap="false" class="name"/></portal>
<portal to="avatar" v-if="user"><mk-avatar class="avatar" :user="user" :disable-preview="true"/></portal> <portal to="avatar" v-if="user"><mk-avatar class="avatar" :user="user" :disable-preview="true"/></portal>
<div class="remote-caution _panel" v-if="user.host != null"><fa :icon="faExclamationTriangle" style="margin-right: 8px;"/>{{ $t('remoteUserCaution') }}<a :href="user.url" rel="nofollow noopener" target="_blank">{{ $t('showOnRemote') }}</a></div> <mk-remote-caution v-if="user.host != null" :href="user.url" style="margin-bottom: var(--margin)"/>
<div class="profile _panel" :key="user.id"> <div class="profile _panel" :key="user.id">
<div class="banner-container" :style="style"> <div class="banner-container" :style="style">
<div class="banner" ref="banner" :style="style"></div> <div class="banner" ref="banner" :style="style"></div>
@ -113,6 +113,7 @@ import XUserMenu from '../../components/user-menu.vue';
import XNote from '../../components/note.vue'; import XNote from '../../components/note.vue';
import MkFollowButton from '../../components/follow-button.vue'; import MkFollowButton from '../../components/follow-button.vue';
import MkContainer from '../../components/ui/container.vue'; import MkContainer from '../../components/ui/container.vue';
import MkRemoteCaution from '../../components/remote-caution.vue';
import Progress from '../../scripts/loading'; import Progress from '../../scripts/loading';
import parseAcct from '../../../misc/acct/parse'; import parseAcct from '../../../misc/acct/parse';
@ -122,6 +123,7 @@ export default Vue.extend({
XNote, XNote,
MkFollowButton, MkFollowButton,
MkContainer, MkContainer,
MkRemoteCaution,
XPhotos: () => import('./index.photos.vue').then(m => m.default), XPhotos: () => import('./index.photos.vue').then(m => m.default),
XActivity: () => import('./index.activity.vue').then(m => m.default), XActivity: () => import('./index.activity.vue').then(m => m.default),
}, },
@ -215,17 +217,6 @@ export default Vue.extend({
<style lang="scss" scoped> <style lang="scss" scoped>
.mk-user-page { .mk-user-page {
> .remote-caution {
font-size: 0.8em;
padding: 16px;
margin-bottom: var(--margin);
> a {
margin-left: 4px;
color: var(--accent);
}
}
> .profile { > .profile {
position: relative; position: relative;
margin-bottom: var(--margin); margin-bottom: var(--margin);