Skip to content

Commit

Permalink
drop (for now) unused ui code
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrasd committed Jul 29, 2024
1 parent cd0cd7b commit f5acaa9
Showing 1 changed file with 0 additions and 39 deletions.
39 changes: 0 additions & 39 deletions modules/renderer/photos.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,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;
};
Expand Down Expand Up @@ -90,34 +82,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) {
Expand Down Expand Up @@ -214,9 +178,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);
}
Expand Down

0 comments on commit f5acaa9

Please sign in to comment.