mirror of
https://github.com/foss42/apidash.git
synced 2025-12-02 02:39:19 +08:00
Update settings_model.dart
This commit is contained in:
@@ -17,6 +17,7 @@ class SettingsModel {
|
|||||||
this.historyRetentionPeriod = HistoryRetentionPeriod.oneWeek,
|
this.historyRetentionPeriod = HistoryRetentionPeriod.oneWeek,
|
||||||
this.workspaceFolderPath,
|
this.workspaceFolderPath,
|
||||||
this.isSSLDisabled = false,
|
this.isSSLDisabled = false,
|
||||||
|
this.isDashBotEnabled = true,
|
||||||
});
|
});
|
||||||
|
|
||||||
final bool isDark;
|
final bool isDark;
|
||||||
@@ -31,6 +32,7 @@ class SettingsModel {
|
|||||||
final HistoryRetentionPeriod historyRetentionPeriod;
|
final HistoryRetentionPeriod historyRetentionPeriod;
|
||||||
final String? workspaceFolderPath;
|
final String? workspaceFolderPath;
|
||||||
final bool isSSLDisabled;
|
final bool isSSLDisabled;
|
||||||
|
final bool isDashBotEnabled;
|
||||||
|
|
||||||
SettingsModel copyWith({
|
SettingsModel copyWith({
|
||||||
bool? isDark,
|
bool? isDark,
|
||||||
@@ -45,6 +47,7 @@ class SettingsModel {
|
|||||||
HistoryRetentionPeriod? historyRetentionPeriod,
|
HistoryRetentionPeriod? historyRetentionPeriod,
|
||||||
String? workspaceFolderPath,
|
String? workspaceFolderPath,
|
||||||
bool? isSSLDisabled,
|
bool? isSSLDisabled,
|
||||||
|
bool? isDashBotEnabled,
|
||||||
}) {
|
}) {
|
||||||
return SettingsModel(
|
return SettingsModel(
|
||||||
isDark: isDark ?? this.isDark,
|
isDark: isDark ?? this.isDark,
|
||||||
@@ -61,6 +64,7 @@ class SettingsModel {
|
|||||||
historyRetentionPeriod ?? this.historyRetentionPeriod,
|
historyRetentionPeriod ?? this.historyRetentionPeriod,
|
||||||
workspaceFolderPath: workspaceFolderPath ?? this.workspaceFolderPath,
|
workspaceFolderPath: workspaceFolderPath ?? this.workspaceFolderPath,
|
||||||
isSSLDisabled: isSSLDisabled ?? this.isSSLDisabled,
|
isSSLDisabled: isSSLDisabled ?? this.isSSLDisabled,
|
||||||
|
isDashBotEnabled: isDashBotEnabled ?? this.isDashBotEnabled,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,6 +84,7 @@ class SettingsModel {
|
|||||||
historyRetentionPeriod: historyRetentionPeriod,
|
historyRetentionPeriod: historyRetentionPeriod,
|
||||||
workspaceFolderPath: workspaceFolderPath,
|
workspaceFolderPath: workspaceFolderPath,
|
||||||
isSSLDisabled: isSSLDisabled,
|
isSSLDisabled: isSSLDisabled,
|
||||||
|
isDashBotEnabled: isDashBotEnabled,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,6 +139,7 @@ class SettingsModel {
|
|||||||
}
|
}
|
||||||
final workspaceFolderPath = data["workspaceFolderPath"] as String?;
|
final workspaceFolderPath = data["workspaceFolderPath"] as String?;
|
||||||
final isSSLDisabled = data["isSSLDisabled"] as bool?;
|
final isSSLDisabled = data["isSSLDisabled"] as bool?;
|
||||||
|
final isDashBotEnabled = data["isDashBotEnabled"] as bool?;
|
||||||
|
|
||||||
const sm = SettingsModel();
|
const sm = SettingsModel();
|
||||||
|
|
||||||
@@ -151,6 +157,7 @@ class SettingsModel {
|
|||||||
historyRetentionPeriod ?? HistoryRetentionPeriod.oneWeek,
|
historyRetentionPeriod ?? HistoryRetentionPeriod.oneWeek,
|
||||||
workspaceFolderPath: workspaceFolderPath,
|
workspaceFolderPath: workspaceFolderPath,
|
||||||
isSSLDisabled: isSSLDisabled,
|
isSSLDisabled: isSSLDisabled,
|
||||||
|
isDashBotEnabled: isDashBotEnabled,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,6 +177,7 @@ class SettingsModel {
|
|||||||
"historyRetentionPeriod": historyRetentionPeriod.name,
|
"historyRetentionPeriod": historyRetentionPeriod.name,
|
||||||
"workspaceFolderPath": workspaceFolderPath,
|
"workspaceFolderPath": workspaceFolderPath,
|
||||||
"isSSLDisabled": isSSLDisabled,
|
"isSSLDisabled": isSSLDisabled,
|
||||||
|
"isDashBotEnabled": isDashBotEnabled,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -194,7 +202,8 @@ class SettingsModel {
|
|||||||
other.activeEnvironmentId == activeEnvironmentId &&
|
other.activeEnvironmentId == activeEnvironmentId &&
|
||||||
other.historyRetentionPeriod == historyRetentionPeriod &&
|
other.historyRetentionPeriod == historyRetentionPeriod &&
|
||||||
other.workspaceFolderPath == workspaceFolderPath &&
|
other.workspaceFolderPath == workspaceFolderPath &&
|
||||||
other.isSSLDisabled == isSSLDisabled;
|
other.isSSLDisabled == isSSLDisabled &&
|
||||||
|
other.isDashBotEnabled == isDashBotEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -213,6 +222,7 @@ class SettingsModel {
|
|||||||
historyRetentionPeriod,
|
historyRetentionPeriod,
|
||||||
workspaceFolderPath,
|
workspaceFolderPath,
|
||||||
isSSLDisabled,
|
isSSLDisabled,
|
||||||
|
isDashBotEnabled,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user