diff options
Diffstat (limited to 'app/assets/javascripts/projects/project_new.js')
-rw-r--r-- | app/assets/javascripts/projects/project_new.js | 86 |
1 files changed, 2 insertions, 84 deletions
diff --git a/app/assets/javascripts/projects/project_new.js b/app/assets/javascripts/projects/project_new.js index 9cbda324aff..ebf745fd046 100644 --- a/app/assets/javascripts/projects/project_new.js +++ b/app/assets/javascripts/projects/project_new.js @@ -1,7 +1,7 @@ import $ from 'jquery'; import { addSelectOnFocusBehaviour } from '../lib/utils/common_utils'; import { convertToTitleCase, humanize, slugify } from '../lib/utils/text_utility'; -import { s__ } from '~/locale'; +import DEFAULT_PROJECT_TEMPLATES from 'ee_else_ce/projects/default_project_templates'; let hasUserDefinedProjectPath = false; let hasUserDefinedProjectName = false; @@ -140,90 +140,8 @@ const bindEvents = () => { $projectFieldsForm.addClass('selected'); $selectedIcon.empty(); const value = $(this).val(); - const templates = { - rails: { - text: s__('ProjectTemplates|Ruby on Rails'), - icon: '.template-option .icon-rails', - }, - express: { - text: s__('ProjectTemplates|NodeJS Express'), - icon: '.template-option .icon-express', - }, - spring: { - text: s__('ProjectTemplates|Spring'), - icon: '.template-option .icon-spring', - }, - iosswift: { - text: s__('ProjectTemplates|iOS (Swift)'), - icon: '.template-option .icon-iosswift', - }, - dotnetcore: { - text: s__('ProjectTemplates|.NET Core'), - icon: '.template-option .icon-dotnetcore', - }, - android: { - text: s__('ProjectTemplates|Android'), - icon: '.template-option .icon-android', - }, - gomicro: { - text: s__('ProjectTemplates|Go Micro'), - icon: '.template-option .icon-gomicro', - }, - gatsby: { - text: s__('ProjectTemplates|Pages/Gatsby'), - icon: '.template-option .icon-gatsby', - }, - hugo: { - text: s__('ProjectTemplates|Pages/Hugo'), - icon: '.template-option .icon-hugo', - }, - jekyll: { - text: s__('ProjectTemplates|Pages/Jekyll'), - icon: '.template-option .icon-jekyll', - }, - plainhtml: { - text: s__('ProjectTemplates|Pages/Plain HTML'), - icon: '.template-option .icon-plainhtml', - }, - gitbook: { - text: s__('ProjectTemplates|Pages/GitBook'), - icon: '.template-option .icon-gitbook', - }, - hexo: { - text: s__('ProjectTemplates|Pages/Hexo'), - icon: '.template-option .icon-hexo', - }, - nfhugo: { - text: s__('ProjectTemplates|Netlify/Hugo'), - icon: '.template-option .icon-nfhugo', - }, - nfjekyll: { - text: s__('ProjectTemplates|Netlify/Jekyll'), - icon: '.template-option .icon-nfjekyll', - }, - nfplainhtml: { - text: s__('ProjectTemplates|Netlify/Plain HTML'), - icon: '.template-option .icon-nfplainhtml', - }, - nfgitbook: { - text: s__('ProjectTemplates|Netlify/GitBook'), - icon: '.template-option .icon-nfgitbook', - }, - nfhexo: { - text: s__('ProjectTemplates|Netlify/Hexo'), - icon: '.template-option .icon-nfhexo', - }, - salesforcedx: { - text: s__('ProjectTemplates|SalesforceDX'), - icon: '.template-option .icon-salesforcedx', - }, - serverless_framework: { - text: s__('ProjectTemplates|Serverless Framework/JS'), - icon: '.template-option .icon-serverless_framework', - }, - }; - const selectedTemplate = templates[value]; + const selectedTemplate = DEFAULT_PROJECT_TEMPLATES[value]; $selectedTemplateText.text(selectedTemplate.text); $(selectedTemplate.icon) .clone() |