2018-10-18 21:18:33 +00:00
|
|
|
<template>
|
|
|
|
<x-column>
|
|
|
|
<span slot="header">
|
2018-11-05 16:40:11 +00:00
|
|
|
<fa :icon="['far', 'comment-alt']"/><span>{{ title }}</span>
|
2018-10-18 21:18:33 +00:00
|
|
|
</span>
|
|
|
|
|
|
|
|
<div class="rvtscbadixhhbsczoorqoaygovdeecsx" v-if="note">
|
2018-10-20 15:18:01 +00:00
|
|
|
<div class="is-remote" v-if="note.user.host != null">
|
|
|
|
<details>
|
2018-11-08 18:44:35 +00:00
|
|
|
<summary><fa icon="exclamation-triangle"/> {{ $t('@.is-remote-post') }}</summary>
|
|
|
|
<a :href="note.url || note.uri" target="_blank">{{ $t('@.view-on-remote') }}</a>
|
2018-10-20 15:18:01 +00:00
|
|
|
</details>
|
|
|
|
</div>
|
2018-10-18 21:18:33 +00:00
|
|
|
<x-note :note="note" :detail="true" :mini="true"/>
|
|
|
|
</div>
|
|
|
|
</x-column>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
2018-11-08 18:44:35 +00:00
|
|
|
import i18n from '../../../../i18n';
|
2018-10-18 21:18:33 +00:00
|
|
|
import XColumn from './deck.column.vue';
|
|
|
|
import XNotes from './deck.notes.vue';
|
|
|
|
import XNote from '../../components/note.vue';
|
|
|
|
|
|
|
|
export default Vue.extend({
|
2018-11-08 18:44:35 +00:00
|
|
|
i18n: i18n(),
|
2018-10-18 21:18:33 +00:00
|
|
|
components: {
|
|
|
|
XColumn,
|
|
|
|
XNotes,
|
|
|
|
XNote
|
|
|
|
},
|
|
|
|
|
|
|
|
props: {
|
|
|
|
noteId: {
|
|
|
|
type: String,
|
|
|
|
required: true
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
note: null,
|
|
|
|
fetching: true
|
|
|
|
};
|
|
|
|
},
|
|
|
|
|
|
|
|
computed: {
|
|
|
|
title(): string {
|
|
|
|
return this.note ? Vue.filter('userName')(this.note.user) : '';
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
created() {
|
2018-11-08 23:13:34 +00:00
|
|
|
this.$root.api('notes/show', { noteId: this.noteId }).then(note => {
|
2018-10-18 21:18:33 +00:00
|
|
|
this.note = note;
|
|
|
|
this.fetching = false;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
|
|
|
.rvtscbadixhhbsczoorqoaygovdeecsx
|
|
|
|
> .is-remote
|
|
|
|
padding 8px 16px
|
|
|
|
font-size 12px
|
|
|
|
|
|
|
|
&.is-remote
|
|
|
|
color var(--remoteInfoFg)
|
|
|
|
background var(--remoteInfoBg)
|
|
|
|
|
|
|
|
> a
|
|
|
|
font-weight bold
|
|
|
|
|
|
|
|
</style>
|