mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2025-10-15 03:58:14 +00:00
feat(config): add setupComplete
This commit is contained in:
@@ -12,6 +12,7 @@ class ConfigManager {
|
||||
configVersion = 1;
|
||||
currentConfig: Config = {
|
||||
version: this.configVersion,
|
||||
setupComplete: false,
|
||||
general: {},
|
||||
modelProviders: [],
|
||||
};
|
||||
@@ -193,6 +194,18 @@ class ConfigManager {
|
||||
|
||||
this.saveConfig();
|
||||
}
|
||||
|
||||
public isSetupComplete() {
|
||||
return this.currentConfig.setupComplete
|
||||
}
|
||||
|
||||
public markSetupComplete() {
|
||||
if (!this.currentConfig.setupComplete) {
|
||||
this.currentConfig.setupComplete = true
|
||||
}
|
||||
|
||||
this.saveConfig()
|
||||
}
|
||||
}
|
||||
|
||||
const configManager = new ConfigManager();
|
||||
|
@@ -50,6 +50,7 @@ type ConfigModelProvider = {
|
||||
|
||||
type Config = {
|
||||
version: number;
|
||||
setupComplete: boolean;
|
||||
general: {
|
||||
[key: string]: any;
|
||||
};
|
||||
|
Reference in New Issue
Block a user