mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
added dummy react files for replacing vue-components
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
1 parent
1f26f0b3a7
commit
434f26f17f
17 files changed
+69
-28
No files matched your search
@@ -18,7 +18,6 @@ export interface BaseStoreParams<T = any> {
|
||||
export class BaseStore<T = any> extends Singleton {
|
||||
protected storeConfig: Config<T>;
|
||||
protected syncDisposers: Function[] = [];
|
||||
public whenLoaded = when(() => this.isLoaded);
|
||||
|
||||
@observable isLoaded = false;
|
||||
@observable protected data: T;
|
||||
@@ -26,7 +25,7 @@ export class BaseStore<T = any> extends Singleton {
|
||||
protected constructor(protected params: BaseStoreParams) {
|
||||
super();
|
||||
this.params = {
|
||||
autoLoad: !app, // disabled in main process due delayed configuration
|
||||
autoLoad: false,
|
||||
syncEnabled: true,
|
||||
...params,
|
||||
}
|
||||
@@ -50,7 +49,7 @@ export class BaseStore<T = any> extends Singleton {
|
||||
await this.load();
|
||||
}
|
||||
if (this.params.syncEnabled) {
|
||||
await this.whenLoaded;
|
||||
await when(() => this.isLoaded);
|
||||
this.enableSync();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user