n8n/packages/editor-ui/src/components/Badge.vue

51 lines
938 B
Vue
Raw Normal View History

:sparkles: Add new version notification (#1977) * add menu item * implement versions modal * fix up modal * clean up badges * implement key features * fix up spacing * add error message * add notification icon * fix notification * fix bug when no updates * address lint issues * address multi line nodes * add closing animation * keep drawer open * address design feedback * address badge styling * use grid for icons * update cli to return version information * set env variables * add scss color variables * address comments * fix lint issue * handle edge cases * update scss variables, spacing * update spacing * build * override top value for theme * bolden version * update config * check endpoint exists * handle long names * set dates * set title * fix bug * update warning * remove unused component * refactor components * add fragments * inherit styles * fix icon size * fix lint issues * add cli dep * address comments * handle network error * address empty case * Revert "address comments" 480f969e07c3282c50bc326babbc5812baac5dae * remove dependency * build * update variable names * update variable names * refactor verion card * split out variables * clean up impl * clean up scss * move from nodeview * refactor out gift notification icon * fix lint issues * clean up variables * update scss variables * update info url * Add instanceId to frontendSettings * Use createHash from crypto module * Add instanceId to store & send it as http header * Fix lintings * Fix interfaces & apply review changes * Apply review changes * add console message * update text info * update endpoint * clean up interface * address comments * cleanup todo * Update packages/cli/config/index.ts Co-authored-by: Ben Hesseldieck <1849459+BHesseldieck@users.noreply.github.com> * update console message * :zap: Display node-name on hover * :zap: Formatting fix Co-authored-by: MedAliMarz <servfrdali@yahoo.fr> Co-authored-by: Ben Hesseldieck <1849459+BHesseldieck@users.noreply.github.com> Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-07-22 01:22:17 -07:00
<template functional>
<fragment>
<el-tag
v-if="props.type === 'danger'"
type="danger"
size="small"
:class="$style['danger']"
>
{{ props.text }}
</el-tag>
<el-tag
v-else-if="props.type === 'warning'"
size="small"
:class="$style['warning']"
>
{{ props.text }}
</el-tag>
</fragment>
</template>
<script lang="ts">
export default {
props: ["text", "type"],
};
</script>
<style lang="scss" module>
.badge {
font-size: 11px;
line-height: 18px;
max-height: 18px;
font-weight: 400;
display: flex;
align-items: center;
padding: 2px 4px;
}
.danger {
composes: badge;
color: $--badge-danger-color;
background-color: $--badge-danger-background-color;
border-color: $--badge-danger-border-color;
}
.warning {
composes: badge;
background-color: $--badge-warning-background-color;
color: $--badge-warning-color;
border: none;
}
</style>