diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
commit | 0c872e02b2c822e3397515ec324051ff540f0cd5 (patch) | |
tree | ce2fb6ce7030e4dad0f4118d21ab6453e5938cdd /app/helpers/ide_helper.rb | |
parent | f7e05a6853b12f02911494c4b3fe53d9540d74fc (diff) |
Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42
Diffstat (limited to 'app/helpers/ide_helper.rb')
-rw-r--r-- | app/helpers/ide_helper.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/app/helpers/ide_helper.rb b/app/helpers/ide_helper.rb index 34f4749c42a..0e81cea8ac7 100644 --- a/app/helpers/ide_helper.rb +++ b/app/helpers/ide_helper.rb @@ -7,7 +7,10 @@ module IdeHelper 'use-new-web-ide' => use_new_web_ide?.to_s, 'new-web-ide-help-page-path' => help_page_path('user/project/web_ide/index.md', anchor: 'vscode-reimplementation'), 'user-preferences-path' => profile_preferences_path, - 'branch-name' => @branch + 'branch-name' => @branch, + 'file-path' => @path, + 'fork-info' => @fork_info&.to_json, + 'merge-request' => @merge_request }.merge(use_new_web_ide? ? new_ide_data : legacy_ide_data) end @@ -24,7 +27,9 @@ module IdeHelper def new_ide_data { 'project-path' => @project&.path_with_namespace, - 'csp-nonce' => content_security_policy_nonce + 'csp-nonce' => content_security_policy_nonce, + # We will replace these placeholders in the FE + 'ide-remote-path' => ide_remote_path(remote_host: ':remote_host', remote_path: ':remote_path') } end @@ -42,9 +47,6 @@ module IdeHelper 'render-whitespace-in-code': current_user.render_whitespace_in_code.to_s, 'codesandbox-bundler-url': Gitlab::CurrentSettings.web_ide_clientside_preview_bundler_url, 'default-branch' => @project && @project.default_branch, - 'file-path' => @path, - 'merge-request' => @merge_request, - 'fork-info' => @fork_info&.to_json, 'project' => convert_to_project_entity_json(@project), 'enable-environments-guidance' => enable_environments_guidance?.to_s, 'preview-markdown-path' => @project && preview_markdown_path(@project), |