SFJS 0.3.4
This commit is contained in:
@@ -1,28 +1,9 @@
|
|||||||
class NoteHistoryEntry extends SFItemHistoryEntry {
|
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() {
|
previewTitle() {
|
||||||
return this.item.updated_at.toLocaleString();
|
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() {
|
previewSubTitle() {
|
||||||
if(!this.hasPreviousEntry) {
|
if(!this.hasPreviousEntry) {
|
||||||
return `${this.textCharDiffLength} characters loaded`
|
return `${this.textCharDiffLength} characters loaded`
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
"karma-jasmine": "^1.1.0",
|
"karma-jasmine": "^1.1.0",
|
||||||
"karma-phantomjs-launcher": "^1.0.2",
|
"karma-phantomjs-launcher": "^1.0.2",
|
||||||
"sn-stylekit": "1.0.15",
|
"sn-stylekit": "1.0.15",
|
||||||
"standard-file-js": "0.3.3",
|
"standard-file-js": "0.3.4",
|
||||||
"sn-models": "0.1.1",
|
"sn-models": "0.1.1",
|
||||||
"connect": "^3.6.6",
|
"connect": "^3.6.6",
|
||||||
"mocha": "^5.2.0",
|
"mocha": "^5.2.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user