Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
Amadeus
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Wiki externe
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de paquets
Registre de conteneurs
Registre de modèles
Opération
Environnements
Modules Terraform
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse CI/CD
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté GitLab
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
bakaclub
Amadeus
Validations
6b295b5d
Vérifiée
Valider
6b295b5d
rédigé
Il y a 4 ans
par
Kubat
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
First try to update the play/pause button depending on lektord state
parent
906877ca
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion
!12
Config and signals refactor
Modifications
4
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
4 fichiers modifiés
common/lkt.js
+1
-0
1 ajout, 0 suppression
common/lkt.js
instance/main.js
+18
-4
18 ajouts, 4 suppressions
instance/main.js
instance/views/progressBar.ejs
+2
-2
2 ajouts, 2 suppressions
instance/views/progressBar.ejs
main.js
+2
-0
2 ajouts, 0 suppression
main.js
avec
23 ajouts
et
6 suppressions
common/lkt.js
+
1
−
0
Voir le fichier @
6b295b5d
...
@@ -258,6 +258,7 @@ class LktClient {
...
@@ -258,6 +258,7 @@ class LktClient {
song
:
song
,
song
:
song
,
};
};
}
}
static
getSongTimeData
()
{
static
getSongTimeData
()
{
return
this
.
timeData
;
return
this
.
timeData
;
}
}
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
instance/main.js
+
18
−
4
Voir le fichier @
6b295b5d
...
@@ -12,6 +12,19 @@ var dragCounter = 0;
...
@@ -12,6 +12,19 @@ var dragCounter = 0;
var
leavedElement
;
var
leavedElement
;
var
isDnDFromDB
=
false
;
var
isDnDFromDB
=
false
;
function
updatePlayPauseButton
(
state
)
{
logger
.
debug
(
'
instance
'
,
`State was
${
state
}
`
);
if
(
state
===
'
play
'
)
{
/* Play */
$
(
'
#commandPlay
'
).
children
().
addClass
(
'
fa-pause
'
);
$
(
'
#commandPlay
'
).
children
().
removeClass
(
'
fa-play
'
);
}
else
{
/* Pause or Stop */
$
(
'
#commandPlay
'
).
children
().
addClass
(
'
fa-play
'
);
$
(
'
#commandPlay
'
).
children
().
removeClass
(
'
fa-pause
'
);
}
}
function
addIpcToButton
(
btnId
,
ipc
)
{
function
addIpcToButton
(
btnId
,
ipc
)
{
document
.
getElementById
(
btnId
).
addEventListener
(
'
click
'
,
()
=>
{
document
.
getElementById
(
btnId
).
addEventListener
(
'
click
'
,
()
=>
{
ipc
.
forEach
(
ipc
=>
{
ipc
.
forEach
(
ipc
=>
{
...
@@ -91,6 +104,7 @@ window.onload = () => {
...
@@ -91,6 +104,7 @@ window.onload = () => {
setInterval
(()
=>
ipcRenderer
.
send
(
'
verify-queue-reloaded-request
'
),
50
);
setInterval
(()
=>
ipcRenderer
.
send
(
'
verify-queue-reloaded-request
'
),
50
);
setInterval
(()
=>
ipcRenderer
.
send
(
'
get-song-time-data
'
),
50
);
setInterval
(()
=>
ipcRenderer
.
send
(
'
get-song-time-data
'
),
50
);
setInterval
(()
=>
ipcRenderer
.
send
(
'
get-runnings
'
),
10000
);
setInterval
(()
=>
ipcRenderer
.
send
(
'
get-runnings
'
),
10000
);
setInterval
(()
=>
ipcRenderer
.
send
(
'
verify-state
'
),
500
);
logger
.
debug
(
'
instance
'
,
'
Window loaded
'
);
logger
.
debug
(
'
instance
'
,
'
Window loaded
'
);
$
(
'
#filterInput
'
).
on
(
'
keypress
'
,
e
=>
{
$
(
'
#filterInput
'
).
on
(
'
keypress
'
,
e
=>
{
...
@@ -165,6 +179,8 @@ ipcRenderer.on('reload-queue-responce', (event, arg) => {
...
@@ -165,6 +179,8 @@ ipcRenderer.on('reload-queue-responce', (event, arg) => {
[].
forEach
.
call
(
document
.
querySelectorAll
(
'
#panelRight .karaCard
'
),
addQueueKaraEventHandlers
);
[].
forEach
.
call
(
document
.
querySelectorAll
(
'
#panelRight .karaCard
'
),
addQueueKaraEventHandlers
);
});
});
ipcRenderer
.
on
(
'
send-state
'
,
(
event
,
state
)
=>
updatePlayPauseButton
(
state
));
ipcRenderer
.
on
(
'
send-song-time-data
'
,
(
event
,
timeData
)
=>
{
ipcRenderer
.
on
(
'
send-song-time-data
'
,
(
event
,
timeData
)
=>
{
document
.
getElementById
(
'
progressBar
'
).
style
.
width
=
`
${
document
.
getElementById
(
'
progressBar
'
).
style
.
width
=
`
${
(
timeData
.
elapsed
/
timeData
.
total
)
*
document
.
documentElement
.
clientWidth
(
timeData
.
elapsed
/
timeData
.
total
)
*
document
.
documentElement
.
clientWidth
...
@@ -175,11 +191,9 @@ ipcRenderer.on('send-song-time-data', (event, timeData) => {
...
@@ -175,11 +191,9 @@ ipcRenderer.on('send-song-time-data', (event, timeData) => {
currentSong
=
timeData
.
song
;
currentSong
=
timeData
.
song
;
}
}
document
.
getElementsByClassName
(
'
karaQueue
'
)[
timeData
.
song
].
style
.
background
=
'
#6b7d8e
'
;
document
.
getElementsByClassName
(
'
karaQueue
'
)[
timeData
.
song
].
style
.
background
=
'
#6b7d8e
'
;
}
else
{
}
else
if
(
document
.
getElementsByClassName
(
'
karaQueue
'
)[
timeData
.
song
])
{
if
(
document
.
getElementsByClassName
(
'
karaQueue
'
)[
timeData
.
song
])
{
document
.
getElementsByClassName
(
'
karaQueue
'
)[
timeData
.
song
].
style
.
background
=
'
#4e5d6c
'
;
document
.
getElementsByClassName
(
'
karaQueue
'
)[
timeData
.
song
].
style
.
background
=
'
#4e5d6c
'
;
}
}
}
});
});
ipcRenderer
.
on
(
'
send-runnings
'
,
(
event
,
arg
)
=>
{
ipcRenderer
.
on
(
'
send-runnings
'
,
(
event
,
arg
)
=>
{
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
instance/views/progressBar.ejs
+
2
−
2
Voir le fichier @
6b295b5d
<%# vim: ts=4 syntax=html
<%# vim: ts=4 syntax=html
The template for the progress bar at the bottom of the screen %>
The template for the progress bar at the bottom of the screen %>
<
div
id="progress" class="progress" style="z-index: 666; position: fixed !important; right: 0; left: 0; bottom: 0; height: 14px">
<
span
id="progress" class="progress" style="z-index: 666; position: fixed !important; right: 0; left: 0; bottom: 0; height: 14px
; border-top: 2px solid rgba(0, 0, 0, 0.125);
">
<div class="progress-bar" id="progressBar" role="progressbar"
<div class="progress-bar" id="progressBar" role="progressbar"
style="-webkit-transition: none; -moz-transition: none; -ms-transition: none; -o-transition: none; transition: none;">
style="-webkit-transition: none; -moz-transition: none; -ms-transition: none; -o-transition: none; transition: none;">
</div>
</div>
</
div
>
</
span
>
Ce diff est replié.
Cliquez pour l'agrandir.
main.js
+
2
−
0
Voir le fichier @
6b295b5d
...
@@ -280,6 +280,8 @@ ipcMain.on('add-kara-queue-pos', (event, addparams) => {
...
@@ -280,6 +280,8 @@ ipcMain.on('add-kara-queue-pos', (event, addparams) => {
lkt
.
commandQueueAddId
(
addparams
.
id
).
then
(()
=>
lkt
.
commandMove
(
addparams
.
queueSize
+
1
,
addparams
.
position
));
lkt
.
commandQueueAddId
(
addparams
.
id
).
then
(()
=>
lkt
.
commandMove
(
addparams
.
queueSize
+
1
,
addparams
.
position
));
});
});
ipcMain
.
on
(
'
verify-state
'
,
(
event
,
arg
)
=>
lkt
.
commandStatus
().
then
(
data
=>
event
.
reply
(
'
send-state
'
,
data
.
state
)));
ipcMain
.
on
(
'
get-song-time-data
'
,
(
event
,
arg
)
=>
{
ipcMain
.
on
(
'
get-song-time-data
'
,
(
event
,
arg
)
=>
{
var
newSongTimeData
=
lkt
.
getSongTimeData
();
var
newSongTimeData
=
lkt
.
getSongTimeData
();
if
(
newSongTimeData
.
elapsed
!=
songTimeData
.
elapsed
||
newSongTimeData
.
song
!=
songTimeData
.
song
)
{
if
(
newSongTimeData
.
elapsed
!=
songTimeData
.
elapsed
||
newSongTimeData
.
song
!=
songTimeData
.
song
)
{
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter