Procházet zdrojové kódy

Merge pull request #5645 from overleaf/em-history-origin

Identify resyncs in the history panel

GitOrigin-RevId: 5c96f0f1be68bfb05954457a7d5b72b4cec6c607
Eric Mc Sween před 5 roky
rodič
revize
0449e6c2a2

+ 13 - 1
services/web/app/views/project/editor/history/entriesListV2.pug

@@ -176,7 +176,19 @@ script(type="text/ng-template", id="historyEntryTpl")
 							ng-if="::update_user == null"
 							ng-style="$ctrl.getUserCSSStyle(update_user);"
 						) #{translate("anonymous")}
-					li.history-entry-metadata-user(ng-if="::$ctrl.entry.meta.users.length == 0")
+					li.history-entry-metadata-user(
+						ng-if="::$ctrl.entry.meta.origin"
+						ng-switch on="::$ctrl.entry.meta.origin.kind"
+					)
+						span.name(
+							ng-switch-when="history-resync"
+							ng-style="$ctrl.getUserCSSStyle()"
+						) #{translate("history_resync")}
+						span.name(
+							ng-switch-default
+							ng-style="$ctrl.getUserCSSStyle()"
+						) #{translate("anonymous")}
+					li.history-entry-metadata-user(ng-if="::!$ctrl.entry.meta.origin && $ctrl.entry.meta.users.length == 0")
 						span.name(
 							ng-style="$ctrl.getUserCSSStyle();"
 						) #{translate("anonymous")}

+ 2 - 1
services/web/locales/en.json

@@ -1522,5 +1522,6 @@
   "showing_x_results_of_total": "Showing __x__ results of __total__",
   "showing_x_results": "Showing __x__ results",
   "showing_1_result": "Showing 1 result",
-  "showing_1_result_of_total": "Showing 1 result of __total__"
+  "showing_1_result_of_total": "Showing 1 result of __total__",
+  "history_resync": "History Resync"
 }