n8n/packages/design-system/theme/src/message-box.scss
Ahsan Virani 421dd72224
Introduce telemetry (#2099)
* introduce analytics

* add user survey backend

* add user survey backend

* set answers on survey submit

Co-authored-by: Mutasem Aldmour <4711238+mutdmour@users.noreply.github.com>

* change name to personalization

* lint

Co-authored-by: Mutasem Aldmour <4711238+mutdmour@users.noreply.github.com>

* N8n 2495 add personalization modal (#2280)

* update modals

* add onboarding modal

* implement questions

* introduce analytics

* simplify impl

* implement survey handling

* add personalized cateogry

* update modal behavior

* add thank you view

* handle empty cases

* rename modal

* standarize modal names

* update image, add tags to headings

* remove unused file

* remove unused interfaces

* clean up footer spacing

* introduce analytics

* refactor to fix bug

* update endpoint

* set min height

* update stories

* update naming from questions to survey

* remove spacing after core categories

* fix bug in logic

* sort nodes

* rename types

* merge with be

* rename userSurvey

* clean up rest api

* use constants for keys

* use survey keys

* clean up types

* move personalization to its own file

Co-authored-by: ahsan-virani <ahsan.virani@gmail.com>

* Survey new options (#2300)

* split up options

* fix quotes

* remove unused import

* add user created workflow event (#2301)

* simplify env vars

* fix versionCli on FE

* update personalization env

* fix event User opened Credentials panel

* fix select modal spacing

* fix nodes panel event

* fix workflow id in workflow execute event

* improve telemetry error logging

* fix config and stop process events

* add flush call on n8n stop

* ready for release

* improve telemetry process exit

* fix merge

* improve n8n stop events

Co-authored-by: Mutasem Aldmour <4711238+mutdmour@users.noreply.github.com>
Co-authored-by: Mutasem <mutdmour@gmail.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-10-19 05:57:49 +02:00

240 lines
4.2 KiB
SCSS

@use "mixins/mixins";
@use "mixins/button";
@use "./common/var";
@use "common/popup";
@use "button" as buttons;
@use "input";
@include mixins.b(message-box) {
display: inline-block;
width: var.$msgbox-width;
padding-bottom: 10px;
vertical-align: middle;
background-color: var.$color-white;
border-radius: var.$msgbox-border-radius;
border: 1px solid var(--border-color-light);
font-size: var.$messagebox-font-size;
box-shadow: var.$box-shadow-light;
text-align: left;
overflow: hidden;
backface-visibility: hidden;
@include mixins.e(wrapper) {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
text-align: center;
&::after {
content: '';
display: inline-block;
height: 100%;
width: 0;
vertical-align: middle;
}
}
@include mixins.e(header) {
position: relative;
padding: var.$msgbox-padding-primary;
padding-bottom: 10px;
}
@include mixins.e(title) {
padding-left: 0;
margin-bottom: 0;
font-size: var.$messagebox-font-size;
line-height: 1;
color: var.$messagebox-title-color;
font-weight: var(--font-weight-regular);
}
@include mixins.e(headerbtn) {
position: absolute;
top: var.$msgbox-padding-primary;
right: var.$msgbox-padding-primary;
padding: 0;
border: none;
outline: none;
background: transparent;
font-size: var.$message-close-size;
cursor: pointer;
.el-message-box__close {
color: var(--color-info);
}
&:focus,
&:hover {
.el-message-box__close {
color: var(--color-primary);
}
}
}
@include mixins.e(content) {
padding: 10px var.$msgbox-padding-primary;
color: var.$messagebox-content-color;
font-size: var.$messagebox-content-font-size;
}
@include mixins.e(container) {
position: relative;
}
@include mixins.e(input) {
padding-top: 15px;
& input.invalid {
border-color: var(--color-danger);
&:focus {
border-color: var(--color-danger);
}
}
}
@include mixins.e(status) {
position: absolute;
top: 50%;
transform: translateY(-50%);
font-size: 24px !important;
&::before {
// 防止图标切割
padding-left: 1px;
}
+ .el-message-box__message {
padding-left: 36px;
padding-right: 12px;
}
&.el-icon-success {
color: var.$messagebox-success-color;
}
&.el-icon-info {
color: var.$messagebox-info-color;
}
&.el-icon-warning {
color: var.$messagebox-warning-color;
}
&.el-icon-error {
color: var.$messagebox-danger-color;
}
}
@include mixins.e(message) {
margin: 0;
font-weight: var(--font-weight-regular);
& p {
margin: 0;
line-height: 24px;
}
}
@include mixins.e(errormsg) {
color: var(--color-danger);
font-size: var.$messagebox-error-font-size;
min-height: 18px;
margin-top: 2px;
}
@include mixins.e(btns) {
padding: 5px 15px 0;
text-align: right;
& button {
margin-left: 10px;
}
& .btn--confirm {
@include button.button-just-primary();
@include button.button-medium();
}
& .btn--cancel {
@include button.button-outline();
@include button.button-medium();
}
}
@include mixins.e(btns-reverse) {
flex-direction: row-reverse;
}
// centerAlign 布局
@include mixins.m(center) {
padding-bottom: 30px;
@include mixins.e(header) {
padding-top: 30px;
}
@include mixins.e(title) {
position: relative;
display: flex;
align-items: center;
justify-content: center;
}
@include mixins.e(status) {
position: relative;
top: auto;
padding-right: 5px;
text-align: center;
transform: translateY(-1px);
}
@include mixins.e(message) {
margin-left: 0;
}
@include mixins.e((btns, content)) {
text-align: center;
}
@include mixins.e(content) {
$padding-horizontal: var.$msgbox-padding-primary + 12px;
padding-left: $padding-horizontal;
padding-right: $padding-horizontal;
}
}
}
.msgbox-fade-enter-active {
animation: msgbox-fade-in 0.3s;
}
.msgbox-fade-leave-active {
animation: msgbox-fade-out 0.3s;
}
@keyframes msgbox-fade-in {
0% {
transform: translate3d(0, -20px, 0);
opacity: 0;
}
100% {
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
@keyframes msgbox-fade-out {
0% {
transform: translate3d(0, 0, 0);
opacity: 1;
}
100% {
transform: translate3d(0, -20px, 0);
opacity: 0;
}
}