From 4646b67bacfee0a8d6e39ac0cbde98dd78bcdb11 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Mon, 29 Jul 2024 16:22:04 +0200 Subject: [PATCH] drop (for now) unused ui code --- modules/renderer/photos.js | 41 -------------------------------------- 1 file changed, 41 deletions(-) diff --git a/modules/renderer/photos.js b/modules/renderer/photos.js index ff10aa22a..b28fd9b2f 100644 --- a/modules/renderer/photos.js +++ b/modules/renderer/photos.js @@ -13,8 +13,6 @@ export function rendererPhotos(context) { var _dateFilters = ['fromDate', 'toDate']; var _fromDate; var _toDate; - var _maxPhotoDate; - var _yearSliderValue; var _usernames; function photos() {} @@ -48,14 +46,6 @@ export function rendererPhotos(context) { return _dateFilters; }; - photos.maxPhotoAge = function() { - return _maxPhotoDate; - }; - - photos.yearSliderValue = function() { - return _yearSliderValue; - }; - photos.dateFilterValue = function(val) { return val === _dateFilters[0] ? _fromDate : _toDate; }; @@ -90,34 +80,6 @@ export function rendererPhotos(context) { } }; - photos.setFromDateFilter = function(date, updateUrl){ - if (date !== -1){ - var fromDate = new Date(); - fromDate.setDate(fromDate.getDate() - date); - var dd = String(fromDate.getDate()).padStart(2, '0'); - var mm = String(fromDate.getMonth() + 1).padStart(2, '0'); - var yyyy = fromDate.getFullYear(); - - fromDate = mm + '/' + dd + '/' + yyyy; - photos.setDateFilter('fromDate', fromDate, updateUrl); - _maxPhotoDate = date; - } else { - photos.setDateFilter('fromDate', null, updateUrl); - } - }; - - photos.setFromYearFilter = function(currYear, updateUrl){ - if (currYear){ - var fromDate = new Date(currYear, 0, 1); - photos.setDateFilter('fromDate', fromDate, updateUrl); - _yearSliderValue = currYear; - } else { - photos.setDateFilter('fromDate', null, updateUrl); - } - setUrlFilterValue('slider_date', currYear); - }; - - photos.setUsernameFilter = function(val, updateUrl) { if (val && typeof val === 'string') val = val.replace(/;/g, ',').split(','); if (val) { @@ -214,9 +176,6 @@ export function rendererPhotos(context) { this.setDateFilter('fromDate', parts && parts.length >= 2 && parts[1], false); this.setDateFilter('toDate', parts && parts.length >= 3 && parts[2], false); } - if (hash.slider_date){ - this.setFromYearFilter(hash.slider_date, false); - } if (hash.photo_username) { this.setUsernameFilter(hash.photo_username, false); }