edit: alt text dans panneau image, gestion des messages vides

This commit is contained in:
2026-04-04 19:08:45 +02:00
parent c94b22444a
commit f56ee81f6d
5 changed files with 18 additions and 6 deletions
+10 -2
View File
@@ -9,8 +9,14 @@ function idAndDate(str){
function titleAndContent(str){ function titleAndContent(str){
let data = str.split(" :"); let data = str.split(" :");
let title = data[0]; let title = "NO_TITLE";
let contentData = data[1].split("<br>").filter(e => e); if (data.length > 1){
title = data[0];
}
let contentData = [""];
if (data[1]){
contentData = data[1].split('<br>').filter(e => e);
}
let content = ""; let content = "";
let src = []; let src = [];
for(let line of contentData){ for(let line of contentData){
@@ -120,6 +126,7 @@ export async function loadPeopleData() {
}; };
} else if (pouet.media_attachments?.length > 0) { } else if (pouet.media_attachments?.length > 0) {
let textInfos = titleAndContent(pouet.content); let textInfos = titleAndContent(pouet.content);
console.log(pouet);
entry = { entry = {
id: 'img' + username + infos.id, id: 'img' + username + infos.id,
date: infos.date, date: infos.date,
@@ -128,6 +135,7 @@ export async function loadPeopleData() {
author: username, author: username,
caption: textInfos.title + '.star', caption: textInfos.title + '.star',
src: pouet.media_attachments[0].url, src: pouet.media_attachments[0].url,
alt: pouet.media_attachments[0].description,
description: textInfos.content, description: textInfos.content,
like: pouet.favourites_count, like: pouet.favourites_count,
isSelected: false isSelected: false
+1
View File
@@ -14,6 +14,7 @@ export const dataStorage = reactive({
src: "", src: "",
caption: "", caption: "",
like: 0, like: 0,
alt: "",
isLiked: false isLiked: false
}, },
selectedLink:{ selectedLink:{
@@ -379,6 +379,7 @@
src: e.src, src: e.src,
caption: e.caption, caption: e.caption,
like: e.like, like: e.like,
alt: e.alt,
isLiked: e.isLiked isLiked: e.isLiked
} }
this.displayedDescription = e.description; this.displayedDescription = e.description;
@@ -21,7 +21,7 @@
</button> </button>
</div> </div>
<div class="windowContent" id="visualizerContent"> <div class="windowContent" id="visualizerContent">
<img :src="selectedImg.src" id="displayedImgStyle"> <img :src="selectedImg.src" id="displayedImgStyle" :alt="selectedImg.alt">
<div class="reactBar"> <div class="reactBar">
<p class="reactStatStyle">{{selectedImg.like}}</p> <p class="reactStatStyle">{{selectedImg.like}}</p>
<button data-tooltip="j'aime bien" type="button" class="iconBtnStyle" :class="{reactedStyle: selectedImg.isLiked}" @mousedown.capture="likeImg" @touchstart.capture="likeImg"> <button data-tooltip="j'aime bien" type="button" class="iconBtnStyle" :class="{reactedStyle: selectedImg.isLiked}" @mousedown.capture="likeImg" @touchstart.capture="likeImg">
@@ -42,8 +42,8 @@
si tu as envie de participer ! si tu as envie de participer !
</p> </p>
<button type="button" class="textBtnStyle" @click="openPannel('follow')">NOUS SUIVRE HORS DES RÉSEAUX!</button> <button type="button" class="textBtnStyle" @click="openPannel('follow')">NOUS SUIVRE HORS DES RÉSEAUX!</button>
<button type="button" class="textBtnStyle" @click="openPannel('donation')">NOUS FAIRE UNE DONATION</button> <button type="button" class="textBtnStyle" @click="openPannel('donation')" v-show="false">NOUS FAIRE UNE DONATION</button>
<button type="button" class="textBtnStyle" id="ticketButton" @click="openPannel('ticket')">RÉSERVER MA PLACE!</button> <button type="button" class="textBtnStyle" id="ticketButton" @click="openPannel('ticket')" v-show="false">RÉSERVER MA PLACE!</button>
</div> </div>
<div id="btnColumn"> <div id="btnColumn">
<button type="button" class="iconBtnStyle" id="btnArtist" @click="openPannel('artist')" data-tooltip="à propos de nous"> <button type="button" class="iconBtnStyle" id="btnArtist" @click="openPannel('artist')" data-tooltip="à propos de nous">
@@ -215,17 +215,19 @@
position: absolute; position: absolute;
top: -80px; top: -80px;
left: 64%; left: 64%;
animation: float 1.61s infinite; /*animation: float 1.61s infinite;*/
color: var(--main-color); color: var(--main-color);
background-color: var(--accent-color); background-color: var(--accent-color);
width: 50%; width: 50%;
} }
/*
#ticketButton.textBtnStyle:hover{ #ticketButton.textBtnStyle:hover{
background-color: var(--main-color); background-color: var(--main-color);
animation: none; animation: none;
border-color: var(--accent-color); border-color: var(--accent-color);
color: var(--accent-color); color: var(--accent-color);
} }
*/
/*================ MID FORMAT*/ /*================ MID FORMAT*/
@media(min-width:500px){ @media(min-width:500px){