Add document name to room entry preview

This commit is contained in:
Ramon Wenger 2019-05-21 14:49:13 +02:00
parent 7bc8c3c3aa
commit c7cf6f7863
1 changed files with 5 additions and 2 deletions

View File

@ -25,7 +25,7 @@
import ROOM_ENTRIES_QUERY from '@/graphql/gql/roomEntriesQuery.gql';
import ME_QUERY from '@/graphql/gql/meQuery.gql';
import UserWidget from '@/components/UserWidget.vue';
import UserWidget from '@/components/UserWidget';
import MoreOptionsWidget from '@/components/MoreOptionsWidget';
export default {
@ -33,7 +33,7 @@
components: {
MoreOptionsWidget,
UserWidget,
UserWidget
},
methods: {
@ -81,6 +81,9 @@
// return first.value.text;
case 'link_block':
return first.value.url;
case 'document_block':
const parts = first.value.url.split('/');
return parts[parts.length - 1];
default:
return ''
}