Преглед изворни кода

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

Show change origin in history display

GitOrigin-RevId: ead64bf3b936bf4915dbee226adf7782806fe53a
Eric Mc Sween пре 4 година
родитељ
комит
10c9b26f8e

+ 8 - 0
services/web/app/views/project/editor/history/entriesListV2.pug

@@ -196,6 +196,14 @@ script(type="text/ng-template", id="historyEntryTpl")
 						span.name(
 							ng-style="$ctrl.getUserCSSStyle();"
 						) #{translate("anonymous")}
+				span(ng-if="::$ctrl.entry.meta.origin.kind === 'dropbox'")
+					| (#{translate("history_entry_origin_dropbox")})
+				span(ng-if="::$ctrl.entry.meta.origin.kind === 'upload'")
+					| (#{translate("history_entry_origin_upload")})
+				span(ng-if="::$ctrl.entry.meta.origin.kind === 'git-bridge'")
+					| (#{translate("history_entry_origin_git")})
+				span(ng-if="::$ctrl.entry.meta.origin.kind === 'github'")
+					| (#{translate("history_entry_origin_github")})
 
 			.history-entry-fromV-handle(
 				ng-show="$ctrl.rangeSelectionEnabled && $ctrl.selectedHistoryRange && ((!$ctrl.isDragging && $ctrl.selectedHistoryRange.fromV === $ctrl.entry.fromV) || ($ctrl.isDragging && $ctrl.hoveredHistoryRange.fromV === $ctrl.entry.fromV))"

+ 1 - 0
services/web/frontend/stylesheets/app/editor/history-v2.less

@@ -269,6 +269,7 @@
 .history-entry-metadata-users {
   display: inline;
   padding: 0;
+  margin-right: 0.5em;
 }
 .history-entry-metadata-user {
   display: inline;

+ 11 - 7
services/web/locales/en.json

@@ -951,11 +951,11 @@
   "last_modified": "Last Modified",
   "last_updated": "Last Updated",
   "no_projects": "No projects",
-  "archived":"Archived",
-  "trashed":"Trashed",
-  "token_read_write":"token read-write",
-  "token_read_only":"token read-only",
-  "duplicate_projects":"This user has projects with duplicate names",
+  "archived": "Archived",
+  "trashed": "Trashed",
+  "token_read_write": "token read-write",
+  "token_read_only": "token read-only",
+  "duplicate_projects": "This user has projects with duplicate names",
   "welcome_to_sl": "Welcome to __appName__!",
   "new_to_latex_look_at": "New to LaTeX? Start by having a look at our",
   "or": "or",
@@ -1786,7 +1786,7 @@
   "try_to_compile_despite_errors": "Try to compile despite errors",
   "stop_on_first_error_enabled_title": "No PDF: Stop on first error enabled",
   "stop_on_first_error_enabled_description": "<0>“Stop on first error” is enabled.</0> Disabling it may allow the compiler to produce a PDF (but your project will still have errors).",
-  "binary_history_error":"Preview not available for this file type",
+  "binary_history_error": "Preview not available for this file type",
   "disable_stop_on_first_error": "Disable “Stop on first error”",
   "free_plan_label": "You’re on the <b>free plan</b>",
   "free_plan_tooltip": "Click to find out how you could benefit from Overleaf premium features!",
@@ -1807,5 +1807,9 @@
   "the_project_that_contains_this_file_is_not_shared_with_you": "The project that contains this file is not shared with you",
   "server_pro_license_entitlement_line_1": "<0>__appName__</0> Server Pro license",
   "server_pro_license_entitlement_line_2": "You currently have <0>__count__ active users</0>. If you need to increase your license entitlement, please <1>contact Overleaf</1>.",
-  "server_pro_license_entitlement_line_3": "An active user is one who has opened a project in this Server Pro instance in the last 12 months."
+  "server_pro_license_entitlement_line_3": "An active user is one who has opened a project in this Server Pro instance in the last 12 months.",
+  "history_entry_origin_upload": "upload",
+  "history_entry_origin_git": "via Git",
+  "history_entry_origin_github": "via GitHub",
+  "history_entry_origin_dropbox": "via Dropbox"
 }