wip(14-email-templates): CRUD szablonów e-mail z Quill.js + system zmiennych

APPLY in progress — checkpoint human-verify awaiting re-test po namespace fixes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-16 00:21:01 +01:00
parent 3223aac4d9
commit 4d091b2441
11 changed files with 1258 additions and 15 deletions

View File

@@ -105,8 +105,12 @@ a {
}
.sidebar__link {
display: flex;
align-items: center;
gap: 9px;
white-space: nowrap;
border-radius: 8px;
padding: 10px 12px;
padding: 9px 10px;
text-decoration: none;
color: #cbd5e1;
font-weight: 600;
@@ -2303,5 +2307,158 @@ h4.section-title {
.modal--image-preview {
width: min(92vw, 100%);
}
.email-tpl-editor-wrap {
flex-direction: column;
}
.email-tpl-var-panel {
min-width: 200px;
}
.modal-box {
width: 95vw;
max-height: 90vh;
}
}
// Email template editor
.email-tpl-editor-wrap {
display: flex;
flex-direction: column;
border: 1px solid var(--c-border);
border-radius: 6px;
overflow: hidden;
}
.email-tpl-toolbar {
display: flex;
align-items: center;
gap: 6px;
padding: 6px 8px;
background: var(--c-bg-subtle, #f8f9fa);
border-bottom: 1px solid var(--c-border);
}
.email-tpl-var-dropdown {
position: relative;
}
.email-tpl-var-panel {
position: absolute;
top: 100%;
left: 0;
z-index: 50;
min-width: 260px;
max-height: 320px;
overflow-y: auto;
background: var(--c-bg);
border: 1px solid var(--c-border);
border-radius: 6px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
padding: 6px;
margin-top: 4px;
}
.email-var-group {
&:not(:first-child) {
margin-top: 6px;
padding-top: 6px;
border-top: 1px solid var(--c-border);
}
&__label {
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
color: var(--c-text-muted);
padding: 2px 4px;
letter-spacing: 0.03em;
}
}
.email-var-item {
display: block;
width: 100%;
text-align: left;
padding: 3px 6px;
margin: 1px 0;
border: none;
background: none;
font-size: 12px;
font-family: "Roboto Mono", monospace;
color: var(--c-text);
border-radius: 3px;
cursor: pointer;
&:hover {
background: var(--c-primary);
color: #fff;
}
}
#js-quill-editor {
min-height: 200px;
.ql-editor {
min-height: 200px;
font-size: 13px;
}
}
// Modal overlay (reusable)
.modal-overlay {
position: fixed;
inset: 0;
z-index: 1000;
display: flex;
align-items: center;
justify-content: center;
background: rgba(0, 0, 0, 0.45);
}
.modal-box {
width: min(680px, 90vw);
max-height: 80vh;
background: var(--c-bg);
border-radius: 8px;
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
display: flex;
flex-direction: column;
overflow: hidden;
&__header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 16px;
border-bottom: 1px solid var(--c-border);
}
&__title {
margin: 0;
font-size: 15px;
font-weight: 600;
}
&__close {
background: none;
border: none;
font-size: 22px;
line-height: 1;
cursor: pointer;
color: var(--c-text-muted);
padding: 0 4px;
&:hover {
color: var(--c-text);
}
}
&__body {
padding: 12px 16px;
overflow-y: auto;
flex: 1;
}
}