@@ -3,11 +3,13 @@ import { CommonModule } from '@angular/common';
33import { FormsModule } from '@angular/forms' ;
44import { ConfigStoreService } from '../../../services/config-store.service' ;
55import { KittyOSSpecificConfig } from '../../../models/kitty-types' ;
6+ import { VersionBadgeComponent } from '../../shared/version-badge/version-badge.component' ;
7+ import { SliderInputComponent } from '../../shared/slider-input/slider-input.component' ;
68import { NumberInputComponent } from '../../shared/number-input/number-input.component' ;
79
810@Component ( {
911 selector : 'app-os-specific-form' ,
10- imports : [ CommonModule , FormsModule , NumberInputComponent ] ,
12+ imports : [ CommonModule , FormsModule , VersionBadgeComponent , SliderInputComponent , NumberInputComponent ] ,
1113 template : `
1214 <div class="space-y-6">
1315 <div>
@@ -130,15 +132,10 @@ import { NumberInputComponent } from '../../shared/number-input/number-input.com
130132 <span class="text-kitty-accent font-bold ml-2">{{ osSpecific.macos_thicken_font }}</span>
131133 <span class="text-kitty-text-dim text-xs ml-1">Draw extra pixel around glyphs (0 = off)</span>
132134 </label>
133- <input
134- type="range"
135- [(ngModel)]="osSpecific.macos_thicken_font"
136- (ngModelChange)="updateOsSpecific()"
137- min="0"
138- max="2"
139- step="0.05"
140- class="w-full"
141- />
135+ <app-slider-input
136+ [value]="osSpecific.macos_thicken_font"
137+ (valueChange)="updateNumberOs('macos_thicken_font', $event)"
138+ [min]="0" [max]="2" [step]="0.05" />
142139 </div>
143140
144141 <div class="form-group">
@@ -296,4 +293,9 @@ export class OsSpecificFormComponent {
296293 updateOsSpecific ( ) : void {
297294 this . configStore . updateSection ( 'os_specific' , { ...this . osSpecific } ) ;
298295 }
296+
297+ updateNumberOs ( key : keyof KittyOSSpecificConfig , value : number ) : void {
298+ this . osSpecific = { ...this . osSpecific , [ key ] : value } ;
299+ this . updateOsSpecific ( ) ;
300+ }
299301}
0 commit comments