mirror of
https://github.com/keeweb/keeweb.git
synced 2024-06-27 07:45:08 +02:00
35 lines
730 B
JavaScript
35 lines
730 B
JavaScript
import Backbone from 'backbone';
|
|
|
|
const FileInfoModel = Backbone.Model.extend({
|
|
defaults: {
|
|
id: '',
|
|
name: '',
|
|
storage: null,
|
|
path: null,
|
|
modified: false,
|
|
editState: null,
|
|
rev: null,
|
|
syncDate: null,
|
|
openDate: null,
|
|
keyFileName: null,
|
|
keyFileHash: null,
|
|
opts: null,
|
|
backup: null,
|
|
fingerprint: null
|
|
},
|
|
|
|
initialize(data, options) {
|
|
_.each(
|
|
data,
|
|
function(val, key) {
|
|
if (/Date$/.test(key)) {
|
|
this.set(key, val ? new Date(val) : null, options);
|
|
}
|
|
},
|
|
this
|
|
);
|
|
}
|
|
});
|
|
|
|
export { FileInfoModel };
|