feat: Add speaker configuration management and UI enhancements

- Introduced a new speaker configuration page with the ability to create, edit, and delete speaker presets.
- Added a step indicator to guide users through the audiobook workflow.
- Enhanced the audiobook creation process by allowing users to select speaker presets and configure individual speaker settings.
- Implemented dynamic UI elements for managing speaker rows, including adding and removing speakers.
- Updated existing templates to integrate speaker configuration features and improve user experience.
- Added JavaScript functionality for managing speaker rows and ensuring proper form handling.
- Created a new module for handling speaker configuration data storage and retrieval.
This commit is contained in:
JB
2025-10-08 11:19:52 -07:00
parent 1bae37477b
commit d01887f31b
12 changed files with 1850 additions and 173 deletions
+311 -7
View File
@@ -125,6 +125,65 @@ body {
z-index: -1;
}
.step-indicator {
display: flex;
flex-wrap: wrap;
gap: 0.75rem;
margin-bottom: 1.5rem;
align-items: center;
}
.step-indicator__item {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.4rem 0.85rem;
border-radius: 999px;
background: rgba(148, 163, 184, 0.12);
color: var(--muted);
font-size: 0.85rem;
border: 1px solid rgba(148, 163, 184, 0.18);
}
.step-indicator__index {
width: 1.75rem;
height: 1.75rem;
border-radius: 50%;
display: inline-flex;
align-items: center;
justify-content: center;
font-weight: 600;
border: 1px solid rgba(148, 163, 184, 0.35);
background: rgba(15, 23, 42, 0.65);
}
.step-indicator__label {
font-weight: 500;
letter-spacing: 0.02em;
}
.step-indicator__item.is-active {
background: rgba(56, 189, 248, 0.18);
color: #fff;
border-color: rgba(56, 189, 248, 0.35);
}
.step-indicator__item.is-active .step-indicator__index {
background: linear-gradient(135deg, var(--accent), var(--accent-strong));
border-color: transparent;
color: #fff;
}
.step-indicator__item.is-complete {
background: rgba(56, 189, 248, 0.12);
color: var(--accent);
border-color: rgba(56, 189, 248, 0.25);
}
.step-indicator__item.is-complete .step-indicator__index {
border-color: rgba(56, 189, 248, 0.35);
}
.card__title {
font-size: 1.4rem;
font-weight: 600;
@@ -157,6 +216,10 @@ body {
justify-self: stretch;
}
.form-grid > .grid:last-child {
width: min(100%, 540px);
}
.button {
appearance: none;
border: none;
@@ -223,6 +286,7 @@ body {
.field select,
.field textarea {
width: 100%;
box-sizing: border-box;
border-radius: 14px;
border: 1px solid rgba(148, 163, 184, 0.2);
background: rgba(15, 23, 42, 0.45);
@@ -310,6 +374,16 @@ body {
color: var(--danger);
}
.badge--info {
background: rgba(56, 189, 248, 0.18);
color: var(--accent);
}
.badge--muted {
background: rgba(148, 163, 184, 0.15);
color: var(--muted);
}
.log-list {
list-style: none;
margin: 0;
@@ -529,7 +603,9 @@ body {
}
.field--file input[type="file"] {
width: 100%;
width: min(100%, 420px);
max-width: 420px;
align-self: flex-start;
border-radius: 14px;
border: 1px dashed rgba(148, 163, 184, 0.35);
background: rgba(15, 23, 42, 0.45);
@@ -711,6 +787,53 @@ body {
gap: 1rem;
}
.prepare-speaker-config {
margin-top: 2rem;
border-top: 1px solid var(--panel-border);
padding-top: 1.5rem;
display: grid;
gap: 1rem;
}
.prepare-speaker-config__header {
display: flex;
flex-direction: column;
gap: 0.35rem;
}
.prepare-speaker-config__grid {
display: grid;
gap: 1.25rem;
grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
align-items: center;
}
.prepare-speaker-config__actions {
display: flex;
flex-wrap: wrap;
gap: 0.75rem;
align-items: center;
justify-content: flex-end;
}
.prepare-speaker-config__actions .button {
white-space: nowrap;
}
.prepare-speaker-config__field .hint {
margin-top: 0.2rem;
}
@media (max-width: 900px) {
.prepare-speaker-config__grid {
grid-template-columns: minmax(0, 1fr);
align-items: stretch;
}
.prepare-speaker-config__actions {
justify-content: flex-start;
}
}
.speaker-list {
list-style: none;
margin: 0;
@@ -802,6 +925,60 @@ body {
box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}
.speaker-list__field select {
border-radius: 12px;
border: 1px solid var(--panel-border);
background: rgba(15, 23, 42, 0.6);
padding: 0.55rem 0.75rem;
color: var(--text);
}
.speaker-list__field select[multiple] {
min-height: 6rem;
}
.speaker-list__meta {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
font-size: 0.8rem;
margin-bottom: 0.3rem;
}
.speaker-list__controls {
display: grid;
gap: 1rem;
}
.speaker-list__inline {
display: flex;
align-items: center;
}
.speaker-list__recommendations {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
align-items: center;
margin-top: 0.25rem;
}
.chip {
border: 1px solid rgba(56, 189, 248, 0.35);
background: rgba(56, 189, 248, 0.12);
color: var(--accent);
border-radius: 999px;
padding: 0.3rem 0.7rem;
font-size: 0.8rem;
cursor: pointer;
transition: transform 0.15s ease, border-color 0.15s ease;
}
.chip:hover {
border-color: var(--accent);
transform: translateY(-1px);
}
.speaker-list__stats {
margin: 0;
color: var(--muted);
@@ -871,19 +1048,143 @@ body {
accent-color: var(--accent);
}
.chapter-card__metrics {
color: var(--muted);
font-size: 0.85rem;
.speaker-configs__layout {
display: grid;
gap: 2rem;
grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
align-items: start;
}
.chapter-card__body {
.speaker-configs__sidebar {
display: grid;
gap: 1rem;
}
.chapter-card__field {
.speaker-configs__sidebar-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
}
.speaker-configs__list {
list-style: none;
margin: 0;
padding: 0;
display: grid;
gap: 0.45rem;
gap: 0.75rem;
}
.speaker-configs__entry {
border: 1px solid var(--panel-border);
border-radius: 18px;
padding: 0.9rem 1rem;
background: rgba(15, 23, 42, 0.35);
display: grid;
gap: 0.35rem;
}
.speaker-configs__entry.is-active {
border-color: rgba(56, 189, 248, 0.45);
background: rgba(56, 189, 248, 0.12);
}
.speaker-configs__entry a {
color: #fff;
font-weight: 600;
text-decoration: none;
}
.speaker-configs__entry a:hover {
color: var(--accent);
}
.speaker-configs__meta {
color: var(--muted);
font-size: 0.85rem;
}
.speaker-configs__delete {
margin: 0;
justify-self: flex-start;
}
.speaker-configs__empty {
padding: 0.75rem 0;
color: var(--muted);
font-style: italic;
}
.speaker-config-form__grid {
display: grid;
gap: 1rem;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.speaker-config-form .field--full {
grid-column: 1 / -1;
}
.speaker-config-rows {
margin-top: 2rem;
display: grid;
gap: 1rem;
}
.speaker-config-rows__header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
}
.speaker-config-rows__list {
display: grid;
gap: 1rem;
}
.speaker-config-rows__empty {
border: 1px dashed rgba(148, 163, 184, 0.35);
border-radius: 16px;
padding: 1rem;
color: var(--muted);
font-style: italic;
}
.speaker-config-row {
border: 1px solid rgba(148, 163, 184, 0.2);
border-radius: 18px;
background: rgba(15, 23, 42, 0.4);
padding: 1rem 1.25rem;
display: grid;
gap: 1rem;
}
.speaker-config-row__grid {
display: grid;
gap: 1rem;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.speaker-config-row__footer {
display: flex;
justify-content: space-between;
align-items: center;
gap: 1rem;
flex-wrap: wrap;
}
.speaker-configs__actions {
margin-top: 2rem;
display: flex;
flex-wrap: wrap;
gap: 1rem;
align-items: center;
}
.button--small {
padding: 0.5rem 0.85rem;
font-size: 0.85rem;
}
.chapter-card__field label {
@@ -1603,6 +1904,9 @@ progress.progress::-moz-progress-bar {
border: 1px solid rgba(148, 163, 184, 0.25);
background: rgba(11, 18, 34, 0.85);
min-height: 140px;
width: min(100%, 420px);
max-width: 420px;
align-self: flex-start;
}
.voice-status {