From 7c25390eadfca8d32e84797e579ee94edc1b4208 Mon Sep 17 00:00:00 2001 From: vgaNAR6ta Date: Tue, 7 Jul 2026 01:23:27 +0200 Subject: [PATCH] =?UTF-8?q?edit:=20audioData=20est=20mtn=20const=20reactiv?= =?UTF-8?q?e()=20et=20playlist=20editor=20fonctionne=20cot=C3=A9=20client?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 ++ admin/components/PlaylistEditor.vue | 35 +++++++++++++++++------- src/components/PlayerPannel.vue | 21 ++++++++------- src/data/audioData.js | 42 ++++++++++++++--------------- 4 files changed, 60 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index 9a58d76..1765900 100644 --- a/README.md +++ b/README.md @@ -15,4 +15,6 @@ POUR LE STATUT D'OUVERTURE DU LIEU IL FAUT : NB: les infos indiquées sont surtout là pour prévisualiser, mais ne sont pour l'instant pas plus que des envies personelles par rapport au lieu (rien d'officiel pour l'instant, juste des idées) +PS: BESOIN DE QQN POUR FAIRE LE BACKEND SVP <3 <3 <3 + 333 diff --git a/admin/components/PlaylistEditor.vue b/admin/components/PlaylistEditor.vue index 5845f4f..0b4ffb8 100644 --- a/admin/components/PlaylistEditor.vue +++ b/admin/components/PlaylistEditor.vue @@ -17,9 +17,10 @@

  Artiste     →

+

Note : Laisser vide pour conserver le fichier ↘

  Fichier MP3   →

- +
@@ -108,6 +109,15 @@ color: var(--back-color); background-color: var(--main-color); } + #note{ + width: 66%; + font-family: 'velvelyne'; + font-weight: normal; + font-size: 13.12px; + color: var(--main-color); + margin: 0; + text-align: right; + } .inputDiv{ display: flex; @@ -251,13 +261,12 @@ src: null }, editingSong: null, - fileInput: null + selectedInput: null } }, computed: { displayedPlaylists(){ - let list = loadAudioData() - return list + return loadAudioData }, playlistPannel(){ return pannelStatusList.playlist; @@ -286,7 +295,6 @@ backToDefaultPlaylist(){ this.track = this.playlistDefault.track; this.artist = this.playlistDefault.artist; - this.src = this.playlistDefault.src; this.editingSong = null; this.newSongText = 'Nouveau Son'; }, @@ -296,16 +304,16 @@ artist: this.artist, src: this.src } - + console.log('created or modified entry :', entry) return entry }, savePlaylist(){ let entry = this.createListEntry(); if(this.editingSong){ Object.assign(this.editingSong, { - title: this.title, - href: this.href, - desc: this.desc + track: this.track, + artist: this.artist, + src: this.src }) } else { this.displayedPlaylists.push(entry); @@ -324,6 +332,7 @@ this.track = obj.track; this.artist = obj.artist; this.src = obj.src; + this.newSongText = 'Éditer les infos' this.toggleNewPlaylist(); }, @@ -336,10 +345,16 @@ this.eventAlertActive = false; this.submitPlaylistText = 'SAUVEGARDER'; }, 1610) + }, + modifyFile(){ + if (this.selectedInput.files[0]){ + this.src = this.selectedInput.files[0]; + } } }, mounted(){ - this.fileInput = this.$refs.audioFile; + this.selectedInput = this.$refs.audioFile; + console.log(this.selectedInput) watch( () => this.playlistPannel, () => { if(!this.playlistPannel){ this.newSong = false; diff --git a/src/components/PlayerPannel.vue b/src/components/PlayerPannel.vue index 0b1fa24..633a1e9 100644 --- a/src/components/PlayerPannel.vue +++ b/src/components/PlayerPannel.vue @@ -5,7 +5,6 @@ import PauseIcon from '../assets/icons/pause.svg' import NextIcon from '../assets/icons/next.svg' import PrevIcon from '../assets/icons/prev.svg' - import { loadAudioData } from '@/data/audioData.js'