mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
update last component
This commit is contained in:
parent
f645e0248b
commit
a328b8c66b
|
@ -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>
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue