feat(providers): add timestamp-based sorting for provider list
- Add createdAt timestamp field to Provider interface - Implement sorting logic: old providers without timestamp first, then by creation time - Providers without timestamps are sorted alphabetically by name - New providers are automatically timestamped on creation
This commit is contained in:
@@ -134,6 +134,7 @@ function App() {
|
||||
const newProvider: Provider = {
|
||||
...provider,
|
||||
id: generateId(),
|
||||
createdAt: Date.now(), // 添加创建时间戳
|
||||
};
|
||||
await window.api.addProvider(newProvider, activeApp);
|
||||
await loadProviders();
|
||||
|
||||
Reference in New Issue
Block a user