Commit 7eeadc19 authored by Paul Slaughter's avatar Paul Slaughter

Remove IDE component external_link

With [this MR][1] merged, this component
is no longer used.

[1]: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/28705
parent 96085859
<script>
import Icon from '~/vue_shared/components/icon.vue';
export default {
components: {
Icon,
},
props: {
file: {
type: Object,
required: true,
},
},
computed: {
showButtons() {
return this.file.permalink;
},
},
};
</script>
<template>
<div v-if="showButtons" class="pull-right ide-btn-group">
<a
:href="file.permalink"
:title="s__('IDE|Open in file view')"
target="_blank"
rel="noopener noreferrer"
>
<span class="vertical-align-middle">{{ __('Open in file view') }}</span>
<icon :size="16" name="external-link" class="vertical-align-middle space-right" />
</a>
</div>
</template>
...@@ -10650,9 +10650,6 @@ msgstr "" ...@@ -10650,9 +10650,6 @@ msgstr ""
msgid "IDE|Live Preview" msgid "IDE|Live Preview"
msgstr "" msgstr ""
msgid "IDE|Open in file view"
msgstr ""
msgid "IDE|Preview your web application using Web IDE client-side evaluation." msgid "IDE|Preview your web application using Web IDE client-side evaluation."
msgstr "" msgstr ""
...@@ -13906,9 +13903,6 @@ msgstr "" ...@@ -13906,9 +13903,6 @@ msgstr ""
msgid "Open in Xcode" msgid "Open in Xcode"
msgstr "" msgstr ""
msgid "Open in file view"
msgstr ""
msgid "Open issues" msgid "Open issues"
msgstr "" msgstr ""
......
import Vue from 'vue';
import externalLink from '~/ide/components/external_link.vue';
import createVueComponent from '../../helpers/vue_mount_component_helper';
import { file } from '../helpers';
describe('ExternalLink', () => {
const activeFile = file();
let vm;
function createComponent() {
const ExternalLink = Vue.extend(externalLink);
activeFile.permalink = 'test';
return createVueComponent(ExternalLink, {
file: activeFile,
});
}
afterEach(() => {
vm.$destroy();
});
it('renders the external link with the correct href', done => {
activeFile.binary = true;
vm = createComponent();
vm.$nextTick(() => {
const openLink = vm.$el.querySelector('a');
expect(openLink.href).toMatch(`/${activeFile.permalink}`);
done();
});
});
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment