Merge branch 'home-page' of codefirst.iut.uca.fr:IQBall/Application-Web
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
76141f86ee
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
// Utilisez IntelliSense pour en savoir plus sur les attributs possibles.
|
||||||
|
// Pointez pour afficher la description des attributs existants.
|
||||||
|
// Pour plus d'informations, visitez : https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Launch built-in server and debug",
|
||||||
|
"type": "php",
|
||||||
|
"request": "launch",
|
||||||
|
"runtimeArgs": [
|
||||||
|
"-S",
|
||||||
|
"localhost:8080",
|
||||||
|
"-t",
|
||||||
|
"./public"
|
||||||
|
],
|
||||||
|
"port": 8080,
|
||||||
|
"serverReadyAction": {
|
||||||
|
"action": "openExternally"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Debug current script in console",
|
||||||
|
"type": "php",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${file}",
|
||||||
|
"cwd": "${fileDirname}",
|
||||||
|
"externalConsole": false,
|
||||||
|
"port": 9003
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Listen for Xdebug",
|
||||||
|
"type": "php",
|
||||||
|
"request": "launch",
|
||||||
|
"port": 9003
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
After Width: | Height: | Size: 747 B |
After Width: | Height: | Size: 3.2 KiB |
@ -0,0 +1,114 @@
|
|||||||
|
@import url(variable.css);
|
||||||
|
|
||||||
|
body {
|
||||||
|
/* background-color: #303030; */
|
||||||
|
}
|
||||||
|
#main {
|
||||||
|
/* margin-left : 10%;
|
||||||
|
margin-right: 10%; */
|
||||||
|
/* border : solid 1px #303030; */
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
font-family: Helvetica;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header {
|
||||||
|
text-align: center;
|
||||||
|
background-color: var(--main-color);
|
||||||
|
margin: 0px;
|
||||||
|
/* border : var(--accent-color) 1px ésolid; */
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
/* border-radius: 0.75cap; */
|
||||||
|
}
|
||||||
|
|
||||||
|
#IQBall {
|
||||||
|
color: var(--accent-color);
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 45px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#IQBall {
|
||||||
|
color: #ffa238;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 45px;
|
||||||
|
}
|
||||||
|
#body {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
margin: 0px;
|
||||||
|
height: 100%;
|
||||||
|
background-color: var(--second-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.data {
|
||||||
|
border: 1.5px solid var(--main-contrast-color);
|
||||||
|
background-color: var(--main-color);
|
||||||
|
border-radius: 0.75cap;
|
||||||
|
color: var(--main-contrast-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.data:hover {
|
||||||
|
border-color: var(--accent-color);
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.listTactic {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.SetButton {
|
||||||
|
width: 80%;
|
||||||
|
margin-left: 5%;
|
||||||
|
margin-top: 5%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#img-account {
|
||||||
|
width: 100%;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header-right,
|
||||||
|
#header-left {
|
||||||
|
width: 10%;
|
||||||
|
/* border: yellow 2px solid; */
|
||||||
|
}
|
||||||
|
|
||||||
|
#header-right {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#username {
|
||||||
|
color: var(--main-contrast-color);
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clickable-header-right:hover #username {
|
||||||
|
color: var(--accent-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
#header-center {
|
||||||
|
width: 80%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clickable-header-right {
|
||||||
|
width: 40%;
|
||||||
|
border-radius: 1cap;
|
||||||
|
padding: 2%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clickable-header-right:hover {
|
||||||
|
border: orange 1px solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clickable {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
#img-account {
|
||||||
|
width: 100%;
|
||||||
|
}
|
@ -0,0 +1,94 @@
|
|||||||
|
|
||||||
|
#main {
|
||||||
|
margin-left : 10%;
|
||||||
|
margin-right: 10%;
|
||||||
|
border : solid 2px purple;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
font-family: Helvetica,;
|
||||||
|
}
|
||||||
|
|
||||||
|
.new {
|
||||||
|
border-radius: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header {
|
||||||
|
text-align: center;
|
||||||
|
<<<<<<< HEAD:front/style/home.css
|
||||||
|
background-color: green;
|
||||||
|
margin : 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#body {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
border : solid 10px violet;
|
||||||
|
margin:0px
|
||||||
|
}
|
||||||
|
|
||||||
|
#personal-space {
|
||||||
|
background-color: orange;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#sideMenu {
|
||||||
|
background-color: grey;
|
||||||
|
}
|
||||||
|
|
||||||
|
#titlePersonalSpace h2 {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sideMenu h2 {
|
||||||
|
display: inline-block;
|
||||||
|
margin-right : 5%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.titreSideMenu {
|
||||||
|
border-bottom: black solid 2px;
|
||||||
|
width: 95%;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#sideMenu .title {
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: bold;
|
||||||
|
color : #FFFFFF;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
background-color: black;
|
||||||
|
padding : 1.5%;
|
||||||
|
margin-bottom: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bodyPersonalSpace {
|
||||||
|
width: 95%;
|
||||||
|
border : 1px red solid;
|
||||||
|
align-self: center;
|
||||||
|
}
|
||||||
|
#bodyPersonalSpace table{
|
||||||
|
width: 100%;
|
||||||
|
border-collapse : separate;
|
||||||
|
border-spacing : 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
border : 3px solid black;
|
||||||
|
padding-bottom : 1%;
|
||||||
|
padding-top : 1%;
|
||||||
|
margin: 80px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
td:hover {
|
||||||
|
background-color: red;
|
||||||
|
|
||||||
|
=======
|
||||||
|
}
|
||||||
|
|
||||||
|
#title {
|
||||||
|
background-color: aqua;
|
||||||
|
>>>>>>> 6d36115 (WIP page home):front/style/home/titre.css
|
||||||
|
}
|
@ -0,0 +1,40 @@
|
|||||||
|
#personal-space {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
#titlePersonalSpace h2 {
|
||||||
|
text-align: center;
|
||||||
|
color: var(--main-contrast-color);
|
||||||
|
/* font-family: Helvetica;
|
||||||
|
font-weight: bold; */
|
||||||
|
}
|
||||||
|
|
||||||
|
#bodyPersonalSpace {
|
||||||
|
width: 95%;
|
||||||
|
/* background-color: #ccc2b7; */
|
||||||
|
border: 3px var(--main-color) solid;
|
||||||
|
border-radius: 0.5cap;
|
||||||
|
align-self: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bodyPersonalSpace table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: separate;
|
||||||
|
border-spacing: 1em;
|
||||||
|
table-layout: fixed;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bodyPersonalSpace td {
|
||||||
|
width: 80px !important;
|
||||||
|
padding-bottom: 1%;
|
||||||
|
padding-top: 1%;
|
||||||
|
height: fit-content;
|
||||||
|
text-align: center;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
tbody p {
|
||||||
|
text-align: center;
|
||||||
|
}
|
@ -0,0 +1,53 @@
|
|||||||
|
@import url(variable.css);
|
||||||
|
|
||||||
|
#sideMenu {
|
||||||
|
background-color: var(--third-color);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sideMenu h2 {
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 5%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sideMenuContent {
|
||||||
|
width: 90%;
|
||||||
|
}
|
||||||
|
.titreSideMenu {
|
||||||
|
border-bottom: var(--main-color) solid 3px;
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 3%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sideMenu .title {
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: var(--main-contrast-color);
|
||||||
|
letter-spacing: 1px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
background-color: var(--main-color);
|
||||||
|
padding: 3%;
|
||||||
|
margin-bottom: 0px;
|
||||||
|
margin-right: 3%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.new {
|
||||||
|
border-radius: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.buttonSideMenu {
|
||||||
|
/* border : black solid 1px; */
|
||||||
|
border-radius: 0.5cap;
|
||||||
|
width: fit-content;
|
||||||
|
padding: 2%;
|
||||||
|
margin-top: 3%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.buttonSideMenu:hover {
|
||||||
|
/* background-color: #c9d1e0; */
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
:root {
|
||||||
|
--main-color: #191a21;
|
||||||
|
--second-color: #282a36;
|
||||||
|
--third-color: #303341;
|
||||||
|
--accent-color: #ffa238;
|
||||||
|
--main-contrast-color: #e6edf3;
|
||||||
|
}
|
@ -0,0 +1,306 @@
|
|||||||
|
import "../style/home.css"
|
||||||
|
import "../style/personnal_space.css"
|
||||||
|
import "../style/side_menu.css"
|
||||||
|
// import AccountSvg from "../assets/account.svg?react"
|
||||||
|
import { CSSProperties, useRef } from "react"
|
||||||
|
|
||||||
|
interface Tactic {
|
||||||
|
id: number
|
||||||
|
name: string
|
||||||
|
creation_date: string
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Team {
|
||||||
|
id: number
|
||||||
|
name: string
|
||||||
|
picture: string
|
||||||
|
main_color: string
|
||||||
|
second_color: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function Home({
|
||||||
|
lastTactics,
|
||||||
|
allTactics,
|
||||||
|
teams,
|
||||||
|
username,
|
||||||
|
}: {
|
||||||
|
lastTactics: Tactic[]
|
||||||
|
allTactics: Tactic[]
|
||||||
|
teams: Team[]
|
||||||
|
username: string
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<div id="main">
|
||||||
|
<Title username={username} />
|
||||||
|
<Body
|
||||||
|
lastTactics={lastTactics}
|
||||||
|
allTactics={allTactics}
|
||||||
|
teams={teams}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param param0 username
|
||||||
|
* @returns Header
|
||||||
|
*/
|
||||||
|
export function Title({ username }: { username: string }) {
|
||||||
|
return (
|
||||||
|
<div id="header">
|
||||||
|
<div id="header-left"></div>
|
||||||
|
<div id="header-center">
|
||||||
|
<h1
|
||||||
|
id="IQBall"
|
||||||
|
className="clickable"
|
||||||
|
onClick={() => {
|
||||||
|
location.pathname = "/"
|
||||||
|
}}>
|
||||||
|
<span id="IQ">IQ</span>
|
||||||
|
<span id="Ball">Ball</span>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
<div id="header-right">
|
||||||
|
<div className="clickable" id="clickable-header-right">
|
||||||
|
{/* <AccountSvg id="img-account" /> */}
|
||||||
|
<img
|
||||||
|
id="img-account"
|
||||||
|
src="account.svg"
|
||||||
|
onClick={() => {
|
||||||
|
location.pathname = "/settings"
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<p id="username">{username}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function Body({
|
||||||
|
lastTactics,
|
||||||
|
allTactics,
|
||||||
|
teams,
|
||||||
|
}: {
|
||||||
|
lastTactics: Tactic[]
|
||||||
|
allTactics: Tactic[]
|
||||||
|
teams: Team[]
|
||||||
|
}) {
|
||||||
|
const widthPersonalSpace = 78
|
||||||
|
const widthSideMenu = 100 - widthPersonalSpace
|
||||||
|
return (
|
||||||
|
<div id="body">
|
||||||
|
<PersonalSpace width={widthPersonalSpace} allTactics={allTactics} />
|
||||||
|
<SideMenu
|
||||||
|
width={widthSideMenu}
|
||||||
|
lastTactics={lastTactics}
|
||||||
|
teams={teams}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function SideMenu({
|
||||||
|
width,
|
||||||
|
lastTactics,
|
||||||
|
teams,
|
||||||
|
}: {
|
||||||
|
width: number
|
||||||
|
lastTactics: Tactic[]
|
||||||
|
teams: Team[]
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
id="sideMenu"
|
||||||
|
style={{
|
||||||
|
width: width + "%",
|
||||||
|
}}>
|
||||||
|
<div id="sideMenuContent">
|
||||||
|
<Team teams={teams} />
|
||||||
|
<Tactic lastTactics={lastTactics} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function PersonalSpace({
|
||||||
|
width,
|
||||||
|
allTactics,
|
||||||
|
}: {
|
||||||
|
width: number
|
||||||
|
allTactics: Tactic[]
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
id="personal-space"
|
||||||
|
style={{
|
||||||
|
width: width + "%",
|
||||||
|
}}>
|
||||||
|
<TitlePersonalSpace />
|
||||||
|
<BodyPersonalSpace allTactics={allTactics} />
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
function TitlePersonalSpace() {
|
||||||
|
return (
|
||||||
|
<div id="titlePersonalSpace">
|
||||||
|
<h2>Espace Personnel</h2>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
function TableData({ allTactics }: { allTactics: Tactic[] }) {
|
||||||
|
const nbRow = Math.floor(allTactics.length / 3) + 1
|
||||||
|
let listTactic = Array(nbRow)
|
||||||
|
for (let i = 0; i < nbRow; i++) {
|
||||||
|
listTactic[i] = Array(0)
|
||||||
|
}
|
||||||
|
let i = 0
|
||||||
|
let j = 0
|
||||||
|
allTactics.forEach((tactic) => {
|
||||||
|
listTactic[i].push(tactic)
|
||||||
|
j++
|
||||||
|
if (j === 3) {
|
||||||
|
i++
|
||||||
|
j = 0
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
i = 0
|
||||||
|
while (i < nbRow) {
|
||||||
|
listTactic[i] = listTactic[i].map((tactic: Tactic) => (
|
||||||
|
<td
|
||||||
|
key={tactic.id}
|
||||||
|
className="data"
|
||||||
|
onClick={() => {
|
||||||
|
location.pathname = "/tactic/" + tactic.id + "/edit"
|
||||||
|
}}>
|
||||||
|
{troncName(tactic.name, 25)}
|
||||||
|
</td>
|
||||||
|
))
|
||||||
|
i++
|
||||||
|
}
|
||||||
|
if (nbRow == 1) {
|
||||||
|
if (listTactic[0].length < 3) {
|
||||||
|
for (let i = 0; i <= 3 - listTactic[0].length; i++) {
|
||||||
|
listTactic[0].push(<td key={"tdNone" + i}></td>)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const data = listTactic.map((tactic, rowIndex) => (
|
||||||
|
<tr key={rowIndex + "row"}>{tactic}</tr>
|
||||||
|
))
|
||||||
|
return data
|
||||||
|
}
|
||||||
|
|
||||||
|
function BodyPersonalSpace({ allTactics }: { allTactics: Tactic[] }) {
|
||||||
|
let data
|
||||||
|
if (allTactics.length == 0) {
|
||||||
|
data = <p>Aucune tactique créé !</p>
|
||||||
|
} else {
|
||||||
|
data = <TableData allTactics={allTactics} />
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div id="bodyPersonalSpace">
|
||||||
|
<table>
|
||||||
|
<tbody key="tbody">{data}</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function Team({ teams }: { teams: Team[] }) {
|
||||||
|
const listTeam = teams.map((team, rowIndex) => (
|
||||||
|
<li key={"team" + rowIndex}>
|
||||||
|
{team.name}
|
||||||
|
<button onClick={() => (location.pathname = "/team/" + team.id)}>
|
||||||
|
open
|
||||||
|
</button>
|
||||||
|
</li>
|
||||||
|
))
|
||||||
|
return (
|
||||||
|
<div id="teams">
|
||||||
|
<div className="titreSideMenu">
|
||||||
|
<h2 className="title">Mes équipes</h2>
|
||||||
|
<button
|
||||||
|
className="new"
|
||||||
|
onClick={() => (location.pathname = "/team/new")}>
|
||||||
|
+
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<SetButtonTeam teams={teams} />
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function Tactic({ lastTactics }: { lastTactics: Tactic[] }) {
|
||||||
|
return (
|
||||||
|
<div id="tactic">
|
||||||
|
<div className="titreSideMenu">
|
||||||
|
<h2 className="title">Mes dernières stratégies</h2>
|
||||||
|
<button
|
||||||
|
className="new"
|
||||||
|
id="createTactic"
|
||||||
|
onClick={() => (location.pathname = "/tactic/new")}>
|
||||||
|
+
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<SetButtonTactic tactics={lastTactics} />
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
function SetButtonTactic({ tactics }: { tactics: Tactic[] }) {
|
||||||
|
const lastTactics = tactics.map((tactic) => (
|
||||||
|
<ButtonLastTactic tactic={tactic} />
|
||||||
|
))
|
||||||
|
return <div className="SetButton">{lastTactics}</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
function SetButtonTeam({ teams }: { teams: Team[] }) {
|
||||||
|
const listTeam = teams.map((teams) => <ButtonTeam team={teams} />)
|
||||||
|
return <div className="SetButton">{listTeam}</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
function ButtonTeam({ team }: { team: Team }) {
|
||||||
|
const name = troncName(team.name, 20)
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<div
|
||||||
|
id={"ButtonTeam" + team.id}
|
||||||
|
className="buttonSideMenu data"
|
||||||
|
onClick={() => {
|
||||||
|
location.pathname = "/team/" + team.id
|
||||||
|
}}>
|
||||||
|
{name}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
function ButtonLastTactic({ tactic }: { tactic: Tactic }) {
|
||||||
|
const name = troncName(tactic.name, 20)
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
id={"Button" + tactic.id}
|
||||||
|
className="buttonSideMenu data"
|
||||||
|
onClick={() => {
|
||||||
|
location.pathname = "/tactic/" + tactic.id + "/edit"
|
||||||
|
}}>
|
||||||
|
{name}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
function troncName(name: string, limit: number): string {
|
||||||
|
if (name.length > limit) {
|
||||||
|
name = name.substring(0, limit) + "..."
|
||||||
|
} else {
|
||||||
|
name = name
|
||||||
|
}
|
||||||
|
return name
|
||||||
|
}
|
After Width: | Height: | Size: 747 B |
Loading…
Reference in new issue