|
|
|
|
@ -1,6 +1,16 @@
|
|
|
|
|
<template>
|
|
|
|
|
<q-card>
|
|
|
|
|
<q-card-section v-for="item in items" v-bind:key="item.num">
|
|
|
|
|
<q-card-section style="background-color: #f8f8fc;">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div style="display: flex; flex-basis: 50%;">
|
|
|
|
|
<q-item-label class="q-pt-sm text-h5">
|
|
|
|
|
<q-btn @click="$router.go(-1)" flat round color="primary" icon="arrow_back" />
|
|
|
|
|
{{topicName}}
|
|
|
|
|
</q-item-label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</q-card-section>
|
|
|
|
|
<q-card-section @mouseover="item.buttonsShown = true" @mouseleave="item.buttonsShown = false" v-for="(item, index) in items" v-bind:key="item.num">
|
|
|
|
|
<div class="row q-pb-md">
|
|
|
|
|
<div style="display: flex; flex-basis: 20%;">
|
|
|
|
|
<div class="col">
|
|
|
|
|
@ -11,16 +21,17 @@
|
|
|
|
|
<p>{{item.time}}</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<q-separator vertical />
|
|
|
|
|
<div class="col">
|
|
|
|
|
<div class="q-ml-md" style="display: flex; flex-basis: 70%;">{{item.text}}</div>
|
|
|
|
|
<div class="col q-ml-md q-mt-md" style="display: flex; flex-basis: 70%;">
|
|
|
|
|
<p class="row" @click="goToLink(file)" v-for="(file, index) in item.attachedFiles" v-bind:key="index"><q-icon name="attach_file" />{{file}}</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col q-mr-md" style="float: right; display: flex; flex-basis: 70%;">
|
|
|
|
|
<q-btn class="q-mr-sm" outline round color="primary" icon="question_answer" />
|
|
|
|
|
<q-btn class="q-mr-sm" outline round color="primary" icon="edit" />
|
|
|
|
|
<q-btn class="q-mr-sm" outline round color="primary" icon="delete" />
|
|
|
|
|
<div v-if="item.buttonsShown">
|
|
|
|
|
<q-btn @click="openAnswer(index)" class="q-mr-sm" flat round color="primary" icon="question_answer" />
|
|
|
|
|
<q-btn class="q-mr-sm" flat round color="primary" icon="edit" />
|
|
|
|
|
<q-btn class="q-mr-sm" flat round color="primary" icon="delete" />
|
|
|
|
|
</div>
|
|
|
|
|
<q-rating
|
|
|
|
|
v-model="item.rating"
|
|
|
|
|
size="1.5em"
|
|
|
|
|
@ -29,17 +40,41 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<q-separator inset />
|
|
|
|
|
<q-card-section v-if="item.openedAnswer">
|
|
|
|
|
<div class="q-pt-none">
|
|
|
|
|
<div class="q-pa-md q-gutter-sm">
|
|
|
|
|
<!-- p>Ответ на: <q-btn size="xs" color="primary" icon="close" label="#2" /></p -->
|
|
|
|
|
<q-editor v-model="editor" min-height="5rem" />
|
|
|
|
|
<q-input v-for="(link, index) in links" v-bind:key="index" outlined v-model="link.text" label="Ссылка на приложение" />
|
|
|
|
|
<!-- <q-btn @click="createAttachment" round color="primary" icon="attach_file" /><br> -->
|
|
|
|
|
<q-btn @click="createAttachment" flat round color="primary" icon="attach_file" /><br>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<q-card-actions align="right">
|
|
|
|
|
<q-btn @click="createNewTopic" flat label="Ответить" color="primary" v-close-popup />
|
|
|
|
|
</q-card-actions>
|
|
|
|
|
</q-card-section>
|
|
|
|
|
</q-card-section>
|
|
|
|
|
<q-card-section>
|
|
|
|
|
<q-card-section class="q-pt-none">
|
|
|
|
|
<q-expansion-item
|
|
|
|
|
v-model="answerExpanded"
|
|
|
|
|
expand-separator
|
|
|
|
|
label="Новое сообщение"
|
|
|
|
|
header-class="primary"
|
|
|
|
|
>
|
|
|
|
|
</q-expansion-item>
|
|
|
|
|
</q-card-section>
|
|
|
|
|
<q-card-section v-if="answerExpanded">
|
|
|
|
|
<div class="q-pt-none">
|
|
|
|
|
<div class="q-pa-md q-gutter-sm">
|
|
|
|
|
<p>Ответ на: <q-btn size="xs" color="primary" icon="close" label="#2" /></p>
|
|
|
|
|
<!-- p>Ответ на: <q-btn size="xs" color="primary" icon="close" label="#2" /></p -->
|
|
|
|
|
<q-editor v-model="editor" min-height="5rem" />
|
|
|
|
|
<q-input v-for="(link, index) in links" v-bind:key="index" outlined v-model="link.text" label="Ссылка на приложение" />
|
|
|
|
|
<q-btn @click="createAttachment" round color="primary" icon="attach_file" /><br>
|
|
|
|
|
<!-- <q-btn @click="createAttachment" round color="primary" icon="attach_file" /><br> -->
|
|
|
|
|
<q-btn @click="createAttachment" flat round color="primary" icon="attach_file" /><br>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</q-card-section>
|
|
|
|
|
|
|
|
|
|
<q-card-actions align="right">
|
|
|
|
|
<q-btn @click="createNewTopic" flat label="Ответить" color="primary" v-close-popup />
|
|
|
|
|
@ -53,7 +88,9 @@ export default {
|
|
|
|
|
data () {
|
|
|
|
|
return {
|
|
|
|
|
links: [],
|
|
|
|
|
editor: ''
|
|
|
|
|
editor: '',
|
|
|
|
|
answerExpanded: false,
|
|
|
|
|
topicName: 'Имя темы'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
props: {
|
|
|
|
|
@ -69,7 +106,9 @@ export default {
|
|
|
|
|
attachedFiles: ['lul.com', 'kek.kek'],
|
|
|
|
|
num: 1,
|
|
|
|
|
time: '19:20',
|
|
|
|
|
rating: 3
|
|
|
|
|
rating: 3,
|
|
|
|
|
openedAnswer: false,
|
|
|
|
|
buttonsShown: false
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'kekus maximus',
|
|
|
|
|
@ -80,7 +119,9 @@ export default {
|
|
|
|
|
attachedFiles: ['lul.com', 'kek.kek'],
|
|
|
|
|
num: 2,
|
|
|
|
|
time: '19:20',
|
|
|
|
|
rating: 3
|
|
|
|
|
rating: 3,
|
|
|
|
|
openedAnswer: false,
|
|
|
|
|
buttonsShown: false
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'kekus maximus',
|
|
|
|
|
@ -91,7 +132,9 @@ export default {
|
|
|
|
|
attachedFiles: ['lul.com', 'kek.kek'],
|
|
|
|
|
num: 3,
|
|
|
|
|
time: '19:20',
|
|
|
|
|
rating: 3
|
|
|
|
|
rating: 3,
|
|
|
|
|
openedAnswer: false,
|
|
|
|
|
buttonsShown: false
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
@ -102,6 +145,12 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
createAttachment () {
|
|
|
|
|
this.links.push({ text: '' })
|
|
|
|
|
},
|
|
|
|
|
openAnswer (i) {
|
|
|
|
|
this.items[i].openedAnswer = true
|
|
|
|
|
},
|
|
|
|
|
showButtons (i) {
|
|
|
|
|
this.items[i].buttonsShown = !this.items[i].buttonsShown
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|