diff --git a/app/assets/javascripts/repository/components/blob_content_viewer.vue b/app/assets/javascripts/repository/components/blob_content_viewer.vue
index 236351005e7d287940516f06443a79e34750e50d..afbb45058b5cd794fa2cf0a12f05fa2e8a530723 100644
--- a/app/assets/javascripts/repository/components/blob_content_viewer.vue
+++ b/app/assets/javascripts/repository/components/blob_content_viewer.vue
@@ -1,12 +1,12 @@
@@ -332,10 +359,9 @@ export default {
>
+
+
+ {{ __('Save') }}
+
+
+ {{ __('Cancel') }}
+
+
+
-
-
-
+
+
+
+
+
diff --git a/app/assets/javascripts/vue_shared/components/source_viewer/components/chunk_deprecated.vue b/app/assets/javascripts/vue_shared/components/source_viewer/components/chunk_deprecated.vue
index 28a16cd846a2daab2344ca8e0ae04f72e1d03b21..3939f2eb59285694180abc48f21815bca35a7e6d 100644
--- a/app/assets/javascripts/vue_shared/components/source_viewer/components/chunk_deprecated.vue
+++ b/app/assets/javascripts/vue_shared/components/source_viewer/components/chunk_deprecated.vue
@@ -63,6 +63,10 @@ export default {
type: String,
required: true,
},
+ editPath: {
+ type: String,
+ required: true,
+ },
},
data() {
return {
@@ -114,6 +118,8 @@ export default {
:content="line"
:language="language"
:blame-path="blamePath"
+ :edit-path="editPath"
+ @editLine="$emit('editLine', $event)"
/>
diff --git a/app/assets/javascripts/vue_shared/components/source_viewer/components/chunk_line.vue b/app/assets/javascripts/vue_shared/components/source_viewer/components/chunk_line.vue
index 1690e666d3c4c8febf6ff70c68095c870385c596..90c1233df1a7c6b98bd881d6d44815d27174b93c 100644
--- a/app/assets/javascripts/vue_shared/components/source_viewer/components/chunk_line.vue
+++ b/app/assets/javascripts/vue_shared/components/source_viewer/components/chunk_line.vue
@@ -23,6 +23,10 @@ export default {
type: String,
required: true,
},
+ editPath: {
+ type: String,
+ required: true,
+ },
},
computed: {
pageSearchString() {
@@ -30,6 +34,11 @@ export default {
return getPageSearchString(this.blamePath, page);
},
},
+ methods: {
+ edit(number) {
+ this.$emit('editLine', number);
+ },
+ },
};
@@ -41,6 +50,11 @@ export default {
class="gl-user-select-none gl-shadow-none! file-line-blame"
:href="`${blamePath}${pageSearchString}#L${number}`"
>
+
@@ -220,8 +222,10 @@ export default {
:chunk-index="index"
:language="chunk.language"
:blame-path="blob.blamePath"
+ :edit-path="blob.editBlobPath"
:total-chunks="totalChunks"
@appear="highlightChunk"
+ @editLine="$emit('editLine', $event)"
/>
diff --git a/app/assets/javascripts/vue_shared/components/web_ide_link.vue b/app/assets/javascripts/vue_shared/components/web_ide_link.vue
index 28bec63b2448f0d571c41ff652b2851d9685635b..200961af3c44e298ac6783515387e1568eb70441 100644
--- a/app/assets/javascripts/vue_shared/components/web_ide_link.vue
+++ b/app/assets/javascripts/vue_shared/components/web_ide_link.vue
@@ -345,6 +345,10 @@ export default {
dismiss();
}
},
+ actionClickHandler({ action }, dismiss) {
+ this.dismissCalloutOnActionClicked(dismiss);
+ this.$emit('click', action);
+ },
},
webIdeButtonId: 'web-ide-link',
PREFERRED_EDITOR_KEY,
@@ -366,7 +370,7 @@ export default {
:category="isBlob ? 'primary' : 'secondary'"
:show-action-tooltip="!displayVscodeWebIdeCallout || !shouldShowCallout"
@select="select"
- @actionClicked="dismissCalloutOnActionClicked(dismiss)"
+ @actionClicked="actionClickHandler($event, dismiss)"
/>