n8n/packages/editor-ui/src/n8n-theme.scss
Ben Hesseldieck 05eec87d1d
Add tagging of workflows (#1647)
* clean up dropdown

* clean up focusoncreate

*  Ignore mistaken ID in POST /workflows

*  Fix undefined tag ID in PATCH /workflows

*  Shorten response for POST /tags

* remove scss mixins

* clean up imports

*  Implement validation with class-validator

* address ivan's comments

* implement modals

* Fix lint issues

* fix disabling shortcuts

* fix focus issues

* fix focus issues

* fix focus issues with modal

* fix linting issues

* use dispatch

* use constants for modal keys

* fix focus

* fix lint issues

* remove unused prop

* add modal root

* fix lint issues

* remove unused methods

* fix shortcut

* remove max width

*  Fix duplicate entry error for pg and MySQL

* update rename messaging

* update order of buttons

* fix firefox overflow on windows

* fix dropdown height

* 🔨 refactor tag crud controllers

* 🧹 remove unused imports

* use variable for number of items

* fix dropdown spacing

*  Restore type to fix build

*  Fix post-refactor PATCH /workflows/:id

*  Fix PATCH /workflows/:id for zero tags

*  Fix usage count becoming stringified

* address max's comments

* fix filter spacing

* fix blur bug

* address most of ivan's comments

* address tags type concern

* remove defaults

*  return tag id as string

* 🔨 add hooks to tag CUD operations

* 🏎 simplify timestamp pruning

* remove blur event

* fix onblur bug

*  Fix fs import to fix build

* address max's comments

* implement responsive tag container

* fix lint issues

* Set default dates in entities

* 👕 Fix lint in migrations

* update tag limits

* address ivan's comments

* remove rename, refactor header, implement new designs for save, remove responsive tag container

* update styling

* update styling

* implement responsive tag container

* implement header tags edit

* implement header tags edit

* fix lint issues

* implement expandable input

* minor fixes

* minor fixes

* use variable

* rename save as

* duplicate fixes

*  Implement unique workflow names

*  Create /workflows/new endpoint

* minor edit fixes

* lint fixes

* style fixes

* hook up saving name

* hook up tags

* clean up impl

* fix dirty state bug

* update limit

* update notification messages

* on click outside

* fix minor bug with count

* lint fixes

*  Add query string params to /workflows/new

* handle minor edge cases

* handle minor edge cases

* handle minor bugs; fix firefox dropdown issue

* Fix min width

* apply tags only after api success

* remove count fix

* 🚧 Adjust to new qs requirements

* clean up workflow tags impl, fix tags delete bug

* fix minor issue

* fix minor spacing issue

* disable wrap for ops

* fix viewport root; save on click in dropdown

* save button loading when saving name/tags

* implement max width on tags container

* implement cleaner create experience

* disable edit while updating

* codacy hex color

* refactor tags container

* fix clickability

* fix workflow open and count

* clean up structure

* fix up lint issues

*  Create migrations for unique workflow names

* fix button size

* increase workflow name limit for larger screen

* tslint fixes

* disable responsiveness for workflow modal

* rename event

* change min width for tags

* clean up pr

*  Adjust quotes in MySQL migration

*  Adjust quotes in Postgres migration

* address max's comments on styles

* remove success toasts

* add hover mode to name

* minor fixes

* refactor name preview

* fix name input not to jiggle

* finish up name input

* Fix up add tags

* clean up param

* clean up scss

* fix resizing name

* fix resizing name

* fix resize bug

* clean up edit spacing

* ignore on esc

* fix input bug

* focus input on clear

* build

* fix up add tags clickablity

* remove scrollbars

* move into folders

* clean up multiple patch req

* remove padding top from edit

* update tags on enter

* build

* rollout blur on enter behavior

* rollout esc behavior

* fix tags bug when duplicating tags

* move key to reload tags

* update header spacing

* build

* update hex case

* refactor workflow title

* remove unusued prop

* keep focus on error, fix bug on error

* Fix bug with name / tags toggle on error

* impl creating new workflow name

*  Refactor endpoint per new guidelines

* support naming endpoint

*  Refactor to support numeric suffixes

* 👕 Lint migrations for unique workflow names

*  Add migrations set default dates to indexes

* fix connection push bug

*  Lowercase default workflow name

*  Add prefixes to set default dates migration

*  Fix indentation on default dates migrations

*  Add temp ts-ignore for unrelated change

*  Adjust default dates migration for MySQL

Remove change to data column in credentials_entity, already covered by Omar's migration. Also, fix quotes from table prefix addition.

*  Adjust quotes in dates migration for PG

* fix safari color bug

* fix count bug

* fix scroll bugs in dropdown

* expand filter size

* apply box-sizing to main header

* update workflow names in executions to be wrapped by quotes

* fix bug where key is same in dropdown

* fix firefox bug

* move up push connection session

* 🔨 Remove mistakenly added nullable property

* 🔥 Remove unneeded index drop-create (PG)

* 🔥 Remove unneeded table copying

*  Merge dates migration with tags migration

* 🔨 Refactor endpoint and make wf name env

* dropdown colors in firefox

* update colors to use variables

* update thumb color

* change error message

* remove 100 char maximum

* fix bug with saving tags dropdowns multiple times

* update error message when no name

*  Update name missing toast message

*  Update workflow already exists message

* disable saving for executions

* fix bug causing modal to close

* make tags in workflow open clickable

* increase workflow limit to 3

* remove success notifications

* update header spacing

* escape tag names

* update tag and table colors

* remove tags from export

* build

* clean up push connection dependencies

* address ben's comments

* revert tags optional interface

* address comments

* update duplicate message

* build

* fix eol

* add one more eol

*  Update comment

* add hover style for workflow open, fix up font weight

Co-authored-by: Mutasem <mutdmour@gmail.com>
Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
Co-authored-by: Mutasem Aldmour <4711238+mutdmour@users.noreply.github.com>
2021-05-29 13:31:21 -05:00

526 lines
9.1 KiB
SCSS

// https://github.com/ElemeFE/element/blob/dev/packages/theme-chalk/src/table.scss
@import "./n8n-theme-variables";
$--font-path: '~element-ui/lib/theme-chalk/fonts';
@import "~element-ui/packages/theme-chalk/src/index";
@import "~element-ui/lib/theme-chalk/display.css";
body {
font-family: 'Open Sans', sans-serif;
font-weight: 300;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
background-color: $--custom-node-view-background;
margin: 0;
overscroll-behavior-x: none;
padding: 0;
}
input {
font-family: 'Open Sans', sans-serif;
font-weight: 400;
}
button {
font-family: 'Open Sans', sans-serif;
font-weight: 600;
}
h1, h2, h3, h4, h5, h6 {
color: #555;
}
.clickable {
cursor: pointer;
}
.primary-color {
color: $--color-primary;
}
.text-light {
color: $--custom-font-light;
font-weight: 400;
}
.text-very-light {
color: $--custom-font-very-light;
font-weight: 400;
}
// Dialog
.v-modal {
opacity: .85;
background-color: lighten($--custom-table-background-main, 55% );
}
.el-dialog {
background-color: $--custom-dialog-background;
-webkit-box-shadow: none;
box-shadow: none;
@media (max-height: 1050px) {
margin: 4em auto !important;
}
@media (max-height: 930px) {
margin: 1em auto !important;
}
.el-dialog__header {
padding: 15px 20px;
.el-dialog__title {
font-weight: 600;
}
}
.el-dialog__headerbtn {
position: absolute;
top: 0;
right: -50px;
color: #fff;
background-color: $--custom-table-background-main;
border-radius: 0 18px 18px 0;
z-index: 110;
font-size: 1.7em;
text-align: center;
line-height: 30px;
height: 50px;
width: 50px;
.el-dialog__close {
color: #fff;
font-weight: 400;
}
.el-dialog__close:hover {
transform: scale(1.2);
}
}
.el-dialog__body {
color: $--custom-dialog-text-color;
padding: 0 20px 20px 20px;
}
.el-dialog__title {
color: $--custom-dialog-text-color;
}
}
.el-message-box {
background-color: $--custom-dialog-background;
border: none;
.el-message-box__headerbtn {
.el-message-box__close {
color: $--custom-dialog-text-color;
}
}
.el-message-box__content,
.el-message-box__title {
color: $--custom-dialog-text-color;
}
}
// Menu
.el-menu--vertical,
.el-menu {
border: none;
font-size: 14px;
.el-menu--collapse {
width: 75px;
}
.el-menu--popup,
.el-menu--inline {
font-size: 0.9em;
li.el-menu-item {
height: 35px;
line-height: 35px;
color: $--custom-dialog-text-color;
}
}
.el-menu-item,
.el-submenu__title {
color: $--color-primary;
font-size: 1.2em;
.el-submenu__icon-arrow {
color: $--color-primary;
font-weight: 800;
font-size: 1em;
}
.svg-inline--fa {
position: relative;
right: -3px;
}
.item-title {
position: absolute;
left: 73px;
}
.item-title-root {
position: absolute;
left: 60px;
top: 1px;
}
}
}
.el-menu--vertical {
.el-menu-item {
.item-title {
position: absolute;
left: 55px;
}
}
}
// Notification Message
.el-message p {
line-height: 1.5em;
}
// Table
.el-table {
thead th {
color: #fff;
background-color: $--custom-table-background-main;
}
tr {
color: #555;
td {
border: none;
}
}
.tr {
color: #555;
}
}
.el-table--striped {
.el-table__body {
tr.el-table__row--striped {
background-color: $--custom-table-background-stripe-color;
td {
background: none;
}
}
tr.el-table__row:hover,
tr.el-table__row:hover > td {
background-color: $--custom-table-background-hover-color;
}
}
}
// Select input
.el-scrollbar {
background-color: #fff;
}
.el-select-dropdown__item {
font-size: 0.8em;
color: #555;
height: auto;
line-height: 1.8em;
margin: 0.25em 0;
padding: 0.25em 1em;
}
.el-select-dropdown__item.selected {
font-weight: normal;
}
.el-select-dropdown__item + .el-select-dropdown__item {
border-top: 1px solid #ddd;
}
.el-dropdown-menu__item {
color: $--color-primary;
}
// Color-Picker
.color-picker {
.el-color-picker__trigger {
border: none;
background: none;
padding: 2px 0 0 4px;
.el-color-picker__icon {
color: $--color-primary;
left: 14px;
}
}
.el-color-picker__color {
position: relative;
top: 2px;
width: 20px;
height: 20px;
border: none;
}
.el-color-picker__color:hover {
transform: scale(1.1);
}
.el-color-picker__color-inner {
border: none;
border-radius: 11px;
}
}
// Date selector
.el-date-editor.el-input {
width: 100%;
}
// Select input
.el-select {
width: 100%;
.el-tag {
color: $--custom-input-font;
.el-tag__close.el-icon-close {
background-color: $--custom-input-font;
&:hover {
background-color: $--custom-input-font;
transform: scale(0.8);
}
}
}
}
.el-switch__label {
color: #fff;
}
// Input
.el-input__inner {
border-radius: 20px;
text-overflow: ellipsis;
}
.el-input--small .el-input__inner {
border-radius: 13px;
}
.el-input__inner,
.el-input__inner:hover {
background-color: $--custom-input-background;
color: $--custom-input-font;
border: none;
outline: 0;
}
// Number Input
.el-input-number {
background-color: $--custom-input-background;
border-radius: 16px;
width: calc(100% - 20px);
.el-input-number__decrease,
.el-input-number__increase {
border: none;
color: #fff;
background-color: $--custom-table-background-main;
width: 20px;
height: 20px;
line-height: 20px;
border-radius: 10px;
margin: 3px;
}
.el-input-number__decrease:hover,
.el-input-number__increase:hover {
transform: scale(1.1);
}
.el-input-number__decrease.is-disabled,
.el-input-number__increase.is-disabled {
background-color: $--custom-input-background-disabled;
}
}
// Transfer list (nodes)
.el-transfer {
.el-transfer-panel {
background-color: $--custom-input-background;
// border: 1px solid #404040;
border: none;
border-radius: 10px;
padding: 1em;
.el-transfer-panel__header {
background: none;
}
}
.el-transfer__buttons button {
border: 2px solid $--color-primary;
}
.el-transfer__buttons button.is-disabled {
border: 2px solid #aaa;
background-color: #fff;
}
}
// Buttons
.el-button,
.el-button:active,
.el-button:focus {
border: none;
border-radius: 20px;
color: #fff;
font-weight: 600;
background-color: $--color-primary;
.next-icon-text {
display: inline-block;
margin-left: 10px;
}
}
.el-button.el-button--mini:not(.is-circle) {
padding: 7px 10px;
}
.el-button:hover {
background-color: $--color-primary;
color: #fff;
transform: scale(1.05);
}
.el-input.is-disabled .el-input__inner,
.el-button.is-disabled,
.el-button.is-disabled:hover,
.el-button.is-disabled:focus {
background-color: $--custom-input-background-disabled;
border-color: #555;
color: $--custom-input-font-disabled;
}
.el-button.is-plain,.el-button.is-plain:hover {
color: $--color-primary;
border: 1px solid $--color-primary;
background-color: #fff;
}
// Textarea
.ql-editor,
.el-textarea textarea,
.el-textarea textarea:active,
.el-textarea textarea:focus,
.el-textarea textarea:hover {
background-color: $--custom-input-background;
color: $--custom-input-font;
border: none;
border-radius: 3px;
outline: 0;
padding: 0.8em 1em;
line-height: 1.5em;
}
.el-textarea.is-disabled .el-textarea__inner {
background-color: $--custom-input-background-disabled;
color: $--custom-input-font-disabled;
}
// Tabs
.type-selector:focus,
.el-tabs__header:focus,
.el-tabs__nav-wrap:focus,
.el-tabs__nav-scroll:focus,
.el-tabs__nav:focus {
outline: none;
}
.el-tabs__item {
color: #555;
}
.el-tabs__item.is-active {
font-weight: bold;
}
// Loading Indicator
.el-loading-mask {
background-color: #fff;
opacity: 0.8;
}
// Pagination
.el-pager li,
.el-pagination .btn-prev,
.el-pagination .btn-next {
background: none;
color: #555;
}
.el-pagination button:disabled {
background: none;
color: $--custom-input-background-disabled;
}
.el-pager li.btn-quicknext,
.el-pager li.btn-quickprev {
color: #555;
}
// Tooltip
.el-tooltip__popper.is-light {
border: none;
-webkit-box-shadow: 0px 0px 12px 0px rgba(0,0,0,0.15);
-moz-box-shadow: 0px 0px 12px 0px rgba(0,0,0,0.15);
box-shadow: 0px 0px 12px 0px rgba(0,0,0,0.15);
}
// Notification
.el-notification {
border-radius: 0;
border: none;
}
.el-notification__content {
text-align: left;
}
// Custom scrollbar
::-webkit-scrollbar {
width: 12px;
height: 12px;
}
::-webkit-scrollbar-track {
border-radius: 6px;
}
::-webkit-scrollbar-track:hover {
background: #ddd;
}
::-webkit-scrollbar-thumb {
border-radius: 6px;
background: $--scrollbar-thumb-color;
}
::-webkit-scrollbar-thumb:hover {
background: $--color-primary;
}
.el-dialog__wrapper {
&::-webkit-scrollbar-track,
&::-webkit-scrollbar-track:hover {
background: #fff;
}
&::-webkit-scrollbar-thumb {
background: $--color-primary;
border-radius: 6px;
}
}
.tags-container {
.el-tag {
color: $--tag-text-color;
font-size: 12px;
background-color: $--tag-background-color;
border-radius: 12px;
height: auto;
border-color: $--tag-background-color;
font-weight: 400;
.el-icon-close {
color: $--tag-background-color;
background-color: $--tag-close-background-color !important;
max-height: 15px;
max-width: 15px;
margin-right: 6px;
&:hover {
background-color: $--tag-close-background-hover-color !important;
}
}
}
}