update last component

This commit is contained in:
Mutasem 2021-07-29 15:30:53 +02:00
parent f645e0248b
commit a328b8c66b
2 changed files with 15 additions and 29 deletions

View file

@ -1,14 +1,10 @@
<template>
<el-button :disabled="isWorkflowSaving" :class="{saved: isSaved}" size="small" @click="save" round :type="isSaved ? 'text': 'primary'">
<font-awesome-icon v-if="isWorkflowSaving" icon="spinner" spin />
<span v-else-if="isDirty || isNewWorkflow">
Save
</span>
<span v-else>Saved</span>
</el-button>
<span :class="$style.container">
<n8n-button label="Save" :disabled="isWorkflowSaving" size="md" @click="save" v-if="isDirty || isNewWorkflow" />
<span :class="$style.saved" v-else>Saved</span>
</span>
</template>
<script lang="ts">
import mixins from "vue-typed-mixins";
import { mapGetters } from "vuex";
@ -39,27 +35,17 @@ export default mixins(workflowHelpers).extend({
});
</script>
<style lang="scss" scoped>
.el-button {
<style lang="scss" module>
.container {
width: 65px;
}
// override disabled colors
color: white;
background-color: $--color-primary;
&:hover:not(.saved) {
color: white;
background-color: $--color-primary;
}
&.saved {
color: $--custom-font-very-light;
font-size: 12px;
font-weight: 600;
line-height: 12px;
text-align: center;
background-color: unset;
pointer-events: none;
}
.saved {
color: $--custom-font-very-light;
font-size: 12px;
font-weight: 600;
line-height: 12px;
text-align: center;
padding: var(--spacing-2xs) var(--spacing-xs);
}
</style>

View file

@ -122,7 +122,7 @@ Vue.use(Switch);
Vue.use(Select);
Vue.use(Option);
Vue.use(OptionGroup);
Vue.use(Button);
// Vue.use(Button);
Vue.use(ButtonGroup);
Vue.use(Table);
Vue.use(TableColumn);