fix: resolve build errors and add missing electron IPC

- Replace deprecated reminderId with remindAt in templates
- Add fileSyncListFiles to electron preload
- Fix Typia type narrowing in validate-state.service
- Fix jasmine matcher type in hydrator spec
This commit is contained in:
Johannes Millan 2025-12-08 12:55:22 +01:00
parent d3061fc15b
commit 7ff7a8bbf2
7 changed files with 8 additions and 6 deletions

View file

@ -45,6 +45,8 @@ const ea: ElectronAPI = {
dataStr: string | undefined;
}>,
fileSyncRemove: (filePath) => _invoke('FILE_SYNC_REMOVE', filePath) as Promise<void>,
fileSyncListFiles: ({ dirPath }) =>
_invoke('FILE_SYNC_LIST_FILES', dirPath) as Promise<string[] | Error>,
checkDirExists: (dirPath) =>
_invoke('CHECK_DIR_EXISTS', dirPath) as Promise<true | Error>,

View file

@ -197,7 +197,7 @@ export class ValidateStateService {
const typiaResult = validateAllData(state);
if (!typiaResult.success) {
result.isValid = false;
result.typiaErrors = typiaResult.errors || [];
result.typiaErrors = (typiaResult as IValidation.IFailure).errors || [];
OpLog.warn('[ValidateStateService] Typia validation failed', {
errorCount: result.typiaErrors.length,
});

View file

@ -759,7 +759,7 @@ describe('OperationLogHydratorService', () => {
isEnabled: true, // Other sync settings preserved
}),
}),
}),
}) as any,
}),
);

View file

@ -44,7 +44,7 @@
[task]="task"
[tagsToHide]="panelCfg().includedTagIds || []"
>
@if (task.reminderId) {
@if (task.remindAt) {
<button
(click)="scheduleTask(task, $event)"
[title]="T.F.TASK.CMP.EDIT_SCHEDULED | translate"

View file

@ -12,7 +12,7 @@
<div class="day-of-month">{{ se().dayOfMonth }}</div>
}
@case ('SCHEDULED_TASK') {
@if (task()?.reminderId) {
@if (task()?.remindAt) {
<mat-icon
class="ico"
inline="true"

View file

@ -204,7 +204,7 @@
<mat-icon>attach_file</mat-icon>
</button>
}
@if (t.reminderId) {
@if (t.remindAt) {
<button
(click)="scheduleTask()"
[title]="T.F.TASK.CMP.EDIT_SCHEDULED | translate"

View file

@ -96,7 +96,7 @@
</div>
<div class="time-left">({{ task.dueWithTime | humanizeTimestamp }})</div>
</div>
@if (task.reminderId) {
@if (task.remindAt) {
<mat-icon>alarm</mat-icon>
} @else {
<mat-icon>schedule</mat-icon>