refactor: replace crypto.randomUUID with ulid where security is not needed

This commit is contained in:
yiling
2026-06-12 12:55:52 +08:00
parent eed812247d
commit 19716a16c1
7 changed files with 15 additions and 8 deletions
+2 -1
View File
@@ -4,6 +4,7 @@ import {
type FieldInfo as MetadataFieldInfo,
type SelectOption,
} from '@shumai/dtos'
import { ulid } from 'ulid'
import { client } from '@/ui/api/client'
import { useFieldStore } from '@/ui/stores/fields'
import { DragDropProvider, KeyboardSensor, PointerSensor, type DragEndEvent } from '@dnd-kit/react'
@@ -328,7 +329,7 @@ export function FieldsManager({ projectId, onManageFields, onSave }: FieldsManag
className="h-8 px-2"
onClick={() => {
const newOption: SelectOption = {
id: crypto.randomUUID(),
id: ulid(),
displayName: 'New Option',
color: '#808080',
}