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