refactor: update storage management to use centralized storage configuration and improve README documentation

This commit is contained in:
zimplexing
2025-07-16 16:36:46 +08:00
parent 57bc0b3582
commit daba164998
5 changed files with 47 additions and 58 deletions

20
services/storageConfig.ts Normal file
View File

@@ -0,0 +1,20 @@
// Define a simple storage configuration service
export interface StorageConfig {
storageType: string | undefined;
getStorageType: () => string | undefined;
setStorageType: (type: string | undefined) => void;
}
// Create a singleton instance
export const storageConfig: StorageConfig = {
// Default to undefined (will fallback to local storage)
storageType: undefined,
getStorageType() {
return this.storageType;
},
setStorageType(type: string | undefined) {
this.storageType = type;
},
};