diff --git a/src/common/table-size-config.ts b/src/common/table-size-config.ts new file mode 100644 index 0000000000..922c03e872 --- /dev/null +++ b/src/common/table-size-config.ts @@ -0,0 +1,10 @@ +import { ClusterId } from "./cluster-store"; + +export type TableId = string; +export type TableSizeRecord = Record; + +/** + * Stores a configuration of table column sizes, set by the user, + * for each table by `TableId`, for each cluster by `ClusterId` + */ +export type TableSizeConfig = Record; diff --git a/src/common/user-store.ts b/src/common/user-store.ts index 97ba08f3cc..479e7e3fdf 100644 --- a/src/common/user-store.ts +++ b/src/common/user-store.ts @@ -9,6 +9,7 @@ import { getAppVersion } from "./utils/app-version"; import { kubeConfigDefaultPath, loadConfig } from "./kube-helpers"; import { appEventBus } from "./event-bus"; import logger from "../main/logger"; +import { TableSizeConfig } from "./table-size-config"; import path from "path"; export interface UserStoreModel { @@ -29,7 +30,8 @@ export interface UserPreferences { downloadBinariesPath?: string; kubectlBinariesPath?: string; openAtLogin?: boolean; - hiddenTableColumns?: Record; + tableSizeConfig?: TableSizeConfig; + hiddenTableColumns?: Record } export class UserStore extends BaseStore { @@ -57,6 +59,7 @@ export class UserStore extends BaseStore { downloadKubectlBinaries: true, // Download kubectl binaries matching cluster version openAtLogin: false, hiddenTableColumns: {}, + tableSizeConfig: {}, }; protected async handleOnLoad() {