diff --git a/frontend/elements/photo-thumbnail.html b/frontend/elements/photo-thumbnail.html index 8c8ca88..b881729 100755 --- a/frontend/elements/photo-thumbnail.html +++ b/frontend/elements/photo-thumbnail.html @@ -36,6 +36,7 @@ bottom: 0px; left: 0px; right: 0px; + font-size: 0.6em; } :host:hover > div { diff --git a/server/scanner.js b/server/scanner.js index 1ea7f5c..2366d85 100644 --- a/server/scanner.js +++ b/server/scanner.js @@ -363,17 +363,16 @@ function triggerWatcher() { } } else { /* Attempt to infer the datestamp from the filename */ - let patterns = /WhatsApp Image (20[0-9][0-9]-[0-9][0-9]-[0-9][0-9]) at (.*).(jpeg|jpg)/; let date = moment(created).format(); - let match = file.match(patterns); + + let match = file.match(/WhatsApp Image (20[0-9][0-9]-[0-9][0-9]-[0-9][0-9]) at (.*).(jpeg|jpg)/); if (match) { date = moment((match[1]+" "+match[2]), "YYYY-MM-DD h.mm.ss a").format(); if (date == "Invalid date") { date = moment(created).format(); } } else { - patterns = /(20[0-9][0-9]-?[0-9][0-9]-?[0-9][0-9])[_\-]?([0-9]{6})?/; - match = file.match(patterns); + match = file.match(/(20[0-9][0-9]-?[0-9][0-9]-?[0-9][0-9])[_\-]?([0-9]{6})?/); if (match) { if (match[2]) { /* Stamp had time in it */ date = moment((match[1]+""+match[2]).replace(/-/g, ""), "YYYYMMDDHHmmss").format();