Face browsing works
Signed-off-by: James Ketrenos <james_gitlab@ketrenos.com>
This commit is contained in:
parent
b5e1fee344
commit
594670fdad
@ -18,12 +18,13 @@ body {
|
||||
white-space: nowrap;
|
||||
z-index: 100;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.view {
|
||||
display: inline-block;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
cursor: pointer;
|
||||
box-sizing: border-box;
|
||||
margin: 0 1em;
|
||||
@ -31,6 +32,9 @@ body {
|
||||
font-weight: bold;
|
||||
vertical-align: bottom;
|
||||
text-align: center;
|
||||
background-position: 50% 50%;
|
||||
background-repeat: no-repeat;
|
||||
background-size: contain;
|
||||
}
|
||||
|
||||
.face {
|
||||
@ -198,6 +202,10 @@ function loadPhoto(index) {
|
||||
|
||||
document.getElementById("loading").textContent = "0%";
|
||||
|
||||
const bar = document.getElementById("bar");
|
||||
if (bar) {
|
||||
bar.parentElement.removeChild(bar);
|
||||
}
|
||||
xml.onprogress = function (event) {
|
||||
var alpha = 0;
|
||||
if (event.total) {
|
||||
|
@ -801,10 +801,6 @@ function getFacesForPhoto(id) {
|
||||
type: photoDB.Sequelize.QueryTypes.SELECT,
|
||||
raw: true
|
||||
}).then((faceIds) => {
|
||||
let ids = faceIds.map((face) => {
|
||||
return (face.face1Id == face.id) ? face.face2Id : face.face1Id;
|
||||
});
|
||||
|
||||
return photoDB.sequelize.query(
|
||||
"SELECT photos.id,faces.id AS faceId,fd.distance,albums.path,photos.filename " +
|
||||
"FROM faces " +
|
||||
@ -817,7 +813,9 @@ function getFacesForPhoto(id) {
|
||||
") " +
|
||||
"WHERE faces.id IN (:ids)", {
|
||||
replacements: {
|
||||
ids: ids,
|
||||
ids: faceIds.map((match) => {
|
||||
return (match.face1Id == face.id) ? match.face2Id : match.face1Id;
|
||||
}),
|
||||
faceId: face.id
|
||||
},
|
||||
type: photoDB.Sequelize.QueryTypes.SELECT,
|
||||
|
Loading…
x
Reference in New Issue
Block a user