mirror of
https://github.com/zimplexing/OrionTV.git
synced 2026-02-04 03:36:29 +08:00
refactor: update storage management to use centralized storage configuration and improve README documentation
This commit is contained in:
20
services/storageConfig.ts
Normal file
20
services/storageConfig.ts
Normal 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;
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user