From 4d4c9657f9bf612795978f68f1ad4bf10379e2cd Mon Sep 17 00:00:00 2001 From: iriska-gri <79623434+iriska-gri@users.noreply.github.com> Date: Fri, 6 Oct 2023 12:21:05 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=BE=D0=B2=D0=BE=D1=81=D1=82=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db.sqlite3 | Bin 315392 -> 315392 bytes front/src/components/news-list.vue | 185 ++++------------------------- 2 files changed, 26 insertions(+), 159 deletions(-) diff --git a/db.sqlite3 b/db.sqlite3 index 62e90d9815cde6423d4d8cfe6e4a4333134ca707..ea0cc073d3796e222e8d2ad9be9f8c51346253c1 100644 GIT binary patch delta 37 tcmZozAl$G(c!D(J(up$8j7u96S`!$zCNOzkWfX5;b(LxRs;kUlzW@hC4)Xv2 delta 40 ycmV+@0N4M3pc8 + + + + {{x.author.fio}} + + Участник + + + {{x.title}} + - - {{x.title}} - - + {{limitText(x.text)}} - + - - - {{x.author.fio}} - - - - - - - - - -
- - - - {{x.text}} - - - - - - - - {{x.scores.filter(e=> e.score==true).length}} - - - - - - {{ x.comment.length }} - - - - - - - {{x.scores.filter(e=> e.score==false).length}} - - - - - - - - - - - -
- -
- -
-
- -
{{dateformat(y.cdate)}} - -
- - -
- -
-
+ @@ -216,7 +126,7 @@ :border="accountStore.user.login==y.author.login?'end':'start'" :border-color="accountStore.user.login==y.author.login?'success':'deep-purple accent-4'" - elevation="" + elevation=0 > {{ y.text }} @@ -235,53 +145,7 @@ - - - - - - - - + @@ -390,7 +254,10 @@ export default { } 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) => {