2018-10-19 06:18:33 +09:00
|
|
|
<template>
|
|
|
|
<x-column>
|
2019-02-18 09:48:00 +09:00
|
|
|
<template v-slot:header>
|
2019-01-19 08:28:46 +09:00
|
|
|
<fa :icon="['far', 'comment-alt']"/><mk-user-name :user="note.user" v-if="note"/>
|
2019-02-18 09:48:00 +09:00
|
|
|
</template>
|
2018-10-19 06:18:33 +09:00
|
|
|
|
|
|
|
<div class="rvtscbadixhhbsczoorqoaygovdeecsx" v-if="note">
|
2018-10-21 00:18:01 +09:00
|
|
|
<div class="is-remote" v-if="note.user.host != null">
|
|
|
|
<details>
|
2018-11-09 03:44:35 +09: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-21 00:18:01 +09:00
|
|
|
</details>
|
|
|
|
</div>
|
2018-10-19 06:18:33 +09:00
|
|
|
<x-note :note="note" :detail="true" :mini="true"/>
|
|
|
|
</div>
|
|
|
|
</x-column>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
2019-02-15 05:08:59 +09:00
|
|
|
import i18n from '../../../i18n';
|
2018-10-19 06:18:33 +09:00
|
|
|
import XColumn from './deck.column.vue';
|
|
|
|
import XNotes from './deck.notes.vue';
|
2019-02-15 05:08:59 +09:00
|
|
|
import XNote from '../components/note.vue';
|
2018-10-19 06:18:33 +09:00
|
|
|
|
|
|
|
export default Vue.extend({
|
2018-11-09 03:44:35 +09:00
|
|
|
i18n: i18n(),
|
2018-10-19 06:18:33 +09:00
|
|
|
components: {
|
|
|
|
XColumn,
|
|
|
|
XNotes,
|
|
|
|
XNote
|
|
|
|
},
|
|
|
|
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
note: null,
|
|
|
|
fetching: true
|
|
|
|
};
|
|
|
|
},
|
|
|
|
|
2019-02-15 05:08:59 +09:00
|
|
|
watch: {
|
|
|
|
$route: 'fetch'
|
|
|
|
},
|
|
|
|
|
2018-10-19 06:18:33 +09:00
|
|
|
created() {
|
2019-02-15 05:08:59 +09:00
|
|
|
this.fetch();
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
fetch() {
|
|
|
|
this.fetching = true;
|
|
|
|
|
|
|
|
this.$root.api('notes/show', {
|
|
|
|
noteId: this.$route.params.note
|
|
|
|
}).then(note => {
|
|
|
|
this.note = note;
|
|
|
|
this.fetching = false;
|
|
|
|
});
|
|
|
|
}
|
2018-10-19 06:18:33 +09:00
|
|
|
}
|
|
|
|
});
|
|
|
|
</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>
|