| Server IP : 93.86.61.54 / Your IP : 216.73.216.60 Web Server : Apache/2.4.62 (Ubuntu) System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64 User : www-data ( 33) PHP Version : 8.4.22 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/html/projects/nextcloud/apps/activity/js/ |
Upload File : |
/*
* Copyright (c) 2015
*
* This file is licensed under the Affero General Public License version 3
* or later.
*
* See the COPYING-README file.
*
*/
(function() {
/**
* @class OCA.Activity.ActivityModel
* @classdesc
*
* Displays activity information for a given file
*
*/
var ActivityModel = OC.Backbone.Model.extend(/** @lends OCA.Activity.ActivityModel.prototype */{
/**
*
* @returns int UNIX milliseconds timestamp
*/
getUnixMilliseconds: function () {
if (_.isUndefined(this.unixMilliseconds)) {
this.unixMilliseconds = moment(this.get('datetime')).valueOf();
}
return this.unixMilliseconds;
},
/**
* @returns string E.g. "seconds ago"
*/
getRelativeDate: function () {
return OC.Util.relativeModifiedDate(this.getUnixMilliseconds());
},
/**
* @returns string E.g. "April 26, 2016 10:53 AM"
*/
getFullDate: function () {
return OC.Util.formatDate(this.getUnixMilliseconds());
},
/**
* @returns bool
*/
isMonochromeIcon: function () {
return this.get('type') !== 'file_created' && this.get('type') !== 'file_deleted' && this.get('type') !== 'favorite';
}
});
OCA.Activity = OCA.Activity || {};
OCA.Activity.ActivityModel = ActivityModel;
})();