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 conteneur
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é
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
bakaclub
Amadeus
Validations
c78069d6
Vérifiée
Valider
c78069d6
rédigé
4 years ago
par
Kubat
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
INSTANCE: Menu buttons send ipc to main
parent
5c279ee7
Aucune branche associée trouvée
Branches contenant la validation
Aucune étiquette associée trouvée
2 requêtes de fusion
!3
Dev kubat
,
!2
Base interface and system
Modifications
5
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
5 fichiers modifiés
Makefile
+1
-1
1 ajout, 1 suppression
Makefile
client/routes/public.js
+1
-4
1 ajout, 4 suppressions
client/routes/public.js
instance/main.js
+42
-28
42 ajouts, 28 suppressions
instance/main.js
main.js
+14
-6
14 ajouts, 6 suppressions
main.js
style/css/instance.css
+5
-0
5 ajouts, 0 suppression
style/css/instance.css
avec
63 ajouts
et
39 suppressions
Makefile
+
1
−
1
Voir le fichier @
c78069d6
# On debian, yarn is named yarnpkg
YARN
=
yarnpkg
all
:
prepare run
all
:
prepare
style
run
prepare
:
$(
YARN
)
install
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
client/routes/public.js
+
1
−
4
Voir le fichier @
c78069d6
var
express
=
require
(
'
express
'
);
var
router
=
express
.
Router
();
// Simulate karaoke data
dummyKaras
=
require
(
'
../../test/dummyKara.json
'
);
/* GET on root. */
router
.
get
(
'
/
'
,
function
(
req
,
res
,
next
)
{
res
.
render
(
'
public
'
,
{
karas
:
dummyKaras
});
res
.
render
(
'
public
'
,
{
karas
:
[{}]
});
});
module
.
exports
=
router
;
Ce diff est replié.
Cliquez pour l'agrandir.
instance/main.js
+
42
−
28
Voir le fichier @
c78069d6
...
...
@@ -3,45 +3,59 @@ const logger = require('../common/logger.js');
/* prettier-ignore */
const
buttonList
=
[
[
'
left
'
,
`<i class="fas fa-sync-alt"></i>`
,
'
reloadDb
'
,
'
Reload database
'
],
[
'
left
'
,
`<i class="fas fa-play"></i>`
,
'
commandPlay
'
,
'
Play or pause Lektor
'
],
[
'
left
'
,
`<i class="fas fa-stop"></i>`
,
'
commandStop
'
,
'
Stop lektor
'
],
[
'
sleft
'
,
`<i class="fas fa-search"></i>`
,
'
selectAdvence
'
,
'
Advence search
'
],
[
'
sleft
'
,
`<i class="fas fa-database"></i>`
,
'
selectDatabase
'
,
'
Database search
'
],
[
'
sleft
'
,
`<i class="fas fa-list"></i>`
,
'
selectPlaylist
'
,
'
Playlist search
'
],
[
'
sleft
'
,
`<i class="fas fa-bookmark"></i>`
,
'
selectPool
'
,
'
Pool search
'
],
[
'
right
'
,
`<i class="fas fa-user-friends"></i>`
,
'
openUserView
'
,
'
Open client view
'
],
[
'
right
'
,
`<i class="fas fa-sync-alt"></i>`
,
'
reloadQueue
'
,
'
Reload the queue
'
],
[
'
right
'
,
`<i class="fas fa-window-close"></i>`
,
'
closeButton
'
,
'
Quit Lektor-App
'
],
[
'
left
'
,
`<i class="fas fa-sync-alt"></i>`
,
'
reloadDb
'
,
'
Reload database
'
],
[
'
left
'
,
`<i class="fas fa-play"></i>`
,
'
commandPlay
'
,
'
Play or pause Lektor
'
],
[
'
left
'
,
`<i class="fas fa-stop"></i>`
,
'
commandStop
'
,
'
Stop lektor
'
],
[
'
left
'
,
`<i class="fas fa-eraser"></i>`
,
'
commandClear
'
,
'
Clear the queue
'
],
[
'
sleft
'
,
`<i class="fas fa-search"></i>`
,
'
selectAdvence
'
,
'
Advence search
'
],
[
'
sleft
'
,
`<i class="fas fa-database"></i>`
,
'
selectDatabase
'
,
'
Database search
'
],
[
'
sleft
'
,
`<i class="fas fa-tag"></i>`
,
'
selectPlaylist
'
,
'
Playlist search
'
],
[
'
sleft
'
,
`<i class="fas fa-bookmark"></i>`
,
'
selectPool
'
,
'
Pool search
'
],
[
'
right
'
,
`<i class="fas fa-user-friends"></i>`
,
'
openUserView
'
,
'
Open client view
'
],
[
'
right
'
,
`<i class="fas fa-music"></i>`
,
'
openMdtView
'
,
'
Open metadata view
'
],
[
'
right
'
,
`<i class="fas fa-sync-alt"></i>`
,
'
reloadQueue
'
,
'
Reload the queue
'
],
[
'
right
'
,
`<i class="fas fa-window-close"></i>`
,
'
closeButton
'
,
'
Quit Lektor-App
'
],
];
function
addIpcToButton
(
btnId
,
ipc
)
{
document
.
getElementById
(
btnId
).
addEventListener
(
'
click
'
,
()
=>
{
ipc
.
forEach
(
ipc
=>
{
ipcRenderer
.
send
(
ipc
);
});
});
}
window
.
onload
=
()
=>
{
createButtonList
(
buttonList
);
document
.
getElementById
(
'
closeButton
'
).
addEventListener
(
'
click
'
,
()
=>
{
ipcRenderer
.
send
(
'
close-app
'
);
});
document
.
getElementById
(
'
commandPlay
'
).
addEventListener
(
'
click
'
,
()
=>
{
logger
.
debug
(
'
Command play !
'
);
ipcRenderer
.
send
(
'
cmd-play
'
,
null
);
});
document
.
getElementById
(
'
commandStop
'
).
addEventListener
(
'
click
'
,
()
=>
{
logger
.
debug
(
'
Command stop !
'
);
ipcRenderer
.
send
(
'
cmd-stop
'
,
null
);
});
document
.
getElementById
(
'
reloadDb
'
).
addEventListener
(
'
click
'
,
()
=>
{
ipcRenderer
.
send
(
'
reload-db-request
'
,
null
);
ipcRenderer
.
send
(
'
reload-queue-request
'
,
null
);
});
document
.
getElementById
(
'
reloadQueue
'
).
addEventListener
(
'
click
'
,
()
=>
{
ipcRenderer
.
send
(
'
reload-queue-request
'
,
null
);
});
addIpcToButton
(
'
closeButton
'
,
[
'
close-app
'
]);
addIpcToButton
(
'
commandPlay
'
,
[
'
cmd-play
'
]);
addIpcToButton
(
'
commandStop
'
,
[
'
cmd-stop
'
]);
addIpcToButton
(
'
commandClear
'
,
[
'
cmd-clear
'
]);
addIpcToButton
(
'
selectAdvence
'
,
[
'
select-advence
'
]);
addIpcToButton
(
'
selectDatabase
'
,
[
'
select-database
'
]);
addIpcToButton
(
'
selectPlaylist
'
,
[
'
select-playlist
'
]);
addIpcToButton
(
'
selectPool
'
,
[
'
select-pool
'
]);
addIpcToButton
(
'
openMdtView
'
,
[
'
select-mdt
'
]);
addIpcToButton
(
'
openUserView
'
,
[
'
toggle-client-view
'
]);
addIpcToButton
(
'
reloadQueue
'
,
[
'
reload-queue-request
'
]);
addIpcToButton
(
'
reloadDb
'
,
[
'
reload-db-request
'
,
'
reload-queue-request
'
]);
logger
.
debug
(
'
Window loaded
'
);
};
/* Create the button list */
function
createButtonList
(
list
)
{
function
action
(
ipc
,
argument
)
{
logger
.
error
(
'
The action function builder for control buttons is not implemented
'
);
}
var
renderHtmlLeft
=
''
;
var
renderHtmlRight
=
''
;
var
renderHtmlSLeft
=
''
;
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
main.js
+
14
−
6
Voir le fichier @
c78069d6
...
...
@@ -94,17 +94,20 @@ app.on('ready', () => {
var
line
=
line
.
trim
();
if
(
!
line
)
return
;
switch
(
line
[
0
])
{
case
'
.
'
:
logger
.
info
(
line
);
break
;
case
'
*
'
:
logger
.
warn
(
line
);
logger
.
warn
(
line
.
replace
(
/^
\*
(
.*
)
$/g
,
'
$1
'
)
);
break
;
case
'
!
'
:
logger
.
error
(
line
);
logger
.
error
(
line
.
replace
(
/^!
(
.*
)
$/g
,
'
$1
'
)
);
break
;
case
'
.
'
:
if
(
line
.
length
>=
2
&&
line
[
1
]
!=
'
.
'
)
{
logger
.
info
(
line
.
replace
(
/^
\.
(
.*
)
$/g
,
'
$1
'
));
break
;
}
/* Fallthrough case */
default
:
logger
.
debug
(
line
);
logger
.
debug
(
line
.
replace
(
/^
\.\.\.
(
.*
)
$/g
,
'
\t
$1
'
)
);
break
;
}
});
...
...
@@ -130,6 +133,11 @@ ipcMain.on('cmd-stop', (event, arg) => {
logger
.
debug
(
'
Returned from cmd-stop
'
);
});
});
ipcMain
.
on
(
'
cmd-clear
'
,
(
event
,
arg
)
=>
{
lkt
.
commandClear
().
then
(
arg
=>
{
logger
.
debug
(
'
Cleared queue with cmd-clear
'
);
});
});
/* Fill the pannel with the content of the DB.
* The `arg` is the HTML object of the pannel */
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
style/css/instance.css
+
5
−
0
Voir le fichier @
c78069d6
...
...
@@ -116,6 +116,11 @@ button {
background-color
:
#df691a
;
}
.btn-primary
:hover
{
background-color
:
#4e5d6c
!important
;
color
:
#df691a
!important
;
}
.btn
:focus
,
.btn
:active
{
outline
:
none
!important
;
...
...
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