Ветка новости коммент
This commit is contained in:
1 parent
e97ec2ef8c
commit
2815d95e53
3 files changed
+81
-46
No files matched your search
BIN
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<v-container class="py-1 newsVH px-0 bg-transparent overflow-auto">
|
||||
<v-container class="py-0 newsVH px-0 bg-transparent overflow-auto">
|
||||
|
||||
<v-card
|
||||
v-show="pages=='home'"
|
||||
@@ -130,12 +130,14 @@
|
||||
<!-- ---------------------------------------------------------------------------------- -->
|
||||
|
||||
<v-card v-show="pages=='news'"
|
||||
class="mx-auto mb-0 "
|
||||
class="mx-auto rounded-0"
|
||||
|
||||
v-for="(x, i) in newss" :key= i
|
||||
>
|
||||
<v-list-item class="w-100 pl-2">
|
||||
<v-list-item class="w-100 pl-4 py-2 pt-3">
|
||||
<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>
|
||||
@@ -145,11 +147,18 @@
|
||||
|
||||
<v-list-item-subtitle>Участник</v-list-item-subtitle>
|
||||
</v-list-item>
|
||||
|
||||
<v-card-title class="pt-0 pb-1">
|
||||
{{x.title}}
|
||||
</v-card-title>
|
||||
<v-img
|
||||
:src="`${burl}${x.link}`"
|
||||
height="350px"
|
||||
width="96%"
|
||||
class="mx-auto"
|
||||
cover
|
||||
/>
|
||||
|
||||
<v-list-item class="w-100">
|
||||
|
||||
<template v-slot:append>
|
||||
@@ -157,17 +166,15 @@
|
||||
<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>
|
||||
<v-icon class="me-1" icon="mdi-thumb-down-outline" @click="toggleIncrementLike(x.id, false)"/>
|
||||
<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>
|
||||
<v-icon class="me-1" icon="mdi-message-text-outline" @click="openComent(x.id)"/>
|
||||
<span @click="x.showComment=!x.showComment" class="pointer subheading">{{ x.comment.length }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</v-list-item>
|
||||
<v-card-title>
|
||||
{{x.title}}
|
||||
</v-card-title>
|
||||
|
||||
|
||||
|
||||
<div >
|
||||
@@ -177,7 +184,59 @@
|
||||
{{x.text}}
|
||||
</v-card-text>
|
||||
<v-divider/>
|
||||
<v-card-actions >
|
||||
|
||||
<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 flex-column py-3"
|
||||
>
|
||||
<v-row>
|
||||
<v-col class="text-subtitle-2">{{ splitname(y.author) }}</v-col>
|
||||
<v-col class="flex-grow-0 text-subtitle-2 ">{{dateformat(y.cdate)}} </v-col>
|
||||
<v-col class="flex-grow-0"> <v-btn
|
||||
variant="text"
|
||||
size="small"
|
||||
icon='mdi-delete'
|
||||
color="blue-grey-darken-1"
|
||||
@click="deletComment(y.id, x.id)"
|
||||
/></v-col>
|
||||
</v-row>
|
||||
<div class="text-subtitle-2">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<v-alert
|
||||
|
||||
class="comWy"
|
||||
color="#f9f9f9"
|
||||
|
||||
:border="accountStore.user.login==y.author.login?'end':'start'"
|
||||
:border-color="accountStore.user.login==y.author.login?'success':'deep-purple accent-4'"
|
||||
elevation=""
|
||||
>
|
||||
|
||||
{{ y.text }}
|
||||
|
||||
</v-alert>
|
||||
|
||||
<!-- <v-card
|
||||
width="400"
|
||||
:subtitle=splitname(y.author)
|
||||
:text=y.text
|
||||
elevation="1"
|
||||
color="red"
|
||||
></v-card> -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</v-expand-transition>
|
||||
|
||||
<!-- <v-card-actions > -->
|
||||
<!-- <v-row >
|
||||
<v-col>
|
||||
|
||||
@@ -222,41 +281,12 @@
|
||||
|
||||
|
||||
|
||||
</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-actions> -->
|
||||
|
||||
<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">
|
||||
@@ -412,4 +442,8 @@ export default {
|
||||
.newsVH {
|
||||
height: 93vh;
|
||||
}
|
||||
|
||||
.comWy {
|
||||
width: 96%;
|
||||
}
|
||||
</style>
|
||||
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<v-row class="justify-center bg">
|
||||
<v-row class="justify-center ma-0 bg">
|
||||
<v-col
|
||||
class="py-2"
|
||||
lg="6"
|
||||
>
|
||||
<News-list
|
||||
@@ -21,7 +22,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.bg {
|
||||
/* .bg {
|
||||
background: url("@/assets/1.jpg") center center;
|
||||
}
|
||||
} */
|
||||
</style>
|
||||
Reference in new issue
Block a user