diff --git a/domain/page/endpoint.go b/domain/page/endpoint.go index e0155866..3186308a 100644 --- a/domain/page/endpoint.go +++ b/domain/page/endpoint.go @@ -1093,14 +1093,17 @@ func (h *Handler) GetDiff(w http.ResponseWriter, r *http.Request) { var cfg = &htmldiff.Config{ Granularity: 5, - InsertedSpan: []htmldiff.Attribute{{Key: "style", Val: "background-color: palegreen;"}}, - DeletedSpan: []htmldiff.Attribute{{Key: "style", Val: "background-color: lightpink; text-decoration: line-through;"}}, + DeletedSpan: []htmldiff.Attribute{{Key: "style", Val: "background-color: palegreen;"}}, + InsertedSpan: []htmldiff.Attribute{{Key: "style", Val: "background-color: lightpink; text-decoration: line-through;"}}, ReplacedSpan: []htmldiff.Attribute{{Key: "style", Val: "background-color: lightskyblue;"}}, CleanTags: []string{"documize"}, } + // InsertedSpan: []htmldiff.Attribute{{Key: "style", Val: "background-color: palegreen;"}}, + // DeletedSpan: []htmldiff.Attribute{{Key: "style", Val: "background-color: lightpink; text-decoration: line-through;"}}, + // ReplacedSpan: []htmldiff.Attribute{{Key: "style", Val: "background-color: lightskyblue;"}}, - res, err := cfg.HTMLdiff([]string{latestHTML, previousHTML}) - // res, err := cfg.HTMLdiff([]string{previousHTML, latestHTML}) + // res, err := cfg.HTMLdiff([]string{latestHTML, previousHTML}) + res, err := cfg.HTMLdiff([]string{previousHTML, latestHTML}) if err != nil { response.WriteServerError(w, method, err) return diff --git a/gui/app/components/document/view-revision.js b/gui/app/components/document/view-revision.js index 3189f9d1..4cb9873d 100644 --- a/gui/app/components/document/view-revision.js +++ b/gui/app/components/document/view-revision.js @@ -45,7 +45,7 @@ export default Component.extend(ModalMixin, { }); this.set('revisions', revisions); - + if (revisions.length > 0 && is.null(this.get('revision'))) { this.send('onSelectRevision', revisions[0]); } diff --git a/gui/app/pods/document/index/template.hbs b/gui/app/pods/document/index/template.hbs index d8e2487c..bc808780 100644 --- a/gui/app/pods/document/index/template.hbs +++ b/gui/app/pods/document/index/template.hbs @@ -47,14 +47,11 @@ onCopyPage=(action 'onCopyPage') onMovePage=(action 'onMovePage') onDeletePage=(action 'onPageDeleted') refresh=(action 'refresh')}} {{/if}} - {{#if (eq tab 'attachment')}} {{document/view-attachment document=document permissions=permissions}} {{/if}} - - {{#if (eq tab 'revision')}} - {{document/view-revision document=document folder=folder pages=pages onRollback=(action 'onRollback')}} + {{document/view-revision document=document folder=folder pages=pages permissions=permissions onRollback=(action 'onRollback')}} {{/if}}