diff options
Diffstat (limited to 'app/assets')
4 files changed, 33 insertions, 22 deletions
diff --git a/app/assets/javascripts/ci_variable_list/components/ci_variable_modal.vue b/app/assets/javascripts/ci_variable_list/components/ci_variable_modal.vue index 637f0237b63..0ccc58ec2da 100644 --- a/app/assets/javascripts/ci_variable_list/components/ci_variable_modal.vue +++ b/app/assets/javascripts/ci_variable_list/components/ci_variable_modal.vue @@ -3,6 +3,7 @@ import { __ } from '~/locale'; import { mapActions, mapState } from 'vuex'; import { ADD_CI_VARIABLE_MODAL_ID } from '../constants'; import { + GlButton, GlModal, GlFormSelect, GlFormGroup, @@ -16,6 +17,7 @@ import { export default { modalId: ADD_CI_VARIABLE_MODAL_ID, components: { + GlButton, GlModal, GlFormSelect, GlFormGroup, @@ -66,20 +68,6 @@ export default { attributes: { variant: 'success', disabled: !this.canSubmit }, }; }, - deleteAction() { - if (this.variableBeingEdited) { - return { - text: __('Delete variable'), - attributes: { variant: 'danger', category: 'secondary' }, - }; - } - return null; - }, - cancelAction() { - return { - text: __('Cancel'), - }; - }, maskedFeedback() { return __('This variable can not be masked'); }, @@ -99,6 +87,7 @@ export default { } else { this.addVariable(); } + this.hideModal(); }, resetModalHandler() { if (this.variableBeingEdited) { @@ -107,20 +96,23 @@ export default { this.clearModal(); } }, + hideModal() { + this.$refs.modal.hide(); + }, + deleteVarAndClose() { + this.deleteVariable(this.variableBeingEdited); + this.hideModal(); + }, }, }; </script> <template> <gl-modal + ref="modal" :modal-id="$options.modalId" :title="modalActionText" - :action-primary="primaryAction" - :action-secondary="deleteAction" - :action-cancel="cancelAction" - @ok="updateOrAddVariable" @hidden="resetModalHandler" - @secondary="deleteVariable(variableBeingEdited)" > <form> <gl-form-group :label="__('Key')" label-for="ci-variable-key"> @@ -210,5 +202,23 @@ export default { </gl-form-checkbox> </gl-form-group> </form> + <template #modal-footer> + <gl-button @click="hideModal">{{ __('Cancel') }}</gl-button> + <gl-button + v-if="variableBeingEdited" + ref="deleteCiVariable" + category="secondary" + variant="danger" + @click="deleteVarAndClose" + >{{ __('Delete variable') }}</gl-button + > + <gl-button + ref="updateOrAddVariable" + :disabled="!canSubmit" + variant="success" + @click="updateOrAddVariable" + >{{ modalActionText }} + </gl-button> + </template> </gl-modal> </template> diff --git a/app/assets/stylesheets/bootstrap_migration.scss b/app/assets/stylesheets/bootstrap_migration.scss index 885e9ac6667..f3293510e9a 100644 --- a/app/assets/stylesheets/bootstrap_migration.scss +++ b/app/assets/stylesheets/bootstrap_migration.scss @@ -120,8 +120,8 @@ kbd { code { padding: 2px 4px; - color: $red-600; - background-color: $red-100; + color: $code-color; + background-color: $gray-100; border-radius: $border-radius-default; .code > & { diff --git a/app/assets/stylesheets/framework/typography.scss b/app/assets/stylesheets/framework/typography.scss index 0de5aae4b0e..d61a32d2d95 100644 --- a/app/assets/stylesheets/framework/typography.scss +++ b/app/assets/stylesheets/framework/typography.scss @@ -592,7 +592,7 @@ pre { word-wrap: break-word; color: $gl-text-color; background-color: $gray-light; - border: 1px solid $border-color; + border: 1px solid $gray-200; border-radius: $border-radius-small; } diff --git a/app/assets/stylesheets/framework/variables.scss b/app/assets/stylesheets/framework/variables.scss index d31d9245e9c..4d858f88921 100644 --- a/app/assets/stylesheets/framework/variables.scss +++ b/app/assets/stylesheets/framework/variables.scss @@ -356,6 +356,7 @@ $list-text-height: 42px; */ $code-font-size: 90%; $code-line-height: 1.6; +$code-color: $gray-950; /* * Tooltips |