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 { ...@@ -39,10 +39,17 @@ export default {
}, },
watch: { watch: {
currentActivityView() { currentActivityView() {
if (this.lastCommitMsg) {
this.isCompact = false;
} else {
this.isCompact = !( this.isCompact = !(
this.currentActivityView === activityBarViews.commit && this.currentActivityView === activityBarViews.commit &&
window.innerHeight >= MAX_WINDOW_HEIGHT_COMPACT window.innerHeight >= MAX_WINDOW_HEIGHT_COMPACT
); );
}
},
lastCommitMsg() {
this.isCompact = this.lastCommitMsg === '';
}, },
}, },
methods: { methods: {
...@@ -122,9 +129,11 @@ export default { ...@@ -122,9 +129,11 @@ export default {
@submit.prevent.stop="commitChanges" @submit.prevent.stop="commitChanges"
ref="formEl" ref="formEl"
> >
<transition name="fade">
<success-message <success-message
v-show="(lastCommitMsg && someUncommitedChanges)" v-show="lastCommitMsg"
/> />
</transition>
<commit-message-field <commit-message-field
:text="commitMessage" :text="commitMessage"
@input="updateCommitMessage" @input="updateCommitMessage"
......
...@@ -53,6 +53,9 @@ export default { ...@@ -53,6 +53,9 @@ export default {
<label <label
v-tooltip v-tooltip
:title="tooltipTitle" :title="tooltipTitle"
:class="{
'is-disabled': disabled
}"
> >
<input <input
type="radio" type="radio"
...@@ -63,9 +66,12 @@ export default { ...@@ -63,9 +66,12 @@ export default {
:disabled="disabled" :disabled="disabled"
/> />
<span class="prepend-left-10"> <span class="prepend-left-10">
<template v-if="label"> <span
v-if="label"
class="ide-radio-label"
>
{{ label }} {{ label }}
</template> </span>
<slot v-else></slot> <slot v-else></slot>
</span> </span>
</label> </label>
......
...@@ -112,9 +112,6 @@ export default { ...@@ -112,9 +112,6 @@ export default {
/> />
</div> </div>
<commit-form /> <commit-form />
<success-message
v-show="showSuccessMessage"
/>
</template> </template>
</div> </div>
</resizable-panel> </resizable-panel>
......
...@@ -173,6 +173,12 @@ export default { ...@@ -173,6 +173,12 @@ export default {
state.entries[file.path].opened = false; state.entries[file.path].opened = false;
state.entries[file.path].active = false; state.entries[file.path].active = false;
state.entries[file.path].lastOpenedAt = new Date().getTime(); state.entries[file.path].lastOpenedAt = new Date().getTime();
state.openFiles.forEach(f =>
Object.assign(f, {
opened: false,
active: false,
}),
);
state.openFiles = [ state.openFiles = [
{ {
...file, ...file,
......
...@@ -797,6 +797,12 @@ ...@@ -797,6 +797,12 @@
.ide-commit-radios { .ide-commit-radios {
label { label {
font-weight: normal; font-weight: normal;
&.is-disabled {
.ide-radio-label {
text-decoration: line-through;
}
}
} }
.help-block { .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