diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2019-02-15 05:08:59 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-15 05:08:59 +0900 |
| commit | 53422ffcb296be404c0f3ef7e175bedecca4fb4d (patch) | |
| tree | 39cb47b43edd8b8265bb9ad48becdea2666f8881 /src/client/app/desktop/views/deck/deck.note-column.vue | |
| parent | Update README.md [AUTOGEN] (#4253) (diff) | |
| download | misskey-53422ffcb296be404c0f3ef7e175bedecca4fb4d.tar.gz misskey-53422ffcb296be404c0f3ef7e175bedecca4fb4d.tar.bz2 misskey-53422ffcb296be404c0f3ef7e175bedecca4fb4d.zip | |
Improve desktop UX (#4262)
* wip
* wip
* wip
* wip
* wip
* wip
* Merge
* wip
* wip
* wip
* wip
* wip
* wip
Diffstat (limited to 'src/client/app/desktop/views/deck/deck.note-column.vue')
| -rw-r--r-- | src/client/app/desktop/views/deck/deck.note-column.vue | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/src/client/app/desktop/views/deck/deck.note-column.vue b/src/client/app/desktop/views/deck/deck.note-column.vue new file mode 100644 index 0000000000..f365573538 --- /dev/null +++ b/src/client/app/desktop/views/deck/deck.note-column.vue @@ -0,0 +1,77 @@ +<template> +<x-column> + <span slot="header"> + <fa :icon="['far', 'comment-alt']"/><mk-user-name :user="note.user" v-if="note"/> + </span> + + <div class="rvtscbadixhhbsczoorqoaygovdeecsx" v-if="note"> + <div class="is-remote" v-if="note.user.host != null"> + <details> + <summary><fa icon="exclamation-triangle"/> {{ $t('@.is-remote-post') }}</summary> + <a :href="note.url || note.uri" target="_blank">{{ $t('@.view-on-remote') }}</a> + </details> + </div> + <x-note :note="note" :detail="true" :mini="true"/> + </div> +</x-column> +</template> + +<script lang="ts"> +import Vue from 'vue'; +import i18n from '../../../i18n'; +import XColumn from './deck.column.vue'; +import XNotes from './deck.notes.vue'; +import XNote from '../components/note.vue'; + +export default Vue.extend({ + i18n: i18n(), + components: { + XColumn, + XNotes, + XNote + }, + + data() { + return { + note: null, + fetching: true + }; + }, + + watch: { + $route: 'fetch' + }, + + created() { + 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; + }); + } + } +}); +</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> |