SFJS 0.3.4

This commit is contained in:
Mo Bitar
2018-07-22 18:52:18 -05:00
parent 47f1d68874
commit ebef028096
2 changed files with 1 additions and 20 deletions

View File

@@ -1,28 +1,9 @@
class NoteHistoryEntry extends SFItemHistoryEntry {
setPreviousEntry(previousEntry) {
super.setPreviousEntry(previousEntry);
if(previousEntry) {
this.textCharDiffLength = this.item.content.text.length - previousEntry.item.content.text.length;
} else {
this.textCharDiffLength = this.item.content.text.length;
}
}
previewTitle() {
return this.item.updated_at.toLocaleString();
}
operationVector() {
if(!this.hasPreviousEntry || this.textCharDiffLength == 0) {
return 0;
} else if(this.textCharDiffLength < 0) {
return -1;
} else {
return 1;
}
}
previewSubTitle() {
if(!this.hasPreviousEntry) {
return `${this.textCharDiffLength} characters loaded`

View File

@@ -37,7 +37,7 @@
"karma-jasmine": "^1.1.0",
"karma-phantomjs-launcher": "^1.0.2",
"sn-stylekit": "1.0.15",
"standard-file-js": "0.3.3",
"standard-file-js": "0.3.4",
"sn-models": "0.1.1",
"connect": "^3.6.6",
"mocha": "^5.2.0",