diff --git a/services/web/app/src/Features/History/HistoryManager.js b/services/web/app/src/Features/History/HistoryManager.js index 7c36c0ed20..bf566f32e8 100644 --- a/services/web/app/src/Features/History/HistoryManager.js +++ b/services/web/app/src/Features/History/HistoryManager.js @@ -87,11 +87,18 @@ async function deleteProjectHistory(projectId) { } } -async function resyncProject(projectId, force = false) { +async function resyncProject(projectId, options = {}) { try { + const body = {} + if (options.force) { + body.force = options.force + } + if (options.origin) { + body.origin = options.origin + } await request.post({ url: `${settings.apis.project_history.url}/project/${projectId}/resync`, - qs: { force }, // TODO: only send if true? + json: body, }) } catch (err) { throw OError.tag(err, 'failed to resync project history', { projectId }) diff --git a/services/web/app/views/project/editor/history/entriesListV2.pug b/services/web/app/views/project/editor/history/entriesListV2.pug index 4dc9b19f83..13d3861a70 100644 --- a/services/web/app/views/project/editor/history/entriesListV2.pug +++ b/services/web/app/views/project/editor/history/entriesListV2.pug @@ -177,13 +177,17 @@ script(type="text/ng-template", id="historyEntryTpl") ng-style="$ctrl.getUserCSSStyle(update_user);" ) #{translate("anonymous")} li.history-entry-metadata-user( - ng-if="::$ctrl.entry.meta.origin" + ng-if="::$ctrl.entry.meta.origin && $ctrl.entry.meta.users.length == 0" ng-switch on="::$ctrl.entry.meta.origin.kind" ) span.name( ng-switch-when="history-resync" ng-style="$ctrl.getUserCSSStyle()" ) #{translate("overleaf_history_system")} + span.name( + ng-switch-when="history-migration" + ng-style="$ctrl.getUserCSSStyle()" + ) #{translate("overleaf_history_system")} span.name( ng-switch-default ng-style="$ctrl.getUserCSSStyle()"