Новости
This commit is contained in:
1 parent
f356492969
commit
4d4c9657f9
2 files changed
+24
-157
No files matched your search
BIN
Binary file not shown.
@@ -6,125 +6,35 @@
|
|||||||
class="mx-auto mb-0 "
|
class="mx-auto mb-0 "
|
||||||
v-for="(x, i) in newss" :key= i
|
v-for="(x, i) in newss" :key= i
|
||||||
>
|
>
|
||||||
|
<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>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<v-list-item-title>{{x.author.fio}}</v-list-item-title>
|
||||||
|
|
||||||
|
<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
|
<v-img
|
||||||
:src="`${burl}${x.link}`"
|
:src="`${burl}${x.link}`"
|
||||||
height="164px"
|
height="164px"
|
||||||
cover
|
cover
|
||||||
|
width="96%"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<v-card-title>
|
|
||||||
{{x.title}}
|
|
||||||
</v-card-title>
|
|
||||||
|
|
||||||
<v-card-subtitle>
|
<v-card-text class="py-3">
|
||||||
{{limitText(x.text)}}
|
{{limitText(x.text)}}
|
||||||
</v-card-subtitle>
|
</v-card-text>
|
||||||
|
|
||||||
<v-card-actions>
|
|
||||||
<v-btn
|
|
||||||
color="teal-accent-4"
|
|
||||||
variant="text"
|
|
||||||
>
|
|
||||||
{{x.author.fio}}
|
|
||||||
|
|
||||||
</v-btn>
|
|
||||||
|
|
||||||
<v-spacer></v-spacer>
|
|
||||||
|
|
||||||
<v-btn
|
|
||||||
:icon="x.show ? 'mdi-chevron-up' : 'mdi-chevron-down'"
|
|
||||||
@click="x.show = !x.show"
|
|
||||||
></v-btn>
|
|
||||||
</v-card-actions>
|
|
||||||
|
|
||||||
<v-expand-transition>
|
|
||||||
<div v-show="x.show">
|
|
||||||
<v-divider/>
|
|
||||||
|
|
||||||
<v-card-text>
|
|
||||||
{{x.text}}
|
|
||||||
</v-card-text>
|
|
||||||
<v-divider/>
|
|
||||||
<v-card-actions >
|
|
||||||
<v-row >
|
|
||||||
<v-col>
|
|
||||||
<!-- :variant="x.scores.filter(e=> e.user==accountStore.user.id && e.score == true).length>0?'text':'tonal'" -->
|
|
||||||
<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)"
|
|
||||||
/>
|
|
||||||
{{x.scores.filter(e=> e.score==true).length}}
|
|
||||||
|
|
||||||
</v-col>
|
|
||||||
<v-col class=" ml-8">
|
|
||||||
<v-btn
|
|
||||||
variant="text"
|
|
||||||
icon="mdi-message-text-outline"
|
|
||||||
color="teal"
|
|
||||||
@click="openComent(x.id)"
|
|
||||||
/>
|
|
||||||
<span @click="x.showComment=!x.showComment"
|
|
||||||
class="pointer"
|
|
||||||
>
|
|
||||||
{{ x.comment.length }}
|
|
||||||
</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>
|
|
||||||
<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-card>
|
||||||
|
|
||||||
<!-- ---------------------------------------------------------------------------------- -->
|
<!-- ---------------------------------------------------------------------------------- -->
|
||||||
@@ -216,7 +126,7 @@
|
|||||||
|
|
||||||
:border="accountStore.user.login==y.author.login?'end':'start'"
|
:border="accountStore.user.login==y.author.login?'end':'start'"
|
||||||
:border-color="accountStore.user.login==y.author.login?'success':'deep-purple accent-4'"
|
:border-color="accountStore.user.login==y.author.login?'success':'deep-purple accent-4'"
|
||||||
elevation=""
|
elevation=0
|
||||||
>
|
>
|
||||||
|
|
||||||
{{ y.text }}
|
{{ y.text }}
|
||||||
@@ -236,52 +146,6 @@
|
|||||||
|
|
||||||
</v-expand-transition>
|
</v-expand-transition>
|
||||||
|
|
||||||
<!-- <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> -->
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -390,7 +254,10 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const limitText=(text)=> {
|
const limitText=(text)=> {
|
||||||
return text.split(' ').slice(0, 10).join(' ')
|
const t = text.split(' ').slice(0, 25)
|
||||||
|
console.log(text.split(' ').slice(0, 25).join(' '));
|
||||||
|
console.log(t.length<25?'':'...');
|
||||||
|
return `${text.split(' ').slice(0, 25).join(' ')} ${t.length<25?'':'...'}`
|
||||||
}
|
}
|
||||||
|
|
||||||
const splitname = (name) => {
|
const splitname = (name) => {
|
||||||
|
|||||||
Reference in new issue
Block a user