Skip to content
GitLab
Explorer
Connexion
S'inscrire
Navigation principale
Rechercher ou aller à…
Projet
P
parlote-facil
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
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
facil
parlote-facil
Validations
8eea37cb
Valider
8eea37cb
rédigé
il y a 13 ans
par
Raphael Sofaer
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Fix people socketing
parent
333e56b4
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
3
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
3 fichiers modifiés
app/controllers/people_controller.rb
+1
-1
1 ajout, 1 suppression
app/controllers/people_controller.rb
app/views/people/index.html.haml
+6
-6
6 ajouts, 6 suppressions
app/views/people/index.html.haml
public/javascripts/web-socket-receiver.js
+5
-3
5 ajouts, 3 suppressions
public/javascripts/web-socket-receiver.js
avec
12 ajouts
et
10 suppressions
app/controllers/people_controller.rb
+
1
−
1
Voir le fichier @
8eea37cb
...
@@ -29,8 +29,8 @@ class PeopleController < ApplicationController
...
@@ -29,8 +29,8 @@ class PeopleController < ApplicationController
format
.
all
do
format
.
all
do
#only do it if it is an email address
#only do it if it is an email address
if
params
[
:q
].
try
(
:match
,
Devise
.
email_regexp
)
if
params
[
:q
].
try
(
:match
,
Devise
.
email_regexp
)
webfinger
(
params
[
:q
])
people
=
Person
.
where
(
:diaspora_handle
=>
params
[
:q
])
people
=
Person
.
where
(
:diaspora_handle
=>
params
[
:q
])
webfinger
(
params
[
:q
])
if
people
.
empty?
else
else
people
=
Person
.
search
(
params
[
:q
],
current_user
)
people
=
Person
.
search
(
params
[
:q
],
current_user
)
end
end
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
app/views/people/index.html.haml
+
6
−
6
Voir le fichier @
8eea37cb
...
@@ -20,16 +20,16 @@
...
@@ -20,16 +20,16 @@
=
params
[
:q
]
=
params
[
:q
]
.span-15.append-1
.span-15.append-1
-
if
@hashes
.
empty?
#people_stream
.stream
%p
-
if
@hashes
.
empty?
=
t
(
'.no_one_found'
)
%p
=
t
(
'.no_one_found'
)
-
else
-
else
#people_stream
.stream
-
for
hash
in
@hashes
-
for
hash
in
@hashes
=
render
:partial
=>
'people/person'
,
:locals
=>
hash
=
render
:partial
=>
'people/person'
,
:locals
=>
hash
=
will_paginate
@people
=
will_paginate
@people
.span-8.last
.span-8.last
%h4
%h4
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
public/javascripts/web-socket-receiver.js
+
5
−
3
Voir le fichier @
8eea37cb
...
@@ -54,7 +54,7 @@ var WebSocketReceiver = {
...
@@ -54,7 +54,7 @@ var WebSocketReceiver = {
WebSocketReceiver
.
processLike
(
obj
.
post_id
,
obj
.
html
);
WebSocketReceiver
.
processLike
(
obj
.
post_id
,
obj
.
html
);
}
else
{
}
else
{
WebSocketReceiver
.
processPost
(
obj
[
'
class
'
],
obj
.
post_id
,
obj
.
html
,
obj
.
aspect_ids
);
WebSocketReceiver
.
processPost
(
obj
.
html
,
obj
.
aspect_ids
);
}
}
}
}
},
},
...
@@ -67,7 +67,9 @@ var WebSocketReceiver = {
...
@@ -67,7 +67,9 @@ var WebSocketReceiver = {
result_ul
.
siblings
(
'
.error
'
).
show
();
result_ul
.
siblings
(
'
.error
'
).
show
();
result_ul
.
find
(
'
.error
'
).
text
(
response
.
response
).
show
();
result_ul
.
find
(
'
.error
'
).
text
(
response
.
response
).
show
();
}
else
{
}
else
{
$
(
'
#people_stream
'
).
prepend
(
response
.
html
).
slideDown
(
'
slow
'
,
function
(){});
stream
=
$
(
'
#people_stream
'
);
stream
.
find
(
'
p
'
).
remove
();
stream
.
prepend
(
response
.
html
).
slideDown
(
'
slow
'
,
function
(){});
var
first_li
=
result_ul
.
find
(
'
li:first
'
);
var
first_li
=
result_ul
.
find
(
'
li:first
'
);
first_li
.
hide
();
first_li
.
hide
();
first_li
.
after
(
response
.
html
);
first_li
.
after
(
response
.
html
);
...
@@ -131,7 +133,7 @@ var WebSocketReceiver = {
...
@@ -131,7 +133,7 @@ var WebSocketReceiver = {
$
(
'
.likes
'
,
"
#
"
+
targetGUID
).
first
().
html
(
html
);
$
(
'
.likes
'
,
"
#
"
+
targetGUID
).
first
().
html
(
html
);
},
},
processPost
:
function
(
className
,
postId
,
html
,
aspectIds
)
{
processPost
:
function
(
html
,
aspectIds
)
{
if
(
WebSocketReceiver
.
onPageForAspects
(
aspectIds
))
{
if
(
WebSocketReceiver
.
onPageForAspects
(
aspectIds
))
{
ContentUpdater
.
addPostToStream
(
html
);
ContentUpdater
.
addPostToStream
(
html
);
}
}
...
...
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