From b9786b9b94350a1e68aba2701f22d8cf2863f66a Mon Sep 17 00:00:00 2001 From: Eric Mc Sween Date: Thu, 25 Aug 2022 08:01:48 -0400 Subject: [PATCH] Merge pull request #9390 from overleaf/em-history-origin Show change origin in history display GitOrigin-RevId: ead64bf3b936bf4915dbee226adf7782806fe53a --- .../project/editor/history/entriesListV2.pug | 8 ++++++++ .../stylesheets/app/editor/history-v2.less | 1 + services/web/locales/en.json | 18 +++++++++++------- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/services/web/app/views/project/editor/history/entriesListV2.pug b/services/web/app/views/project/editor/history/entriesListV2.pug index 13d3861a70..e7d54971ca 100644 --- a/services/web/app/views/project/editor/history/entriesListV2.pug +++ b/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))" diff --git a/services/web/frontend/stylesheets/app/editor/history-v2.less b/services/web/frontend/stylesheets/app/editor/history-v2.less index b58e023e77..7656fb11d3 100644 --- a/services/web/frontend/stylesheets/app/editor/history-v2.less +++ b/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; diff --git a/services/web/locales/en.json b/services/web/locales/en.json index 2f46bb7cd1..107b070d25 100644 --- a/services/web/locales/en.json +++ b/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. 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 free plan", "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__ Server Pro license", "server_pro_license_entitlement_line_2": "You currently have <0>__count__ active users. If you need to increase your license entitlement, please <1>contact Overleaf.", - "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" }