Commit 33183711 authored by Mike Greiling's avatar Mike Greiling

Remove unnecesasry use of vue runtime template compiler

parent 91fab7c4
// This is a true violation of @gitlab/no-runtime-template-compiler, as it
// relies on app/views/admin/application_settings/_gitpod.html.haml for its
// template.
/* eslint-disable @gitlab/no-runtime-template-compiler */
import Vue from 'vue'; import Vue from 'vue';
import IntegrationHelpText from '~/vue_shared/components/integrations_help_text.vue'; import IntegrationHelpText from '~/vue_shared/components/integrations_help_text.vue';
import initUserInternalRegexPlaceholder from '../account_and_limits'; import initUserInternalRegexPlaceholder from '../account_and_limits';
...@@ -9,17 +5,23 @@ import initUserInternalRegexPlaceholder from '../account_and_limits'; ...@@ -9,17 +5,23 @@ import initUserInternalRegexPlaceholder from '../account_and_limits';
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
initUserInternalRegexPlaceholder(); initUserInternalRegexPlaceholder();
const gitpodSettingEl = document.querySelector('#js-gitpod-settings-help-text'); const el = document.querySelector('#js-gitpod-settings-help-text');
if (!gitpodSettingEl) { if (!el) {
return; return;
} }
const { message, messageUrl } = el.dataset;
// eslint-disable-next-line no-new // eslint-disable-next-line no-new
new Vue({ new Vue({
el: gitpodSettingEl, el,
name: 'GitpodSettings', render(createElement) {
components: { return createElement(IntegrationHelpText, {
IntegrationHelpText, props: {
message,
messageUrl,
},
});
}, },
}); });
}); });
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
%button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' }
= expanded ? _('Collapse') : _('Expand') = expanded ? _('Collapse') : _('Expand')
%p %p
%integration-help-text{ "id" => "js-gitpod-settings-help-text", "message" => gitpod_enable_description, "message-url" => "https://gitpod.io/" } #js-gitpod-settings-help-text{ data: {"message" => gitpod_enable_description, "message-url" => "https://gitpod.io/" } }
= link_to sprite_icon('question-o'), help_page_path('integration/gitpod.md'), target: '_blank', class: 'has-tooltip', title: _('More information') = link_to sprite_icon('question-o'), help_page_path('integration/gitpod.md'), target: '_blank', class: 'has-tooltip', title: _('More information')
......
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