Commit 944050f9 authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Merge branch 'mg-remove-runtime-template-from-gitpod-settings' into 'master'

Remove runtime vue template from gitpod settings[RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!56590
parents 8eb75c62 33183711
// 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';
(() => { (() => {
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