Большие новости
This commit is contained in:
1 parent
c5dab0b2a6
commit
e97ec2ef8c
3 files changed
+154
-4
No files matched your search
@@ -2,6 +2,7 @@
|
||||
<v-container class="py-1 newsVH px-0 bg-transparent overflow-auto">
|
||||
|
||||
<v-card
|
||||
v-show="pages=='home'"
|
||||
class="mx-auto mb-0 "
|
||||
v-for="(x, i) in newss" :key= i
|
||||
>
|
||||
@@ -125,6 +126,139 @@
|
||||
</div>
|
||||
</v-expand-transition>
|
||||
</v-card>
|
||||
|
||||
<!-- ---------------------------------------------------------------------------------- -->
|
||||
|
||||
<v-card v-show="pages=='news'"
|
||||
class="mx-auto mb-0 "
|
||||
v-for="(x, i) in newss" :key= i
|
||||
>
|
||||
<v-list-item class="w-100 pl-2">
|
||||
<template v-slot:prepend>
|
||||
<v-avatar
|
||||
color="grey-darken-3"
|
||||
image="https://avataaars.io/?avatarStyle=Transparent&topType=ShortHairShortCurly&accessoriesType=Prescription02&hairColor=Black&facialHairType=Blank&clotheType=Hoodie&clotheColor=White&eyeType=Default&eyebrowType=DefaultNatural&mouthType=Default&skinColor=Light"
|
||||
></v-avatar>
|
||||
</template>
|
||||
|
||||
<v-list-item-title>{{x.author.fio}}</v-list-item-title>
|
||||
|
||||
<v-list-item-subtitle>Участник</v-list-item-subtitle>
|
||||
</v-list-item>
|
||||
<v-img
|
||||
:src="`${burl}${x.link}`"
|
||||
height="350px"
|
||||
cover
|
||||
/>
|
||||
<v-list-item class="w-100">
|
||||
|
||||
<template v-slot:append>
|
||||
<div class="justify-self-end">
|
||||
<v-icon class="me-1" :icon="x.scores.filter(e=> e.user==accountStore.user.id && e.score == true).length>0?'mdi-thumb-up':'mdi-thumb-up-outline'" @click="toggleIncrementLike(x.id, true)"></v-icon>
|
||||
<span class="subheading me-2">{{x.scores.filter(e=> e.score==true).length}}</span>
|
||||
<span class="me-1">·</span>
|
||||
<v-icon class="me-1" icon="mdi-thumb-down-outline" @click="toggleIncrementLike(x.id, false)"></v-icon>
|
||||
<span class="subheading me-2">{{x.scores.filter(e=> e.score==false).length}}</span>
|
||||
<span class="me-1">·</span>
|
||||
<v-icon class="me-1" icon="mdi-message-text-outline" @click="openComent(x.id)"></v-icon>
|
||||
<span class="subheading">{{ x.comment.length }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</v-list-item>
|
||||
<v-card-title>
|
||||
{{x.title}}
|
||||
</v-card-title>
|
||||
|
||||
|
||||
<div >
|
||||
<v-divider/>
|
||||
|
||||
<v-card-text>
|
||||
{{x.text}}
|
||||
</v-card-text>
|
||||
<v-divider/>
|
||||
<v-card-actions >
|
||||
<!-- <v-row >
|
||||
<v-col>
|
||||
|
||||
<v-btn
|
||||
:variant="x.scores.filter(e=> e.user==accountStore.user.id && e.score == true).length>0?'tonal':'text'"
|
||||
icon='mdi-thumb-up-outline'
|
||||
color="blue-darken-3"
|
||||
@click="toggleIncrementLike(x.id, true)"
|
||||
/>
|
||||
|
||||
|
||||
</v-col>
|
||||
<v-col class=" ml-8">
|
||||
<v-btn
|
||||
variant="text"
|
||||
icon="mdi-message-text-outline"
|
||||
color="teal"
|
||||
|
||||
/>
|
||||
<span @click="x.showComment=!x.showComment"
|
||||
class="pointer"
|
||||
>
|
||||
|
||||
</span>
|
||||
|
||||
</v-col>
|
||||
<v-col class="text-center pr-0">
|
||||
<v-btn
|
||||
:variant="x.scores.filter(e=> e.user==accountStore.user.id && e.score == false).length>0?'tonal':'text'"
|
||||
icon='mdi-thumb-down-outline'
|
||||
color="red-lighten-2"
|
||||
@click="toggleIncrementLike(x.id, false)"
|
||||
/>
|
||||
|
||||
{{x.scores.filter(e=> e.score==false).length}}
|
||||
|
||||
|
||||
|
||||
</v-col>
|
||||
</v-row> -->
|
||||
|
||||
|
||||
|
||||
|
||||
</v-card-actions>
|
||||
<v-divider class="mb-2"/>
|
||||
</div>
|
||||
|
||||
|
||||
<v-expand-transition>
|
||||
<div v-show="x.showComment" v-if="x.comment.length>0">
|
||||
<div
|
||||
v-for = "(y, key) in x.comment"
|
||||
:key="key"
|
||||
|
||||
|
||||
class="d-flex align-center flex-column py-3"
|
||||
>
|
||||
|
||||
<div class="text-subtitle-2">{{dateformat(y.cdate)}}
|
||||
<v-btn
|
||||
variant="text"
|
||||
size="small"
|
||||
icon='mdi-delete'
|
||||
color="blue-grey-darken-1"
|
||||
@click="deletComment(y.id, x.id)"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<v-card
|
||||
width="400"
|
||||
:subtitle=splitname(y.author)
|
||||
:text=y.text
|
||||
elevation="1"
|
||||
></v-card>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</v-expand-transition>
|
||||
</v-card>
|
||||
|
||||
<v-row justify="center">
|
||||
<v-dialog
|
||||
v-model="dialogCommentShow"
|
||||
@@ -183,6 +317,14 @@ const accountStore = useAccountStore()
|
||||
export default {
|
||||
components: { myHelper },
|
||||
|
||||
props: {
|
||||
pages: {
|
||||
type: String,
|
||||
default: 'home'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
setup(){
|
||||
const newss=ref([])
|
||||
const dialogCommentShow = ref(false)
|
||||
|
||||
Reference in new issue
Block a user