Files
grimmory/frontend/src/app/features/settings/reader-preferences/cbx-reader-preferences/cbx-reader-preferences-component.html
T
brios 1db1b8404a feat(cbx-viewer): add (back) infinite and long-strip modes, fixed. (#390)
* feat(cbx-viewer): add (back) infinite and long-strip modes, fixed.

* feat(reader): improve strip width controls and improve continuation affordance

* fix(cbx-reader): clear debounce timer on layout generation changes
2026-04-22 17:27:07 -04:00

150 lines
5.1 KiB
HTML

<ng-container *transloco="let t; prefix: 'settingsReader.cbx'">
<div class="cbx-preferences-container">
<div class="setting-item">
<div class="setting-info">
<div class="setting-label-row">
<span class="setting-label">{{ t('pageSpread') }}</span>
<div class="button-group">
@for (spread of cbxSpreads; track spread) {
<button
type="button"
class="option-button"
[class.selected]="selectedCbxSpread === spread.key"
(click)="selectedCbxSpread = spread.key">
<i [class]="spread.icon"></i>
<span class="option-text">{{ t(spread.translationKey) }}</span>
</button>
}
</div>
</div>
<p class="setting-description">
{{ t('pageSpreadDesc') }}
</p>
</div>
</div>
<div class="setting-item">
<div class="setting-info">
<div class="setting-label-row">
<span class="setting-label">{{ t('pageLayout') }}</span>
<div class="button-group">
@for (mode of cbxViewModes; track mode) {
<button
type="button"
class="option-button"
[class.selected]="selectedCbxViewMode === mode.key"
(click)="selectedCbxViewMode = mode.key">
<i [class]="mode.icon"></i>
<span class="option-text">{{ t(mode.translationKey) }}</span>
</button>
}
</div>
</div>
<p class="setting-description">
{{ t('pageLayoutDesc') }}
</p>
</div>
</div>
<div class="setting-item">
<div class="setting-info">
<div class="setting-label-row">
<span class="setting-label">{{ t('fitMode') }}</span>
<div class="button-group">
@for (mode of cbxFitModes; track mode) {
<button
type="button"
class="option-button"
[class.selected]="selectedCbxFitMode === mode.key"
(click)="selectedCbxFitMode = mode.key"
[pTooltip]="t(mode.translationKey)"
tooltipPosition="bottom">
<i [class]="mode.icon"></i>
<span class="option-text">{{ t(mode.translationKey) }}</span>
</button>
}
</div>
</div>
<p class="setting-description">
{{ t('fitModeDesc') }}
</p>
</div>
</div>
<div class="setting-item">
<div class="setting-info">
<div class="setting-label-row">
<span class="setting-label">{{ t('scrollMode') }}</span>
<div class="button-group">
@for (mode of cbxScrollModes; track mode) {
<button
type="button"
class="option-button"
[class.selected]="selectedCbxScrollMode === mode.key"
(click)="selectedCbxScrollMode = mode.key">
<i [class]="mode.icon"></i>
<span class="option-text">{{ t(mode.translationKey) }}</span>
</button>
}
</div>
</div>
<p class="setting-description">
{{ t('scrollModeDesc') }}
</p>
</div>
</div>
<div class="setting-item">
<div class="setting-info">
<div class="setting-label-row strip-width-row">
<label class="setting-label" for="cbx-strip-max-width">{{ t('stripMaxWidth') }}</label>
<div class="strip-width-control">
<input
id="cbx-strip-max-width"
type="range"
min="50"
max="100"
step="5"
[value]="selectedCbxStripMaxWidthPercent"
(input)="onStripMaxWidthInput($event)"
[attr.aria-valuetext]="selectedCbxStripMaxWidthPercent + '%'"
/>
<span class="strip-width-value">{{ selectedCbxStripMaxWidthPercent }}%</span>
</div>
</div>
<p class="setting-description">
{{ t('stripMaxWidthDesc') }}
</p>
</div>
</div>
<div class="setting-item">
<div class="setting-info">
<div class="setting-label-row">
<span class="setting-label">{{ t('backgroundColor') }}</span>
<div class="theme-selector">
@for (color of cbxBackgroundColors; track color) {
<button
type="button"
class="theme-option"
[class.selected]="selectedCbxBackgroundColor === color.key"
[style.background-color]="color.color"
(click)="selectedCbxBackgroundColor = color.key"
[attr.aria-label]="t(color.translationKey)"
[pTooltip]="t(color.translationKey)"
tooltipPosition="bottom">
@if (selectedCbxBackgroundColor === color.key) {
<i class="pi pi-check"></i>
}
</button>
}
</div>
</div>
<p class="setting-description">
{{ t('backgroundColorDesc') }}
</p>
</div>
</div>
</div>
</ng-container>