From 3036476266767a99726eebb4627df3105a8268f7 Mon Sep 17 00:00:00 2001 From: Tim Zallmann Date: Mon, 15 Jan 2018 14:11:24 +0100 Subject: Fix display of Commit Errors --- app/assets/javascripts/flash.js | 3 ++ .../ide/components/repo_commit_section.vue | 5 ++- app/assets/javascripts/ide/stores/actions.js | 6 +++- app/assets/stylesheets/pages/repo.scss | 36 ++++++++++++++++++---- app/views/ide/index.html.haml | 3 +- app/views/layouts/nav_only.html.haml | 5 +-- 6 files changed, 46 insertions(+), 12 deletions(-) diff --git a/app/assets/javascripts/flash.js b/app/assets/javascripts/flash.js index 44deab9288e..c48d5ee9f3d 100644 --- a/app/assets/javascripts/flash.js +++ b/app/assets/javascripts/flash.js @@ -10,6 +10,7 @@ const hideFlash = (flashEl, fadeTransition = true) => { flashEl.addEventListener('transitionend', () => { flashEl.remove(); + document.body.classList.remove('flash-shown'); }, { once: true, passive: true, @@ -86,6 +87,8 @@ const createFlash = function createFlash( flashContainer.style.display = 'block'; + document.body.classList.add('flash-shown'); + return flashContainer; }; diff --git a/app/assets/javascripts/ide/components/repo_commit_section.vue b/app/assets/javascripts/ide/components/repo_commit_section.vue index 5279417a72a..60661018b23 100644 --- a/app/assets/javascripts/ide/components/repo_commit_section.vue +++ b/app/assets/javascripts/ide/components/repo_commit_section.vue @@ -34,6 +34,9 @@ export default { commitButtonDisabled() { return this.commitMessage === '' || this.submitCommitsLoading || !this.changedFiles.length; }, + disabledBtnClass() { + return `btn btn-default btn-sm append-right-10 prepend-left-10 ${this.submitCommitsLoading ? ' disabled':''}`; + }, commitMessageCount() { return this.commitMessage.length; }, @@ -152,7 +155,7 @@ you started editing. Would you like to create a new branch?`)"