This commit is contained in:
@ -4583,3 +4583,973 @@ select:disabled {
|
||||
.client-profile-dots-empty {
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
|
||||
/* ── App UI tablet editor chrome ── */
|
||||
.appui-save-status {
|
||||
font-size: .8rem;
|
||||
color: var(--text-secondary);
|
||||
font-weight: 600;
|
||||
min-width: 4.5rem;
|
||||
text-align: right;
|
||||
}
|
||||
.appui-layout {
|
||||
display: grid;
|
||||
grid-template-columns: 200px minmax(0, 1fr);
|
||||
gap: 16px;
|
||||
align-items: start;
|
||||
min-height: calc(100vh - 148px);
|
||||
}
|
||||
.appui-sidebar {
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: 12px;
|
||||
box-shadow: var(--shadow);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
max-height: calc(100vh - 132px);
|
||||
position: sticky;
|
||||
top: 12px;
|
||||
}
|
||||
.appui-keys-panel {
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: 12px;
|
||||
box-shadow: var(--shadow);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
width: 100%;
|
||||
max-width: 960px;
|
||||
}
|
||||
.appui-panel-title {
|
||||
margin: 0 0 10px;
|
||||
font-size: .7rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: .06em;
|
||||
text-transform: uppercase;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
.appui-screen-nav {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
overflow: auto;
|
||||
margin: 0 -4px;
|
||||
padding: 0 4px;
|
||||
}
|
||||
.appui-screen-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
width: 100%;
|
||||
padding: 9px 10px;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
background: transparent;
|
||||
font: inherit;
|
||||
color: var(--text);
|
||||
cursor: pointer;
|
||||
text-align: left;
|
||||
}
|
||||
.appui-screen-btn:hover { background: var(--surface-hover); }
|
||||
.appui-screen-btn.active {
|
||||
background: var(--primary-subtle);
|
||||
color: var(--primary);
|
||||
font-weight: 600;
|
||||
}
|
||||
.appui-screen-btn-label { font-size: .88rem; }
|
||||
.appui-screen-btn-meta {
|
||||
font-size: .68rem;
|
||||
font-weight: 700;
|
||||
color: var(--text-secondary);
|
||||
background: var(--surface-muted);
|
||||
border-radius: 6px;
|
||||
min-width: 1.4rem;
|
||||
text-align: center;
|
||||
padding: 1px 5px;
|
||||
}
|
||||
.appui-screen-btn.active .appui-screen-btn-meta {
|
||||
background: rgba(65, 68, 99, 0.12);
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
.appui-stage {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
min-width: 0;
|
||||
}
|
||||
.appui-preview-card {
|
||||
width: 100%;
|
||||
max-width: 960px;
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-lg);
|
||||
box-shadow: var(--shadow);
|
||||
padding: 14px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
.appui-variant-bar:not([hidden]) {
|
||||
display: block;
|
||||
padding-bottom: 2px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
.appui-variant-chips {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 4px;
|
||||
}
|
||||
.appui-variant-chip {
|
||||
border: 1px solid transparent;
|
||||
background: var(--surface-muted);
|
||||
color: var(--text-secondary);
|
||||
border-radius: 6px;
|
||||
padding: 5px 10px;
|
||||
font: inherit;
|
||||
font-size: .78rem;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
}
|
||||
.appui-variant-chip:hover {
|
||||
background: var(--surface-hover);
|
||||
color: var(--text);
|
||||
}
|
||||
.appui-variant-chip.active {
|
||||
background: var(--primary);
|
||||
color: #fff;
|
||||
}
|
||||
.appui-tablet-wrap { width: 100%; }
|
||||
.appui-tablet { margin: 0 auto; width: 100%; }
|
||||
.appui-tablet-bezel {
|
||||
background: #1a1c26;
|
||||
border-radius: 26px;
|
||||
padding: 14px 14px 16px;
|
||||
border: 1px solid #0d0e14;
|
||||
box-shadow: 0 12px 32px rgba(65, 68, 99, 0.18);
|
||||
}
|
||||
.appui-tablet-camera {
|
||||
width: 8px; height: 8px; border-radius: 50%;
|
||||
background: #2e3140; margin: 0 auto 10px;
|
||||
}
|
||||
.appui-tablet-screen {
|
||||
--aq-primary: #414463;
|
||||
--aq-crimson: #D01C41;
|
||||
--aq-bg: #F4F5F8;
|
||||
--aq-surface: #FFFFFF;
|
||||
--aq-header: #FAFBFC;
|
||||
--aq-container: #E8EAF0;
|
||||
--aq-text: #414463;
|
||||
--aq-muted: #6B7088;
|
||||
--aq-stroke: #D5D8E2;
|
||||
--aq-divider: #E4E6EE;
|
||||
--aq-locked: #2E3148;
|
||||
--aq-font: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
||||
background: var(--aq-bg);
|
||||
border-radius: 12px;
|
||||
width: 100%;
|
||||
min-height: 560px;
|
||||
height: min(72vh, 740px);
|
||||
overflow: hidden;
|
||||
color: var(--aq-text);
|
||||
font-family: var(--aq-font);
|
||||
font-size: 14px;
|
||||
line-height: 1.35;
|
||||
position: relative;
|
||||
}
|
||||
.appui-tablet-home {
|
||||
width: 32px; height: 3px; border-radius: 3px;
|
||||
background: #3a3e4e; margin: 10px auto 0;
|
||||
}
|
||||
|
||||
.appui-keys-head {
|
||||
margin-bottom: 10px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.appui-keys-head .appui-panel-title { margin-bottom: 2px; }
|
||||
.appui-keys-meta {
|
||||
margin: 0;
|
||||
font-size: .78rem;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
.appui-keys-list {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
||||
gap: 8px;
|
||||
overflow: visible;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
margin: 0 -2px;
|
||||
padding: 0 2px 4px;
|
||||
}
|
||||
.appui-keys-group-label {
|
||||
font-size: .68rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: .05em;
|
||||
text-transform: uppercase;
|
||||
color: var(--text-secondary);
|
||||
margin: 6px 0 2px;
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
.appui-keys-group-label:first-child { margin-top: 0; }
|
||||
.appui-key-row {
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
padding: 8px;
|
||||
background: var(--surface);
|
||||
}
|
||||
.appui-key-row.in-variant { border-color: rgba(65, 68, 99, 0.22); }
|
||||
.appui-key-row.out-variant { opacity: .55; }
|
||||
.appui-key-row.focused {
|
||||
border-color: var(--primary);
|
||||
background: var(--primary-subtle);
|
||||
opacity: 1;
|
||||
}
|
||||
.appui-key-code {
|
||||
display: block;
|
||||
font-size: .68rem;
|
||||
color: var(--text-secondary);
|
||||
margin-bottom: 4px;
|
||||
word-break: break-all;
|
||||
}
|
||||
.appui-key-input {
|
||||
width: 100%;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 6px;
|
||||
padding: 7px 8px;
|
||||
font: inherit;
|
||||
font-size: .84rem;
|
||||
background: #fff;
|
||||
resize: vertical;
|
||||
min-height: 2.4rem;
|
||||
}
|
||||
.appui-key-input:focus {
|
||||
outline: none;
|
||||
border-color: var(--primary);
|
||||
box-shadow: 0 0 0 2px var(--focus-ring);
|
||||
}
|
||||
|
||||
@media (max-width: 1100px) {
|
||||
.appui-layout {
|
||||
grid-template-columns: 1fr;
|
||||
min-height: 0;
|
||||
}
|
||||
.appui-sidebar {
|
||||
position: static;
|
||||
max-height: none;
|
||||
}
|
||||
.appui-keys-panel {
|
||||
max-width: none;
|
||||
}
|
||||
.appui-screen-nav {
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
gap: 4px;
|
||||
}
|
||||
.appui-screen-btn { width: auto; }
|
||||
}
|
||||
|
||||
/* Editable fields inside tablet */
|
||||
.aq-field {
|
||||
width: 100%;
|
||||
border: 1px dashed transparent;
|
||||
background: transparent;
|
||||
color: inherit;
|
||||
font: inherit;
|
||||
padding: 1px 3px;
|
||||
border-radius: 4px;
|
||||
resize: vertical;
|
||||
min-width: 0;
|
||||
}
|
||||
.aq-field:hover:not(:disabled),
|
||||
.aq-field:focus {
|
||||
outline: none;
|
||||
border-color: rgba(65, 68, 99, 0.45);
|
||||
background: rgba(255, 255, 255, 0.92);
|
||||
}
|
||||
.appui-field-highlight,
|
||||
.aq-field.appui-field-highlight {
|
||||
border-color: var(--aq-primary) !important;
|
||||
background: rgba(65, 68, 99, 0.08) !important;
|
||||
box-shadow: 0 0 0 2px rgba(65, 68, 99, 0.2);
|
||||
}
|
||||
.aq-field-on-primary { color: #fff; text-align: center; font-weight: 600; }
|
||||
.aq-field-on-primary:hover:not(:disabled),
|
||||
.aq-field-on-primary:focus { background: rgba(255,255,255,0.12); color: #fff; }
|
||||
|
||||
.aq-screen {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 640px;
|
||||
height: 100%;
|
||||
background: var(--aq-bg);
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
}
|
||||
.aq-muted { color: var(--aq-muted); }
|
||||
.aq-sm { font-size: 12px; }
|
||||
.aq-xs { font-size: 11px; }
|
||||
.aq-bold { font-weight: 700; color: var(--aq-text); }
|
||||
.aq-body { color: var(--aq-text); font-size: 14px; margin-top: 10px; }
|
||||
.aq-screen-title { font-size: 18px; font-weight: 700; color: var(--aq-primary); line-height: 1.2; }
|
||||
.aq-coach-name { font-size: 18px; font-weight: 700; color: var(--aq-primary); line-height: 1.2; }
|
||||
.aq-section-title { font-size: 18px; font-weight: 700; margin: 12px 0 8px; padding: 0 2px; }
|
||||
.aq-section-title-field { font-size: 18px; font-weight: 700; }
|
||||
.aq-label-xs { display: block; font-size: 11px; color: var(--aq-muted); padding: 0 4px 4px; }
|
||||
.aq-mt { margin-top: 8px; }
|
||||
.aq-divider { height: 1px; background: var(--aq-divider); margin: 12px 0; }
|
||||
|
||||
.aq-card {
|
||||
background: var(--aq-surface);
|
||||
border: 1px solid var(--aq-stroke);
|
||||
border-radius: 14px;
|
||||
box-shadow: 0 1px 3px rgba(65, 68, 99, 0.08);
|
||||
}
|
||||
.aq-card-header { background: var(--aq-header); border-radius: 20px; padding: 16px; }
|
||||
.aq-header-card { background: var(--aq-header); border-radius: 22px; padding: 16px 18px; }
|
||||
|
||||
.aq-icon-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 36px; height: 36px;
|
||||
border-radius: 12px;
|
||||
background: var(--aq-container);
|
||||
color: var(--aq-primary);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.aq-icon-btn-lg { width: 44px; height: 44px; border-radius: 999px; }
|
||||
.aq-lang-chip {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
height: 36px;
|
||||
min-width: 96px;
|
||||
padding: 0 10px;
|
||||
border-radius: 16px;
|
||||
border: 1px solid var(--aq-primary);
|
||||
background: #fff;
|
||||
color: var(--aq-text);
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.aq-control-chip {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 6px;
|
||||
height: 40px;
|
||||
padding: 0 12px;
|
||||
border-radius: 14px;
|
||||
border: 1px solid var(--aq-stroke);
|
||||
background: var(--aq-header);
|
||||
color: var(--aq-text);
|
||||
font-weight: 600;
|
||||
font-size: 13px;
|
||||
}
|
||||
.aq-control-chip-person { padding-left: 10px; }
|
||||
.aq-chip-lead { color: var(--aq-primary); display: flex; }
|
||||
.aq-chip-value { flex: 1; }
|
||||
|
||||
.aq-btn-pill {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 44px;
|
||||
border-radius: 28px;
|
||||
padding: 8px 14px;
|
||||
}
|
||||
.aq-btn-primary { background: var(--aq-primary); color: #fff; }
|
||||
.aq-btn-danger { background: var(--aq-crimson); color: #fff; }
|
||||
.aq-btn-compact { min-height: 40px; min-width: 88px; flex-shrink: 0; padding: 6px 10px; }
|
||||
.aq-btn-text {
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
min-height: 40px; margin-top: 2px;
|
||||
}
|
||||
.aq-btn-outline {
|
||||
flex: 1; display: flex; align-items: center; justify-content: center;
|
||||
min-height: 44px; border-radius: 10px; background: #fff;
|
||||
border: 1px solid var(--aq-stroke); color: var(--aq-text); font-weight: 600;
|
||||
}
|
||||
.aq-btn-square {
|
||||
flex: 1; display: flex; align-items: center; justify-content: center;
|
||||
min-height: 44px; border-radius: 10px; font-weight: 600;
|
||||
}
|
||||
.aq-btn-square.primary { background: var(--aq-primary); color: #fff; }
|
||||
|
||||
.aq-outlined {
|
||||
display: flex; align-items: center; gap: 8px;
|
||||
border: 1px solid var(--aq-stroke);
|
||||
border-radius: 12px;
|
||||
padding: 10px 12px;
|
||||
background: #fff;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.aq-outlined:first-child { margin-top: 0; }
|
||||
.aq-outlined-icon { color: var(--aq-muted); display: flex; flex-shrink: 0; }
|
||||
.aq-outlined-input { flex: 1; color: var(--aq-muted); }
|
||||
.aq-search { margin: 12px 16px 8px; }
|
||||
|
||||
/* Auth */
|
||||
.aq-auth { padding: 22px 20px 16px; }
|
||||
.aq-auth-top { display: flex; align-items: center; justify-content: space-between; }
|
||||
.aq-auth-top-right { display: flex; align-items: center; gap: 8px; }
|
||||
.aq-logo-well {
|
||||
width: 44px; height: 44px; border-radius: 50%;
|
||||
background: var(--aq-container);
|
||||
border: 1.5px solid var(--aq-primary);
|
||||
}
|
||||
.aq-auth-title { margin-top: 28px; font-size: 22px; font-weight: 700; color: var(--aq-text); }
|
||||
.aq-auth-sub { margin-top: 6px; font-size: 14px; }
|
||||
.aq-auth .aq-card-header { margin-top: 22px; }
|
||||
.aq-auth .aq-btn-pill { margin-top: 18px; }
|
||||
.aq-auth-footer { margin-top: auto; padding-top: 16px; }
|
||||
|
||||
/* Home */
|
||||
.aq-home { padding: 0; }
|
||||
.aq-home-scroll {
|
||||
flex: 1; overflow: auto; padding: 14px 14px 0;
|
||||
display: flex; flex-direction: column; gap: 0;
|
||||
}
|
||||
.aq-header-row { display: flex; align-items: flex-start; gap: 6px; }
|
||||
.aq-header-titles { flex: 1; min-width: 0; }
|
||||
.aq-status-chip {
|
||||
display: inline-flex; align-items: center; gap: 5px;
|
||||
padding: 5px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.aq-status-chip.online { background: #E8F5E9; color: #1B5E20; }
|
||||
.aq-dot { width: 7px; height: 7px; border-radius: 50%; background: #2E7D32; }
|
||||
.aq-status-text { width: auto; font-size: 11px; font-weight: 700; color: inherit; }
|
||||
.aq-dual-chips { display: flex; gap: 10px; }
|
||||
.aq-chip-col { flex: 1; min-width: 0; }
|
||||
.aq-note-row {
|
||||
margin-top: 12px; display: flex; align-items: center; gap: 10px;
|
||||
background: var(--aq-container); border: 1.5px solid var(--aq-primary);
|
||||
border-radius: 16px; padding: 10px 10px 10px 12px; min-height: 72px;
|
||||
}
|
||||
.aq-note-icon-well {
|
||||
width: 48px; height: 48px; border-radius: 50%; background: var(--aq-primary);
|
||||
display: flex; align-items: center; justify-content: center; flex-shrink: 0;
|
||||
}
|
||||
.aq-note-icon-well-sm { width: 44px; height: 44px; }
|
||||
.aq-note-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
|
||||
.aq-note-label-row { display: flex; align-items: center; gap: 6px; }
|
||||
.aq-note-label { font-size: 13px; font-weight: 700; color: var(--aq-primary); flex: 1; }
|
||||
.aq-note-preview { font-size: 13px; color: var(--aq-text); }
|
||||
.aq-note-pending {
|
||||
display: inline-block; font-size: 10px; font-weight: 600; white-space: nowrap;
|
||||
color: #8A5A00; background: #FFF3CD; border-radius: 999px; padding: 1px 8px;
|
||||
}
|
||||
.aq-note-inset { margin: 10px 12px 4px; }
|
||||
.aq-note-inset .aq-note-row { margin-top: 0; }
|
||||
.aq-note-cta-pill {
|
||||
flex-shrink: 0; min-height: 40px; padding: 6px 12px; font-size: 12px;
|
||||
}
|
||||
.aq-note-cta-pill .aq-field { color: #fff; width: auto; min-width: 3rem; font-size: 12px; }
|
||||
.aq-note-editor-header {
|
||||
display: flex; align-items: center; gap: 12px; margin-bottom: 4px;
|
||||
}
|
||||
.aq-note-editor-header .aq-sheet-title { margin-bottom: 2px; font-size: 18px; }
|
||||
.aq-note-input { min-height: 100px; resize: vertical; }
|
||||
.aq-note-cancel { margin-top: 8px; }
|
||||
|
||||
.aq-toast {
|
||||
position: absolute; left: 50%; bottom: 72px; transform: translateX(-50%);
|
||||
z-index: 20; max-width: calc(100% - 32px);
|
||||
background: #fff;
|
||||
color: var(--aq-text);
|
||||
border: 1px solid var(--aq-stroke);
|
||||
border-radius: 10px;
|
||||
padding: 10px 14px;
|
||||
box-shadow: 0 8px 24px rgba(65, 68, 99, 0.18);
|
||||
}
|
||||
.aq-toast-above-sheet { bottom: 200px; }
|
||||
.aq-toast-field {
|
||||
width: 100%;
|
||||
color: var(--aq-text);
|
||||
background: #F4F5F8;
|
||||
border: 1px solid var(--aq-stroke);
|
||||
border-radius: 8px;
|
||||
padding: 8px 10px;
|
||||
font-size: 12px;
|
||||
text-align: left;
|
||||
resize: vertical;
|
||||
}
|
||||
.aq-toast-field::selection {
|
||||
background: #414463;
|
||||
color: #fff;
|
||||
}
|
||||
.aq-toast textarea.aq-toast-field { min-height: 2.8em; }
|
||||
|
||||
.aq-sheet-scrim {
|
||||
position: absolute; inset: 0; z-index: 15;
|
||||
background: rgba(40, 42, 58, 0.45);
|
||||
display: flex; align-items: flex-end;
|
||||
}
|
||||
.aq-bottom-sheet {
|
||||
width: 100%; background: #fff; border-radius: 20px 20px 0 0;
|
||||
padding: 10px 18px 22px; box-shadow: 0 -8px 24px rgba(0,0,0,.12);
|
||||
}
|
||||
.aq-sheet-handle {
|
||||
width: 44px; height: 5px; border-radius: 100px; background: #C5C8D4;
|
||||
margin: 0 auto 14px;
|
||||
}
|
||||
.aq-sheet-title { font-size: 16px; font-weight: 700; width: 100%; margin-bottom: 10px; }
|
||||
.aq-sheet-logout { width: 100%; justify-content: flex-start; }
|
||||
.aq-sheet-actions {
|
||||
display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 12px;
|
||||
}
|
||||
.aq-field-error { color: #D01C41; margin-top: 6px; }
|
||||
|
||||
.aq-option-row {
|
||||
display: flex; align-items: center; gap: 10px;
|
||||
padding: 8px 4px; border-bottom: 1px solid var(--aq-stroke);
|
||||
}
|
||||
.aq-radio, .aq-check {
|
||||
width: 16px; height: 16px; border: 2px solid var(--aq-primary); border-radius: 50%;
|
||||
flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
|
||||
font-size: 11px; color: var(--aq-primary);
|
||||
}
|
||||
.aq-check { border-radius: 3px; }
|
||||
|
||||
.aq-date-spinners { display: flex; gap: 8px; align-items: flex-start; }
|
||||
.aq-date-col { flex: 1; min-width: 0; position: relative; }
|
||||
.aq-date-col-open { flex: 1.4; }
|
||||
.aq-spinner-field {
|
||||
border: 1px solid var(--aq-stroke); border-radius: 10px; background: #fff;
|
||||
padding: 8px 10px; min-height: 36px;
|
||||
}
|
||||
.aq-spinner-dropdown {
|
||||
margin-top: 4px; border: 1px solid var(--aq-stroke); border-radius: 10px;
|
||||
background: #fff; box-shadow: 0 8px 20px rgba(65,68,99,.14);
|
||||
max-height: 160px; overflow: auto; padding: 4px;
|
||||
display: flex; flex-direction: column; gap: 2px;
|
||||
}
|
||||
.aq-spinner-dropdown .aq-field {
|
||||
width: 100%; border: 0; background: transparent; padding: 6px 8px; border-radius: 6px;
|
||||
}
|
||||
.aq-spinner-prompt {
|
||||
border: 1px dashed var(--aq-stroke); border-radius: 10px; padding: 8px 10px;
|
||||
}
|
||||
|
||||
.aq-glass-header {
|
||||
display: grid; grid-template-columns: 2fr repeat(5, 1fr);
|
||||
gap: 4px; align-items: center; text-align: center; color: var(--aq-primary);
|
||||
}
|
||||
.aq-glass-spacer { }
|
||||
.aq-glass-icon { font-size: 16px; }
|
||||
.aq-glass-row {
|
||||
display: grid; grid-template-columns: 2fr repeat(5, 1fr);
|
||||
gap: 4px; align-items: center; margin-top: 10px;
|
||||
}
|
||||
.aq-glass-symptom { font-size: 12px; color: var(--aq-text); }
|
||||
.aq-glass-row .aq-radio { margin: 0 auto; }
|
||||
|
||||
.aq-qa-card {
|
||||
border: 1px solid var(--aq-stroke); border-radius: 12px;
|
||||
padding: 10px 12px; margin-bottom: 8px; background: #fff;
|
||||
}
|
||||
|
||||
.aq-next-step {
|
||||
margin-top: 14px;
|
||||
background: var(--aq-container);
|
||||
border: 2px solid var(--aq-primary);
|
||||
border-left-width: 5px;
|
||||
border-radius: 16px;
|
||||
padding: 12px 14px;
|
||||
box-shadow: 0 4px 12px rgba(65, 68, 99, 0.12);
|
||||
}
|
||||
.aq-eyebrow {
|
||||
display: inline-block; background: var(--aq-primary); color: #fff;
|
||||
border-radius: 999px; padding: 3px 10px; font-size: 10px; font-weight: 700;
|
||||
letter-spacing: .04em; margin-bottom: 8px;
|
||||
}
|
||||
.aq-eyebrow-field { color: #fff; font-size: 10px; font-weight: 700; width: auto; }
|
||||
.aq-next-step-body { display: flex; align-items: center; gap: 10px; }
|
||||
.aq-next-step-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
|
||||
|
||||
.aq-qn-card {
|
||||
display: flex; align-items: center; justify-content: space-between; gap: 10px;
|
||||
border-radius: 22px; padding: 14px 16px; margin-bottom: 10px;
|
||||
border: 1px solid var(--aq-stroke); min-height: 64px;
|
||||
}
|
||||
.aq-qn-card.open { background: var(--aq-header); }
|
||||
.aq-qn-card.locked { background: var(--aq-locked); color: #fff; border-color: transparent; }
|
||||
.aq-qn-name { font-weight: 700; font-size: 14px; }
|
||||
.aq-qn-card.locked .aq-qn-name { color: #fff; }
|
||||
.aq-qn-lock-hint { color: #D8DAE3; font-size: 11px; margin-top: 4px; }
|
||||
.aq-qn-group {
|
||||
background: var(--aq-header);
|
||||
border: 1px solid var(--aq-stroke);
|
||||
border-radius: 18px;
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.aq-qn-group .aq-qn-card { margin-bottom: 8px; }
|
||||
.aq-qn-group .aq-qn-card:last-of-type { margin-bottom: 0; }
|
||||
.aq-category-review-badge {
|
||||
display: flex; gap: 12px; align-items: center;
|
||||
margin-top: 12px;
|
||||
background: #FCE8ED;
|
||||
border: 2px solid #D01C41;
|
||||
border-radius: 16px;
|
||||
padding: 12px;
|
||||
}
|
||||
.aq-category-review-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
|
||||
.aq-category-review-title {
|
||||
color: #8A1230; font-weight: 700; font-size: 14px; width: 100%;
|
||||
}
|
||||
.aq-category-review-body {
|
||||
color: var(--aq-text); font-size: 12px; width: 100%;
|
||||
background: transparent; border: 0; padding: 0; resize: vertical; min-height: 2.4em;
|
||||
}
|
||||
.aq-traffic-compact { display: flex; flex-direction: column; gap: 3px; flex-shrink: 0; }
|
||||
.aq-traffic-compact .lamp {
|
||||
width: 10px; height: 10px; border-radius: 50%; background: #C5C8D4;
|
||||
}
|
||||
.aq-traffic-compact .lamp.green { background: #3D8B55; }
|
||||
.aq-traffic-compact .lamp.yellow { background: #E0A800; }
|
||||
.aq-traffic-compact .lamp.red { background: #D01C41; }
|
||||
.aq-traffic-compact .lamp.off { background: #D8DAE3; opacity: .55; }
|
||||
.aq-process-review {
|
||||
background: #FCE8ED;
|
||||
border-color: #D01C41;
|
||||
}
|
||||
.aq-process-review .aq-process-complete-title { color: #8A1230; }
|
||||
.aq-process-review .aq-btn-complete {
|
||||
background: #D01C41;
|
||||
}
|
||||
.aq-qn-name { font-weight: 700; font-size: 14px; }
|
||||
.aq-qn-card.locked .aq-qn-name { color: #fff; }
|
||||
.aq-qn-lock-hint { color: #D8DAE3; font-size: 11px; margin-top: 4px; }
|
||||
.aq-chip-start, .aq-chip-edit, .aq-chip-edit-pending, .aq-chip-locked {
|
||||
border-radius: 999px; padding: 6px 12px; font-size: 11px; font-weight: 700;
|
||||
white-space: nowrap; flex-shrink: 0;
|
||||
}
|
||||
.aq-chip-start, .aq-chip-edit-pending { background: #F0B429; color: #3A2E0A; }
|
||||
.aq-chip-edit { background: #3D8B55; color: #fff; }
|
||||
.aq-chip-locked { background: #E8EAF0; color: #414463; }
|
||||
.aq-chip-field { width: auto; text-align: center; color: inherit; font-weight: 700; font-size: 11px; }
|
||||
|
||||
.aq-hub-dock {
|
||||
display: flex; margin-top: auto;
|
||||
border-top: 1px solid var(--aq-divider);
|
||||
box-shadow: 0 -4px 16px rgba(65, 68, 99, 0.1);
|
||||
}
|
||||
.aq-dock-btn {
|
||||
flex: 1; height: 52px; display: flex; align-items: center; justify-content: center;
|
||||
gap: 6px; padding: 0 10px; font-weight: 600; font-size: 13px;
|
||||
border-radius: 0;
|
||||
}
|
||||
.aq-dock-btn.review { background: #414463; color: #fff; }
|
||||
.aq-dock-btn.upload { background: #D01C41; color: #fff; }
|
||||
.aq-dock-icon { flex-shrink: 0; }
|
||||
.aq-process-complete {
|
||||
margin-top: 12px;
|
||||
background: #DCEFE4;
|
||||
border: 3px solid #3D8B55;
|
||||
border-radius: 24px;
|
||||
padding: 16px 18px;
|
||||
}
|
||||
.aq-process-complete-top { display: flex; gap: 14px; align-items: flex-start; }
|
||||
.aq-process-complete-icon-well {
|
||||
width: 56px; height: 56px; border-radius: 50%; background: #3D8B55; color: #fff;
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
font-size: 24px; font-weight: 700; flex-shrink: 0;
|
||||
}
|
||||
.aq-process-complete-copy { flex: 1; min-width: 0; }
|
||||
.aq-process-complete-title { color: #3D8B55; font-size: 18px; }
|
||||
.aq-process-complete-body { color: var(--aq-text); }
|
||||
.aq-btn-complete {
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
min-height: 48px; border-radius: 14px; padding: 10px 14px;
|
||||
background: #3D8B55; color: #fff; font-weight: 600;
|
||||
}
|
||||
.aq-btn-complete-outline {
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
min-height: 48px; border-radius: 14px; padding: 10px 14px;
|
||||
background: #fff; color: #3D8B55; font-weight: 600;
|
||||
border: 1.5px solid #3D8B55;
|
||||
}
|
||||
.aq-btn-complete .aq-field,
|
||||
.aq-btn-complete-outline .aq-field { width: 100%; text-align: center; }
|
||||
|
||||
/* Client gate */
|
||||
.aq-client-gate {
|
||||
background: linear-gradient(165deg, #E4E7F0 0%, #F4F5F8 55%);
|
||||
padding: 14px 0 12px; overflow: auto;
|
||||
}
|
||||
.aq-client-gate .aq-header-card { margin: 0 14px; }
|
||||
.aq-gate-title-row { display: flex; align-items: center; gap: 10px; }
|
||||
.aq-avatar-well, .aq-avatar-sm {
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
background: var(--aq-container); color: var(--aq-primary); border-radius: 50%; flex-shrink: 0;
|
||||
}
|
||||
.aq-avatar-well { width: 40px; height: 40px; }
|
||||
.aq-avatar-sm { width: 32px; height: 32px; }
|
||||
.aq-count { margin-top: 8px; font-weight: 700; color: var(--aq-primary); font-size: 12px; }
|
||||
.aq-client-card {
|
||||
display: flex; margin: 8px 14px; background: #fff;
|
||||
border: 1px solid var(--aq-stroke); border-radius: 14px;
|
||||
box-shadow: 0 2px 6px rgba(65, 68, 99, 0.08); overflow: hidden;
|
||||
}
|
||||
.aq-client-stripe { width: 5px; background: var(--aq-primary); flex-shrink: 0; }
|
||||
.aq-client-card-body { flex: 1; padding: 10px 12px; }
|
||||
.aq-client-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
|
||||
.aq-badge-done {
|
||||
margin-left: auto; background: #DCEFE4; color: #3D8B55;
|
||||
border-radius: 999px; padding: 2px 8px; font-weight: 700;
|
||||
}
|
||||
|
||||
/* Questionnaire */
|
||||
.aq-qn { padding: 0; }
|
||||
.aq-qn-top {
|
||||
display: flex; align-items: center; justify-content: space-between;
|
||||
padding: 10px 12px 0;
|
||||
}
|
||||
.aq-qn-top-right { display: flex; align-items: center; gap: 8px; }
|
||||
.aq-qn-scroll { flex: 1; overflow: auto; padding: 8px 12px 12px; }
|
||||
.aq-q-card { padding: 12px; margin-bottom: 10px; border-radius: 16px; }
|
||||
.aq-option-row {
|
||||
border: 1px dashed var(--aq-stroke); border-radius: 10px; padding: 10px;
|
||||
background: var(--aq-header);
|
||||
}
|
||||
.aq-sample { color: var(--aq-text); font-weight: 600; flex: 1; }
|
||||
.aq-qn-footer {
|
||||
background: #fff; border-top: 1px solid var(--aq-stroke);
|
||||
padding: 10px 14px 14px; box-shadow: 0 -4px 12px rgba(65, 68, 99, 0.08);
|
||||
display: flex; flex-direction: column;
|
||||
}
|
||||
.aq-progress-row { margin-bottom: 4px; display: flex; flex-direction: column; gap: 4px; }
|
||||
.aq-progress-label-end { display: block; text-align: right; width: 100%; }
|
||||
.aq-progress-track {
|
||||
margin-top: 4px; height: 6px; border-radius: 3px; background: var(--aq-divider); overflow: hidden;
|
||||
}
|
||||
.aq-progress-fill { height: 100%; background: var(--aq-primary); border-radius: 3px; }
|
||||
|
||||
/* Review */
|
||||
.aq-review { padding: 14px; overflow: auto; }
|
||||
.aq-review-header { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
|
||||
.aq-review-header > div:first-child { flex: 1; }
|
||||
.aq-review-header-actions { display: flex; align-items: center; gap: 6px; }
|
||||
.aq-supervisor-notice {
|
||||
background: #FCE8ED; border: 1px solid #D01C41; color: #8A1230;
|
||||
border-radius: 14px; padding: 12px; margin-bottom: 10px;
|
||||
}
|
||||
.aq-profile-card { padding: 12px; }
|
||||
.aq-profile-top { display: flex; gap: 12px; align-items: flex-start; }
|
||||
.aq-traffic {
|
||||
width: 28px; padding: 6px 4px; border-radius: 10px;
|
||||
background: #2A2D3A; display: flex; flex-direction: column; gap: 4px; align-items: center;
|
||||
}
|
||||
.aq-traffic .lamp { width: 14px; height: 14px; border-radius: 50%; background: #4A4E5C; }
|
||||
.aq-traffic .lamp.yellow { background: #F9A825; }
|
||||
.aq-band-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
|
||||
.aq-band {
|
||||
border-radius: 999px; padding: 3px 10px; font-weight: 700; font-size: 11px;
|
||||
}
|
||||
.aq-band.mid { background: #FFF6E7; color: #6A4A00; }
|
||||
.aq-band.none { background: #E8EAF0; color: #6B7088; }
|
||||
.aq-band-btns { display: flex; gap: 6px; margin-top: 6px; }
|
||||
.aq-band-btn {
|
||||
flex: 1; text-align: center; border-radius: 8px; padding: 8px 4px;
|
||||
border: 1px solid var(--aq-stroke); font-weight: 700;
|
||||
}
|
||||
.aq-band-btn.green { background: #EDF8F2; color: #1B5E20; border-color: #D4EEDF; }
|
||||
.aq-band-btn.yellow { background: #FFF6E7; color: #6A4A00; border-color: #FFE8C4; }
|
||||
.aq-band-btn.red { background: #FCE8ED; color: #D01C41; border-color: #F5C5D0; }
|
||||
|
||||
/* Upload */
|
||||
.aq-upload { padding: 14px; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
|
||||
.aq-summary-chip { justify-content: center; text-align: center; }
|
||||
.aq-list-card { padding: 12px; flex: 1; }
|
||||
.aq-client-header { font-size: 12px; font-weight: 700; color: var(--aq-primary); margin-bottom: 8px; }
|
||||
.aq-upload-row {
|
||||
display: flex; align-items: center; justify-content: space-between;
|
||||
border: 1px solid var(--aq-stroke); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px;
|
||||
}
|
||||
.aq-chevron { color: #8A8FA3; font-size: 18px; }
|
||||
.aq-upload-footer { display: flex; gap: 8px; margin-top: auto; }
|
||||
|
||||
/* Help */
|
||||
.aq-help { padding: 0; overflow: hidden; }
|
||||
.aq-toolbar {
|
||||
display: flex; align-items: center; gap: 8px;
|
||||
background: var(--aq-header); padding: 12px 14px;
|
||||
border-bottom: 1px solid var(--aq-stroke);
|
||||
box-shadow: 0 2px 6px rgba(65, 68, 99, 0.06);
|
||||
}
|
||||
.aq-toolbar-back { font-size: 22px; color: var(--aq-primary); line-height: 1; }
|
||||
.aq-help-body { flex: 1; overflow: auto; padding: 12px 14px; }
|
||||
.aq-picker-card {
|
||||
display: flex; align-items: center; justify-content: space-between;
|
||||
padding: 10px 14px; border-radius: 16px; margin-bottom: 10px; background: var(--aq-header);
|
||||
}
|
||||
.aq-help-current {
|
||||
background: #fff; border: 1.5px solid var(--aq-primary); border-left-width: 5px;
|
||||
border-radius: 18px; padding: 14px;
|
||||
}
|
||||
.aq-zone-pill {
|
||||
display: inline-block; background: var(--aq-container); border-radius: 999px;
|
||||
padding: 2px 8px; font-weight: 700;
|
||||
}
|
||||
.aq-help-section { display: flex; gap: 10px; margin-top: 10px; }
|
||||
.aq-step {
|
||||
width: 24px; height: 24px; border-radius: 50%; background: var(--aq-container);
|
||||
color: var(--aq-primary); font-weight: 700; font-size: 12px;
|
||||
display: flex; align-items: center; justify-content: center; flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* Sync */
|
||||
.aq-sync {
|
||||
align-items: center; justify-content: center; text-align: center;
|
||||
padding: 36px 24px; gap: 0;
|
||||
}
|
||||
.aq-sync-title { font-size: 14px; margin-bottom: 22px; }
|
||||
.aq-sync-stage {
|
||||
width: 96px; height: 96px; border-radius: 50%; background: #fff;
|
||||
border: 1px solid var(--aq-stroke); display: flex; align-items: center; justify-content: center;
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
.aq-sync-stage-done {
|
||||
background: #DCEFE4;
|
||||
border-color: #3D8B55;
|
||||
}
|
||||
.aq-sync-check {
|
||||
font-size: 36px;
|
||||
font-weight: 700;
|
||||
color: #3D8B55;
|
||||
line-height: 1;
|
||||
}
|
||||
.aq-sync-ring {
|
||||
width: 72px; height: 72px; border-radius: 50%;
|
||||
border: 4px solid var(--aq-divider); border-top-color: var(--aq-primary);
|
||||
animation: appui-spin .9s linear infinite;
|
||||
}
|
||||
.aq-sync-status { font-size: 18px; font-weight: 700; margin-bottom: 8px; max-width: 280px; }
|
||||
.aq-sync-sub { max-width: 280px; }
|
||||
.aq-sync-bar {
|
||||
width: 100%; max-width: 280px; height: 6px; border-radius: 3px;
|
||||
background: var(--aq-divider); margin-top: 22px; overflow: hidden;
|
||||
}
|
||||
.aq-sync-bar-fill { height: 100%; background: var(--aq-primary); }
|
||||
|
||||
/* Dialogs */
|
||||
.aq-dialogs {
|
||||
padding: 24px 16px; gap: 16px; justify-content: center; overflow: auto;
|
||||
}
|
||||
.aq-dialog {
|
||||
background: #fff; border: 1px solid var(--aq-stroke); border-radius: 18px;
|
||||
padding: 18px; box-shadow: 0 8px 24px rgba(65, 68, 99, 0.12);
|
||||
display: flex; flex-direction: column; gap: 8px; width: 100%;
|
||||
}
|
||||
.aq-dialog-title { font-size: 16px; font-weight: 700; text-align: center; color: var(--aq-text); }
|
||||
.aq-dialog-msg { text-align: center; }
|
||||
.aq-dialog-icon {
|
||||
width: 48px; height: 48px; border-radius: 50%; margin: 0 auto 4px;
|
||||
background: var(--aq-container);
|
||||
}
|
||||
.aq-dialog-icon.info { background: #E8EAF0; }
|
||||
.aq-dialog-icon.warning { background: #FCE8ED; }
|
||||
.aq-dialog-icon.logout,
|
||||
.aq-dialog-icon.danger { background: #FCE8ED; }
|
||||
.aq-dialog-details {
|
||||
background: var(--aq-header); border: 1px solid var(--aq-stroke);
|
||||
border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
.aq-dialog-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
|
||||
.aq-dialog-actions-col { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
|
||||
.aq-chip-row {
|
||||
display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
|
||||
}
|
||||
.aq-chip-row .aq-field {
|
||||
width: auto; background: var(--aq-container); border-radius: 999px;
|
||||
padding: 4px 10px; border: 1px solid var(--aq-stroke);
|
||||
}
|
||||
|
||||
/* Score calculated notice */
|
||||
.aq-score-notice { padding: 0; overflow: auto; }
|
||||
.aq-score-hero {
|
||||
background: linear-gradient(165deg, #DCEFE4 0%, #F4F5F8 100%);
|
||||
padding: 24px 18px 20px; text-align: center;
|
||||
display: flex; flex-direction: column; align-items: center; gap: 6px;
|
||||
}
|
||||
.aq-score-icon {
|
||||
width: 56px; height: 56px; border-radius: 50%; background: #3D8B55; color: #fff;
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
font-size: 28px; font-weight: 700; margin-bottom: 6px;
|
||||
}
|
||||
.aq-score-eyebrow {
|
||||
font-size: 11px; font-weight: 700; letter-spacing: .06em;
|
||||
text-transform: uppercase; color: #3D8B55; text-align: center;
|
||||
}
|
||||
.aq-score-title { font-size: 20px; font-weight: 700; text-align: center; }
|
||||
.aq-score-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
|
||||
.aq-score-card { padding: 14px; border-radius: 16px; }
|
||||
|
||||
/* Review previous button below list */
|
||||
.aq-review-previous {
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
min-height: 44px; border-radius: 10px; background: #fff;
|
||||
border: 1px solid var(--aq-stroke); color: var(--aq-text); font-weight: 600;
|
||||
margin: 8px 14px;
|
||||
}
|
||||
|
||||
/* Help screen picker rows (horizontal: label | chip) */
|
||||
.aq-picker-row {
|
||||
display: flex; align-items: center; justify-content: space-between;
|
||||
padding: 10px 14px; border-radius: 16px; margin-bottom: 10px; background: var(--aq-header);
|
||||
}
|
||||
.aq-picker-label { flex: 1; }
|
||||
|
||||
/* Help section item_help_section structure */
|
||||
.aq-help-section-header { display: flex; align-items: center; gap: 10px; }
|
||||
.aq-help-section-title { flex: 1; min-width: 0; }
|
||||
.aq-help-screenshot-box {
|
||||
margin-top: 10px; border: 1px solid var(--aq-stroke); border-radius: 10px;
|
||||
background: var(--aq-header); height: 80px; display: flex;
|
||||
align-items: center; justify-content: center; color: var(--aq-muted); font-size: 11px;
|
||||
}
|
||||
.aq-help-screenshot-box::after { content: '[ screenshot ]'; }
|
||||
|
||||
/* Sync checkpoint dots under progress bar */
|
||||
.aq-sync-checkpoints {
|
||||
display: flex; gap: 8px; margin-top: 10px; align-items: center;
|
||||
}
|
||||
.aq-sync-dot {
|
||||
width: 8px; height: 8px; border-radius: 50%;
|
||||
background: var(--aq-divider); flex-shrink: 0; transition: background 0.2s;
|
||||
}
|
||||
.aq-sync-dot.done { background: var(--aq-primary); }
|
||||
|
||||
/* Password requirements block (one unified visual text block) */
|
||||
.aq-pw-reqs {
|
||||
background: var(--aq-header); border: 1px solid var(--aq-stroke);
|
||||
border-radius: 10px; padding: 10px 12px; margin-top: 8px;
|
||||
display: flex; flex-direction: column; gap: 4px; color: var(--aq-muted);
|
||||
}
|
||||
.aq-pw-reqs .aq-field { color: var(--aq-muted); }
|
||||
|
||||
/* Upload offline hint footer */
|
||||
.aq-upload-footer-hint {
|
||||
padding: 8px 14px; color: var(--aq-muted); font-size: 12px;
|
||||
text-align: center; margin-top: auto;
|
||||
}
|
||||
|
||||
/* Dialog details lines (unified box, newline-joined) */
|
||||
.aq-dialog-detail-line { display: block; padding: 1px 0; }
|
||||
|
||||
@keyframes appui-spin { to { transform: rotate(360deg); } }
|
||||
|
||||
@ -68,6 +68,12 @@
|
||||
Translations
|
||||
</a>
|
||||
</li>
|
||||
<li data-nav-roles="admin supervisor">
|
||||
<a href="#/app-ui">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="5" y="2" width="14" height="20" rx="2"/><line x1="12" y1="18" x2="12.01" y2="18"/></svg>
|
||||
App UI
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#/export">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>
|
||||
|
||||
1762
website/js/app-ui-screens.js
Normal file
1762
website/js/app-ui-screens.js
Normal file
File diff suppressed because it is too large
Load Diff
@ -10,6 +10,7 @@ import { usersPage } from './pages/users.js';
|
||||
import { assignmentsPage } from './pages/assignments.js';
|
||||
import { clientsPage } from './pages/clients.js';
|
||||
import { translationsPage } from './pages/translations.js';
|
||||
import { appUiPage } from './pages/app-ui.js';
|
||||
import { devPage } from './pages/dev.js';
|
||||
import { insightsPage } from './pages/insights.js';
|
||||
import { coachesPage } from './pages/coaches.js';
|
||||
@ -163,6 +164,7 @@ addRoute('/users', roleGuard(['admin', 'supervisor'], usersPage));
|
||||
addRoute('/assignments', roleGuard(['admin', 'supervisor'], assignmentsPage));
|
||||
addRoute('/clients', roleGuard(['admin', 'supervisor'], clientsPage));
|
||||
addRoute('/translations', roleGuard(['admin', 'supervisor'], translationsPage));
|
||||
addRoute('/app-ui', roleGuard(['admin', 'supervisor'], appUiPage));
|
||||
addRoute('/insights', roleGuard(['admin', 'supervisor'], insightsPage));
|
||||
addRoute('/coaches', roleGuard(['admin', 'supervisor'], coachesPage));
|
||||
addRoute('/dev', roleGuard(['admin'], devPage));
|
||||
|
||||
325
website/js/pages/app-ui.js
Normal file
325
website/js/pages/app-ui.js
Normal file
@ -0,0 +1,325 @@
|
||||
import { apiGet, apiPut } from '../api.js';
|
||||
import { canEdit, pageHeaderHTML, showToast } from '../app.js';
|
||||
import { SOURCE_LANG, normalizeEntry, germanFor, escHtml as esc } from '../translations-helpers.js';
|
||||
import { APP_UI_SCREENS, screenById, getVariants, variantById } from '../app-ui-screens.js';
|
||||
|
||||
const STORAGE_SCREEN = 'qdb_appui_screen';
|
||||
const STORAGE_VARIANT = 'qdb_appui_variant';
|
||||
|
||||
let appStrings = [];
|
||||
/** @type {Record<string, string>} key → german text */
|
||||
let germanByKey = {};
|
||||
let selectedScreenId = '';
|
||||
/** @type {Record<string, string>} screenId → variantId */
|
||||
let selectedVariantByScreen = {};
|
||||
let saveTimers = {};
|
||||
let savesInFlight = 0;
|
||||
|
||||
export async function appUiPage() {
|
||||
const app = document.getElementById('app');
|
||||
app.innerHTML = `
|
||||
${pageHeaderHTML(
|
||||
'App UI',
|
||||
'<span id="appuiSaveStatus" class="appui-save-status" aria-live="polite"></span>',
|
||||
{
|
||||
subtitle: 'Edit German wording for the counselor app. Early version — some design details in the preview may be off.',
|
||||
},
|
||||
)}
|
||||
<div id="appuiRoot"><div class="spinner"></div></div>
|
||||
`;
|
||||
|
||||
try {
|
||||
selectedScreenId = localStorage.getItem(STORAGE_SCREEN) || APP_UI_SCREENS[0].id;
|
||||
if (!screenById(selectedScreenId)) selectedScreenId = APP_UI_SCREENS[0].id;
|
||||
try {
|
||||
selectedVariantByScreen = JSON.parse(localStorage.getItem(STORAGE_VARIANT) || '{}') || {};
|
||||
} catch (_) {
|
||||
selectedVariantByScreen = {};
|
||||
}
|
||||
renderShell();
|
||||
await loadAppStrings();
|
||||
} catch (e) {
|
||||
document.getElementById('appuiRoot').innerHTML =
|
||||
`<p class="error-text" style="padding:16px">${esc(e.message)}</p>`;
|
||||
}
|
||||
}
|
||||
|
||||
function currentVariantId(screen) {
|
||||
const variants = getVariants(screen);
|
||||
const stored = selectedVariantByScreen[screen.id];
|
||||
if (stored && variants.some(v => v.id === stored)) return stored;
|
||||
return variants[0].id;
|
||||
}
|
||||
|
||||
function setVariant(screenId, variantId) {
|
||||
selectedVariantByScreen[screenId] = variantId;
|
||||
localStorage.setItem(STORAGE_VARIANT, JSON.stringify(selectedVariantByScreen));
|
||||
}
|
||||
|
||||
function renderShell() {
|
||||
document.getElementById('appuiRoot').innerHTML = `
|
||||
<div class="appui-layout">
|
||||
<aside class="appui-sidebar">
|
||||
<h2 class="appui-panel-title">Screens</h2>
|
||||
<nav class="appui-screen-nav" id="appuiScreenNav" aria-label="App screens"></nav>
|
||||
</aside>
|
||||
|
||||
<section class="appui-stage">
|
||||
<div class="appui-preview-card">
|
||||
<div class="appui-variant-bar" id="appuiVariantBar" hidden></div>
|
||||
<div class="appui-tablet-wrap">
|
||||
<div class="appui-tablet" aria-label="Tablet preview">
|
||||
<div class="appui-tablet-bezel">
|
||||
<div class="appui-tablet-camera"></div>
|
||||
<div class="appui-tablet-screen" id="appuiTabletScreen"></div>
|
||||
<div class="appui-tablet-home"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<aside class="appui-keys-panel">
|
||||
<div class="appui-keys-head">
|
||||
<h2 class="appui-panel-title">Text keys</h2>
|
||||
<p class="appui-keys-meta" id="appuiKeysHint"></p>
|
||||
</div>
|
||||
<div class="appui-keys-list" id="appuiKeysList"></div>
|
||||
</aside>
|
||||
</section>
|
||||
</div>
|
||||
`;
|
||||
renderScreenNav();
|
||||
}
|
||||
|
||||
function renderScreenNav() {
|
||||
const nav = document.getElementById('appuiScreenNav');
|
||||
nav.innerHTML = APP_UI_SCREENS.map(s => {
|
||||
const variants = getVariants(s);
|
||||
const multi = variants.length > 1 && variants[0].id !== 'default';
|
||||
return `
|
||||
<button type="button" class="appui-screen-btn${s.id === selectedScreenId ? ' active' : ''}"
|
||||
data-screen="${esc(s.id)}">
|
||||
<span class="appui-screen-btn-label">${esc(s.label)}</span>
|
||||
${multi ? `<span class="appui-screen-btn-meta">${variants.length}</span>` : ''}
|
||||
</button>`;
|
||||
}).join('');
|
||||
|
||||
nav.querySelectorAll('.appui-screen-btn').forEach(btn => {
|
||||
btn.addEventListener('click', () => {
|
||||
selectedScreenId = btn.dataset.screen;
|
||||
localStorage.setItem(STORAGE_SCREEN, selectedScreenId);
|
||||
renderScreenNav();
|
||||
renderWorkspace();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function renderVariantBar(screen) {
|
||||
const bar = document.getElementById('appuiVariantBar');
|
||||
const variants = getVariants(screen);
|
||||
const multi = variants.length > 1 && variants[0].id !== 'default';
|
||||
if (!multi) {
|
||||
bar.hidden = true;
|
||||
bar.innerHTML = '';
|
||||
return;
|
||||
}
|
||||
|
||||
const activeId = currentVariantId(screen);
|
||||
bar.hidden = false;
|
||||
bar.innerHTML = `
|
||||
<div class="appui-variant-chips" role="tablist" aria-label="Screen states">
|
||||
${variants.map(v => `
|
||||
<button type="button" role="tab"
|
||||
class="appui-variant-chip${v.id === activeId ? ' active' : ''}"
|
||||
data-variant="${esc(v.id)}"
|
||||
aria-selected="${v.id === activeId}">
|
||||
${esc(v.label)}
|
||||
</button>`).join('')}
|
||||
</div>`;
|
||||
|
||||
bar.querySelectorAll('.appui-variant-chip').forEach(btn => {
|
||||
btn.addEventListener('click', () => {
|
||||
setVariant(screen.id, btn.dataset.variant);
|
||||
renderWorkspace();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async function loadAppStrings() {
|
||||
const data = await apiGet('translations.php?all=1');
|
||||
appStrings = (data.appStrings || []).map(normalizeEntry).filter(e => e.type === 'app_string');
|
||||
|
||||
germanByKey = {};
|
||||
appStrings.forEach(e => {
|
||||
const key = e.key || e.entityId;
|
||||
if (key) germanByKey[key] = germanFor(e);
|
||||
});
|
||||
|
||||
renderWorkspace();
|
||||
}
|
||||
|
||||
function textFor(key) {
|
||||
if (germanByKey[key] != null && germanByKey[key] !== '') return germanByKey[key];
|
||||
const entry = appStrings.find(e => (e.key || e.entityId) === key);
|
||||
if (entry) return germanFor(entry);
|
||||
return key;
|
||||
}
|
||||
|
||||
function renderWorkspace() {
|
||||
const screen = screenById(selectedScreenId);
|
||||
const variant = variantById(screen, currentVariantId(screen));
|
||||
const focusSet = new Set(variant.focusKeys || screen.keys);
|
||||
|
||||
renderVariantBar(screen);
|
||||
|
||||
const hint = document.getElementById('appuiKeysHint');
|
||||
if (hint) {
|
||||
const nFocus = [...focusSet].filter(k => screen.keys.includes(k)).length;
|
||||
hint.textContent = variant.id !== 'default'
|
||||
? `${variant.label} · ${nFocus} keys`
|
||||
: `${screen.keys.length} keys · German`;
|
||||
}
|
||||
|
||||
const tablet = document.getElementById('appuiTabletScreen');
|
||||
tablet.innerHTML = variant.mock();
|
||||
fillFields(tablet);
|
||||
bindFields(tablet);
|
||||
|
||||
renderKeysList(screen, focusSet);
|
||||
}
|
||||
|
||||
function fillFields(root) {
|
||||
root.querySelectorAll('[data-appui-key]').forEach(el => {
|
||||
const key = el.dataset.appuiKey;
|
||||
el.value = textFor(key);
|
||||
el.title = key;
|
||||
el.disabled = !canEdit();
|
||||
});
|
||||
}
|
||||
|
||||
function bindFields(root) {
|
||||
root.querySelectorAll('[data-appui-key]').forEach(el => {
|
||||
el.addEventListener('input', () => {
|
||||
const key = el.dataset.appuiKey;
|
||||
germanByKey[key] = el.value;
|
||||
syncKeyListInput(key, el.value);
|
||||
scheduleSave(key, el);
|
||||
});
|
||||
el.addEventListener('change', () => {
|
||||
const key = el.dataset.appuiKey;
|
||||
germanByKey[key] = el.value;
|
||||
scheduleSave(key, el, true);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function renderKeysList(screen, focusSet) {
|
||||
const list = document.getElementById('appuiKeysList');
|
||||
const editable = canEdit();
|
||||
const focused = screen.keys.filter(k => focusSet.has(k));
|
||||
const other = screen.keys.filter(k => !focusSet.has(k));
|
||||
|
||||
const row = (key, inFocus) => {
|
||||
const val = esc(textFor(key));
|
||||
return `
|
||||
<div class="appui-key-row${inFocus ? ' in-variant' : ' out-variant'}" data-key="${esc(key)}">
|
||||
<code class="appui-key-code">${esc(key)}</code>
|
||||
<textarea class="appui-key-input" data-appui-key="${esc(key)}" rows="2"
|
||||
${editable ? '' : 'disabled'}>${val}</textarea>
|
||||
</div>`;
|
||||
};
|
||||
|
||||
let html = '';
|
||||
if (focused.length && other.length) {
|
||||
html += `<div class="appui-keys-group-label">This state</div>`;
|
||||
}
|
||||
html += focused.map(k => row(k, true)).join('');
|
||||
if (other.length) {
|
||||
html += `<div class="appui-keys-group-label">Other keys on this screen</div>`;
|
||||
html += other.map(k => row(k, false)).join('');
|
||||
}
|
||||
list.innerHTML = html;
|
||||
|
||||
list.querySelectorAll('[data-appui-key]').forEach(el => {
|
||||
el.addEventListener('input', () => {
|
||||
const key = el.dataset.appuiKey;
|
||||
germanByKey[key] = el.value;
|
||||
syncTabletField(key, el.value);
|
||||
scheduleSave(key, el);
|
||||
});
|
||||
el.addEventListener('change', () => {
|
||||
const key = el.dataset.appuiKey;
|
||||
germanByKey[key] = el.value;
|
||||
scheduleSave(key, el, true);
|
||||
});
|
||||
el.addEventListener('focus', () => {
|
||||
list.querySelectorAll('.appui-key-row').forEach(r => r.classList.remove('focused'));
|
||||
el.closest('.appui-key-row')?.classList.add('focused');
|
||||
highlightTabletKey(el.dataset.appuiKey);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function syncKeyListInput(key, value) {
|
||||
const inp = document.querySelector(`#appuiKeysList [data-appui-key="${CSS.escape(key)}"]`);
|
||||
if (inp && inp.value !== value) inp.value = value;
|
||||
}
|
||||
|
||||
function syncTabletField(key, value) {
|
||||
document.querySelectorAll(`#appuiTabletScreen [data-appui-key="${CSS.escape(key)}"]`).forEach(el => {
|
||||
if (el.value !== value) el.value = value;
|
||||
});
|
||||
}
|
||||
|
||||
function highlightTabletKey(key) {
|
||||
document.querySelectorAll('#appuiTabletScreen [data-appui-key]').forEach(el => {
|
||||
el.classList.toggle('appui-field-highlight', el.dataset.appuiKey === key);
|
||||
});
|
||||
}
|
||||
|
||||
function setSaveStatus(state) {
|
||||
const el = document.getElementById('appuiSaveStatus');
|
||||
if (!el) return;
|
||||
if (state === 'saving') el.textContent = 'Saving…';
|
||||
else if (state === 'saved') el.textContent = 'Saved';
|
||||
else if (state === 'error') el.textContent = 'Save failed';
|
||||
else el.textContent = '';
|
||||
}
|
||||
|
||||
function scheduleSave(key, el, immediate = false) {
|
||||
if (!canEdit()) return;
|
||||
clearTimeout(saveTimers[key]);
|
||||
const run = () => saveGerman(key, el);
|
||||
if (immediate) run();
|
||||
else {
|
||||
saveTimers[key] = setTimeout(run, 450);
|
||||
setSaveStatus('saving');
|
||||
}
|
||||
}
|
||||
|
||||
async function saveGerman(key, el) {
|
||||
savesInFlight++;
|
||||
setSaveStatus('saving');
|
||||
try {
|
||||
await apiPut('translations.php', {
|
||||
type: 'app_string',
|
||||
id: key,
|
||||
languageCode: SOURCE_LANG,
|
||||
text: el.value,
|
||||
});
|
||||
germanByKey[key] = el.value;
|
||||
const entry = appStrings.find(e => (e.key || e.entityId) === key);
|
||||
if (entry) {
|
||||
entry.germanText = el.value;
|
||||
entry.translations = { ...(entry.translations || {}), [SOURCE_LANG]: el.value };
|
||||
}
|
||||
el.classList.add('save-flash');
|
||||
setTimeout(() => el.classList.remove('save-flash'), 400);
|
||||
} catch (e) {
|
||||
setSaveStatus('error');
|
||||
showToast(e.message, 'error');
|
||||
} finally {
|
||||
savesInFlight = Math.max(0, savesInFlight - 1);
|
||||
if (savesInFlight === 0) setSaveStatus('saved');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user