restructure 'if's in LaunchPrompt

This commit is contained in:
Keith Grant
2020-04-09 08:58:12 -07:00
parent 6f76b15d92
commit af18aa8456

View File

@@ -29,16 +29,6 @@ function LaunchPrompt({ config, resource, onLaunch, onCancel, i18n }) {
// TODO: Add Credential Passwords step // TODO: Add Credential Passwords step
if (
config.ask_job_type_on_launch ||
config.ask_limit_on_launch ||
config.ask_verbosity_on_launch ||
config.ask_tags_on_launch ||
config.ask_skip_tags_on_launch ||
config.ask_variables_on_launch ||
config.ask_scm_branch_on_launch ||
config.ask_diff_mode_on_launch
) {
if (config.ask_job_type_on_launch) { if (config.ask_job_type_on_launch) {
initialValues.job_type = resource.job_type || ''; initialValues.job_type = resource.job_type || '';
} }
@@ -63,6 +53,16 @@ function LaunchPrompt({ config, resource, onLaunch, onCancel, i18n }) {
if (config.ask_diff_mode_on_launch) { if (config.ask_diff_mode_on_launch) {
initialValues.diff_mode = resource.diff_mode || false; initialValues.diff_mode = resource.diff_mode || false;
} }
if (
config.ask_job_type_on_launch ||
config.ask_limit_on_launch ||
config.ask_verbosity_on_launch ||
config.ask_tags_on_launch ||
config.ask_skip_tags_on_launch ||
config.ask_variables_on_launch ||
config.ask_scm_branch_on_launch ||
config.ask_diff_mode_on_launch
) {
steps.push({ steps.push({
name: i18n._(t`Other Prompts`), name: i18n._(t`Other Prompts`),
component: <OtherPromptsStep config={config} />, component: <OtherPromptsStep config={config} />,