Automatically sync all kubeConfigPaths (#3227)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-07-07 16:29:58 -04:00
1 parent fe443f462b
commit 497e47b277
9 files changed
+90 -39

No files matched your search

+1 -1
View File
@@ -20,4 +20,4 @@
*/
export * from "./user-store";
export type { KubeconfigSyncEntry, KubeconfigSyncValue } from "./preferences-helpers";
export type { KubeconfigSyncEntry, KubeconfigSyncValue, UserPreferencesModel } from "./preferences-helpers";
+3 -2
View File
@@ -31,6 +31,7 @@ import path from "path";
import { fileNameMigration } from "../../migrations/user-store";
import { ObservableToggleSet, toJS } from "../../renderer/utils";
import { DESCRIPTORS, KubeconfigSyncValue, UserPreferencesModel } from "./preferences-helpers";
import logger from "../../main/logger";
export interface UserStoreModel {
lastSeenAppVersion: string;
@@ -155,8 +156,8 @@ export class UserStore extends BaseStore<UserStoreModel> /* implements UserStore
}
@action
protected fromStore(data: Partial<UserStoreModel> = {}) {
const { lastSeenAppVersion, preferences } = data;
protected fromStore({ lastSeenAppVersion, preferences }: Partial<UserStoreModel> = {}) {
logger.debug("UserStore.fromStore()", { lastSeenAppVersion, preferences });
if (lastSeenAppVersion) {
this.lastSeenAppVersion = lastSeenAppVersion;