Feature/autofac tidyup (#2096)

* Move service config service back into shared .NET Framework Library

* Move Content files into shared folder. Make autoface load different assembilies depending on what framework is using it.

* Change my mind on what the shared module should be called. Common Module is too bland.

* DotNet4.SocksProxy is not yet publically .NET Standard. Revert to previous SocksWebProxy package.

* Check in unstaged change to test dependency injection setup.
This commit is contained in:
Nathan Holland
2017-11-09 03:45:21 +13:00
committed by kaso17
parent 2209ab226c
commit 52c0179e8e
75 changed files with 748 additions and 568 deletions

View File

@@ -0,0 +1,37 @@

Handlebars.registerHelper('dateFormat', function (context, block) {
if (window.moment) {
var f = block.hash.format || "MMM DD, YYYY hh:mm:ss A";
return moment(context).format(f); //had to remove Date(context)
} else {
return context; // moment plugin not available. return data as is.
};
});
Handlebars.registerHelper('jacketTimespan', function (context, block) {
var now = moment();
var from = moment(context);
var timeSpan = moment.duration(now.diff(from));
var minutes = timeSpan.asMinutes();
if (minutes < 120) {
return Math.round(minutes) + 'm ago';
}
var hours = timeSpan.asHours();
if (hours < 48) {
return Math.round(hours) + 'h ago';
}
var days = timeSpan.asDays();
if (days < 365) {
return Math.round(days) + 'd ago';
}
var years = timeSpan.asYears();
return Math.round(years) + 'y ago';
});
Handlebars.registerHelper('jacketSize', function (context, block) {
return filesize(context, { round: 1 });
});