From 92ac6b298f6b59c9f32ab3763e0596a081c27c0d Mon Sep 17 00:00:00 2001 From: James Ketrenos Date: Sat, 31 Dec 2022 16:20:33 -0800 Subject: [PATCH] Minimal changes Signed-off-by: James Ketrenos --- frontend/identities.html | 5 ++++- server/app.js | 5 ++++- server/db/photos.js | 8 ++++---- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/frontend/identities.html b/frontend/identities.html index 4002f72..ae8176d 100755 --- a/frontend/identities.html +++ b/frontend/identities.html @@ -98,7 +98,7 @@ function loadFace(id) { editor.appendChild(row); row = document.createElement("div"); row.classList.add("editor-row"); - let message = "Unassigned related faces: "; + let message = "(shift-click face to explore that id) Unassigned related faces: "; if (face.relatedFaces.length > 0) { message += face.relatedFaces.length + " related (tap to deselect)"; } else { @@ -221,6 +221,9 @@ function createIdentityBlock(identity, nolimit) { div = document.createElement("div"); div.textContent = "Related faces " + identity.relatedFaces.length; + if (identity.firstName === 'Barry') { + console.log({ identity }); + } block.appendChild(div); identity.relatedFaces.sort((a, b) => { diff --git a/server/app.js b/server/app.js index 0d1cc79..c339c21 100755 --- a/server/app.js +++ b/server/app.js @@ -259,7 +259,10 @@ app.use(basePath, function(req, res, next) { }); /* Everything below here requires a successful authentication */ -app.use(basePath, express.static(picturesPath, { index: false })); +app.use(basePath, express.static(picturesPath, { + maxAge: '14d', + index: false +})); app.use(basePath + "api/v1/photos", require("./routes/photos")); app.use(basePath + "api/v1/days", require("./routes/days")); diff --git a/server/db/photos.js b/server/db/photos.js index 756add6..1cf9d6d 100755 --- a/server/db/photos.js +++ b/server/db/photos.js @@ -137,10 +137,10 @@ function init() { type: Sequelize.INTEGER, allowNull: true, }, - top: Sequelize.FLOAT, /* 0..1 * photo.height */ - left: Sequelize.FLOAT, /* 0..1 * photo.width */ - bottom: Sequelize.FLOAT, /* 0..1 * photo.height */ - right: Sequelize.FLOAT, /* 0..1 * photo.width */ + top: Sequelize.FLOAT, /* 0..1 * photoId.height */ + left: Sequelize.FLOAT, /* 0..1 * photoId.width */ + bottom: Sequelize.FLOAT, /* 0..1 * photoId.height */ + right: Sequelize.FLOAT, /* 0..1 * photoId.width */ }, { timestamps: false, classMethods: {