Commit cb8682b8 authored by Phil Hughes's avatar Phil Hughes

improve logic of success message

instead of taking over whole sidebar, it now just shows over the commit box
after 5 seconds the commit box goes back to its compact logic
parent 255e8ea8
......@@ -39,10 +39,17 @@ export default {
},
watch: {
currentActivityView() {
if (this.lastCommitMsg) {
this.isCompact = false;
} else {
this.isCompact = !(
this.currentActivityView === activityBarViews.commit &&
window.innerHeight >= MAX_WINDOW_HEIGHT_COMPACT
);
}
},
lastCommitMsg() {
this.isCompact = this.lastCommitMsg === '';
},
},
methods: {
......@@ -122,9 +129,11 @@ export default {
@submit.prevent.stop="commitChanges"
ref="formEl"
>
<transition name="fade">
<success-message
v-show="(lastCommitMsg && someUncommitedChanges)"
v-show="lastCommitMsg"
/>
</transition>
<commit-message-field
:text="commitMessage"
@input="updateCommitMessage"
......
......@@ -53,6 +53,9 @@ export default {
<label
v-tooltip
:title="tooltipTitle"
:class="{
'is-disabled': disabled
}"
>
<input
type="radio"
......@@ -63,9 +66,12 @@ export default {
:disabled="disabled"
/>
<span class="prepend-left-10">
<template v-if="label">
<span
v-if="label"
class="ide-radio-label"
>
{{ label }}
</template>
</span>
<slot v-else></slot>
</span>
</label>
......
......@@ -112,9 +112,6 @@ export default {
/>
</div>
<commit-form />
<success-message
v-show="showSuccessMessage"
/>
</template>
</div>
</resizable-panel>
......
......@@ -173,6 +173,12 @@ export default {
state.entries[file.path].opened = false;
state.entries[file.path].active = false;
state.entries[file.path].lastOpenedAt = new Date().getTime();
state.openFiles.forEach(f =>
Object.assign(f, {
opened: false,
active: false,
}),
);
state.openFiles = [
{
...file,
......
......@@ -797,6 +797,12 @@
.ide-commit-radios {
label {
font-weight: normal;
&.is-disabled {
.ide-radio-label {
text-decoration: line-through;
}
}
}
.help-block {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment