feat(uuid): implement UUID generation for non-secure contexts and replace crypto.randomUUID() usage
This commit is contained in:
@@ -14,6 +14,7 @@ import { ThemeService } from '../../services/theme/theme.service';
|
||||
import { DocumentsService } from '../../services/documents/documents.service';
|
||||
import { AuthService } from '../../services/auth/auth.service';
|
||||
import { HttpService } from '../../services/http-request/http.service';
|
||||
import { uuid } from '../../shared/utils/uuid';
|
||||
import {
|
||||
AiModelConfigCardComponent,
|
||||
AiModelConfig,
|
||||
@@ -434,7 +435,7 @@ export class SettingsPage implements OnInit, OnDestroy {
|
||||
progress: 0,
|
||||
status: 'uploading',
|
||||
error: null,
|
||||
idempotencyKey: crypto.randomUUID(),
|
||||
idempotencyKey: uuid(),
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -931,7 +932,7 @@ export class SettingsPage implements OnInit, OnDestroy {
|
||||
checked: [],
|
||||
note: '',
|
||||
excludedGroupIds: [],
|
||||
idempotencyKey: crypto.randomUUID(),
|
||||
idempotencyKey: uuid(),
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1023,7 +1024,7 @@ export class SettingsPage implements OnInit, OnDestroy {
|
||||
this.toastr.warning('هنوز شواهد بازبینی تکمیل نشدهاند.');
|
||||
return;
|
||||
}
|
||||
const key = this.retryKeys.get(doc.id) ?? crypto.randomUUID();
|
||||
const key = this.retryKeys.get(doc.id) ?? uuid();
|
||||
this.retryKeys.set(doc.id, key);
|
||||
this.documentsService.retryDocument(doc.id, key).subscribe({
|
||||
next: () => {
|
||||
@@ -1051,7 +1052,7 @@ export class SettingsPage implements OnInit, OnDestroy {
|
||||
checked: [],
|
||||
note: '',
|
||||
excludedGroupIds: [],
|
||||
idempotencyKey: crypto.randomUUID(),
|
||||
idempotencyKey: uuid(),
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -1169,7 +1170,7 @@ export class SettingsPage implements OnInit, OnDestroy {
|
||||
this.toastr.warning('سند در حال حاضر قابل تلاش مجدد نیست.');
|
||||
return;
|
||||
}
|
||||
const key = this.retryKeys.get(doc.id) ?? crypto.randomUUID();
|
||||
const key = this.retryKeys.get(doc.id) ?? uuid();
|
||||
this.retryKeys.set(doc.id, key);
|
||||
this.documentsService.retryDocument(doc.id, key).subscribe({
|
||||
next: (res: RetryResult) => {
|
||||
|
||||
Reference in New Issue
Block a user