edit: bug dans la lecture des msg de l'orga de mastodon + réglages avant prod

This commit is contained in:
2026-04-09 03:55:00 +02:00
parent 275fd74ca9
commit 823b723a43
5 changed files with 16 additions and 12 deletions
+2 -1
View File
@@ -17,8 +17,9 @@ function creditsContent(str){
}
export async function loadAudioData() {
const audioRes = await fetch('./DATA/audioData.json');
const audioRes = await fetch('/DATA/audioData.json');
const aData = await audioRes.json();
//console.log("MUSIC :", aData);
const res = await fetch("https://pouet.drags-nerds.net/api/v1/timelines/public?local=true&limit=40");
if(!res.ok) throw new Error(`Server responded with ${res.status} ${res.statusText}`);
+3 -2
View File
@@ -27,13 +27,14 @@ export async function loadMsgData() {
if(!res.ok) throw new Error(`Server responded with ${res.status} ${res.statusText}`);
const pouets = await res.json();
console.log("POUETS :" , pouets);
const filtered = pouets.filter(p => p.account.username === 'drags_nerds_live');
//console.log(filtered);
console.log("FILTERED :" , filtered);
let msgContent = [];
for (let pouet of filtered){
let textInfos = titleAndContent(pouet.content);
let textInfos = titleAndContent(pouet.text);
let dateInfos = idAndDate(pouet.created_at);
let entry = {
title: textInfos.title,
+5 -5
View File
@@ -22,7 +22,7 @@ function titleAndContent(str){
for(let line of contentData){
if(line.includes('http')||line.includes('@')){
let linkData = line.split("# ");
console.log(linkData);
//console.log(linkData);
let linkNoFormat = linkData[1].split("\"");
let url = "";
for(let el of linkNoFormat){
@@ -66,7 +66,7 @@ function exceptionKey(user, content){
}
export async function loadPeopleData() {
const usernamesRes = await fetch('./DATA/peopleData.json');
const usernamesRes = await fetch('/DATA/peopleData.json');
const pData = await usernamesRes.json();
//console.log("USERS :", pData);
const res = await fetch("https://pouet.drags-nerds.net/api/v1/timelines/public?local=true&limit=40");
@@ -75,9 +75,9 @@ export async function loadPeopleData() {
throw new Error(`Server responded with ${res.status} ${res.statusText}`);
const pouets = await res.json();
console.log("POUETS :" , pouets);
//console.log("POUETS :" , pouets);
const filtered = pouets.filter(p => pData.some(user => p.account.username === user.name));
console.log("FILTERED :" , filtered);
//console.log("FILTERED :" , filtered);
const files = {};
for (const user of pData) {
files[user.name] = [];
@@ -127,7 +127,7 @@ export async function loadPeopleData() {
};
} else if (pouet.media_attachments?.length > 0) {
let textInfos = titleAndContent(pouet.content);
console.log(pouet);
//console.log(pouet);
entry = {
id: 'img' + displayName + infos.id,
date: infos.date,
@@ -51,17 +51,19 @@
position: fixed;
top:50%;
left:3.33%;
width: 333px;
height: 333px;
width: 400px;
height: 400px;
}
#msgContent{
width: 100%;
width: 95%;
height: 100%;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
overflow-y: scroll;
}
/*================ PC LARGE*/
@media(min-width:1000px){
#msgVisualizer{
@@ -80,6 +82,7 @@
padding-left: 7.77px;
margin-top: 0;
height: 77%;
pointer-events: all;
overflow-y: scroll;
}
</style>
-1
View File
@@ -5,7 +5,6 @@ import svgLoader from 'vite-svg-loader'
// https://vite.dev/config/
export default defineConfig({
base: './',
plugins: [vue(), svgLoader()],
server:{
host: '0.0.0.0',