На заливку
This commit is contained in:
1 parent
a6feb8449f
commit
94bbdeca40
7 files changed
+81
-19
No files matched your search
Generated
+17
-3
@@ -19,6 +19,7 @@
|
||||
"@vuelidate/core": "^2.0.3",
|
||||
"@vuelidate/validators": "^2.0.3",
|
||||
"axios": "^1.4.0",
|
||||
"date-fns": "^2.30.0",
|
||||
"pinia": "^2.0.23",
|
||||
"roboto-fontface": "*",
|
||||
"vue": "^3.2.0",
|
||||
@@ -2171,7 +2172,6 @@
|
||||
"version": "7.22.10",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.10.tgz",
|
||||
"integrity": "sha512-21t/fkKLMZI4pqP2wlmsQAWnYW1PDyKyyUV4vCi+B25ydmdaYTKXPwCj0BzSUnZf4seIiYvSA3jcZ3gdsMFkLQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"regenerator-runtime": "^0.14.0"
|
||||
},
|
||||
@@ -6957,6 +6957,21 @@
|
||||
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz",
|
||||
"integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ=="
|
||||
},
|
||||
"node_modules/date-fns": {
|
||||
"version": "2.30.0",
|
||||
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz",
|
||||
"integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.21.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.11"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/date-fns"
|
||||
}
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
@@ -11421,8 +11436,7 @@
|
||||
"node_modules/regenerator-runtime": {
|
||||
"version": "0.14.0",
|
||||
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz",
|
||||
"integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==",
|
||||
"dev": true
|
||||
"integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA=="
|
||||
},
|
||||
"node_modules/regenerator-transform": {
|
||||
"version": "0.15.2",
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
"@vuelidate/core": "^2.0.3",
|
||||
"@vuelidate/validators": "^2.0.3",
|
||||
"axios": "^1.4.0",
|
||||
"date-fns": "^2.30.0",
|
||||
"pinia": "^2.0.23",
|
||||
"roboto-fontface": "*",
|
||||
"vue": "^3.2.0",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<v-container class="py-1 newsVH px-0 bg-transparent overflow-auto">
|
||||
<my-helper
|
||||
:pretext ="accountStore.user.id"
|
||||
:pretext ="newss"
|
||||
/>
|
||||
<v-card
|
||||
class="mx-auto mb-0 "
|
||||
@@ -50,11 +50,11 @@
|
||||
<v-row >
|
||||
<v-col>
|
||||
<v-btn
|
||||
variant="text"
|
||||
:icon="x.scores.filter(e=> e.user==accountStore.user.id && e.score ==true).length>0?'mdi-thumb-up':'mdi-thumb-up-outline'"
|
||||
color="blue-darken-3"
|
||||
@click="toggleIncrementLike(x.id, true)"
|
||||
/>
|
||||
variant="text"
|
||||
:icon="x.scores.filter(e=> e.user==accountStore.user.id && e.score ==true).length>0?'mdi-thumb-up':'mdi-thumb-up-outline'"
|
||||
color="blue-darken-3"
|
||||
@click="toggleIncrementLike(x.id, true)"
|
||||
/>
|
||||
{{x.scores.filter(e=> e.score==true).length}}
|
||||
<!-- {{ x.likes }} -->
|
||||
</v-col>
|
||||
@@ -63,10 +63,11 @@
|
||||
variant="text"
|
||||
icon="mdi-message-text-outline"
|
||||
color="teal"
|
||||
@click="commentShow=!commentShow"
|
||||
@click="x.showComment=!x.showComment"
|
||||
/>
|
||||
{{ x.comment.length }}
|
||||
<!-- @click="commentadd" -->
|
||||
{{ message }}
|
||||
|
||||
<!-- <v-btn
|
||||
:icon="x.show ? 'mdi-chevron-up' : 'mdi-chevron-down'"
|
||||
@click="x.show = !x.show"
|
||||
@@ -94,8 +95,24 @@
|
||||
|
||||
</v-expand-transition>
|
||||
<v-expand-transition>
|
||||
<div v-show="commentShow">
|
||||
<!-- {{ x.commnet.text }} -->
|
||||
<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)}}</div>
|
||||
|
||||
<v-card
|
||||
width="400"
|
||||
:subtitle=y.author
|
||||
:text=y.text
|
||||
elevation="1"
|
||||
></v-card>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</v-expand-transition>
|
||||
</v-card>
|
||||
@@ -149,6 +166,7 @@ import {getfromserver} from '@/utils/universal_functions'
|
||||
import { baseURL } from '@/utils/axios-api'
|
||||
import myHelper from './UI/my-helper.vue'
|
||||
import { axiosApiInstance } from '@/utils/axios-api'
|
||||
import { format } from 'date-fns'
|
||||
|
||||
const accountStore = useAccountStore()
|
||||
|
||||
@@ -196,6 +214,11 @@ export default {
|
||||
})
|
||||
}
|
||||
|
||||
const dateformat = (datas) => {
|
||||
|
||||
return format(new Date(datas), 'dd.MM.yyyy')
|
||||
}
|
||||
|
||||
const toggleDecrementLike = (idnews) => {
|
||||
// if (likedD.value) {
|
||||
// derementLikes.value--
|
||||
@@ -256,7 +279,8 @@ export default {
|
||||
toggleDecrementLike,
|
||||
dialogCommentShow,
|
||||
commentadd,
|
||||
accountStore
|
||||
accountStore,
|
||||
dateformat
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user