Fixed title generation, added info message for imported chats
This commit is contained in:
parent
e8820162b0
commit
e7a1d93196
|
@ -544,6 +544,11 @@
|
||||||
"description": "Text displayed as description for export chats button",
|
"description": "Text displayed as description for export chats button",
|
||||||
"context": "Visible in the settings view"
|
"context": "Visible in the settings view"
|
||||||
},
|
},
|
||||||
|
"settingsExportChatsSuccess": "Chats exported successfully",
|
||||||
|
"@settingsExportChatsSuccess": {
|
||||||
|
"description": "Text displayed when chats are exported successfully",
|
||||||
|
"context": "Visible in the settings view"
|
||||||
|
},
|
||||||
"settingsImportChats": "Import chats",
|
"settingsImportChats": "Import chats",
|
||||||
"@settingsImportChats": {
|
"@settingsImportChats": {
|
||||||
"description": "Text displayed as description for import chats button",
|
"description": "Text displayed as description for import chats button",
|
||||||
|
|
|
@ -88,6 +88,12 @@ class _ScreenSettingsExportState extends State<ScreenSettingsExport> {
|
||||||
File(path).writeAsString(content);
|
File(path).writeAsString(content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// ignore: use_build_context_synchronously
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
|
||||||
|
// ignore: use_build_context_synchronously
|
||||||
|
content: Text(AppLocalizations.of(context)!
|
||||||
|
.settingsExportChatsSuccess),
|
||||||
|
showCloseIcon: true));
|
||||||
}),
|
}),
|
||||||
allowMultipleChats
|
allowMultipleChats
|
||||||
? button(
|
? button(
|
||||||
|
|
|
@ -216,12 +216,8 @@ void setModel(BuildContext context, Function setState) {
|
||||||
? ((MediaQuery.of(context)
|
? ((MediaQuery.of(context)
|
||||||
.platformBrightness ==
|
.platformBrightness ==
|
||||||
Brightness.light)
|
Brightness.light)
|
||||||
? themeLight()
|
? themeLight().colorScheme.secondary
|
||||||
.colorScheme
|
: themeDark().colorScheme.secondary)
|
||||||
.secondary
|
|
||||||
: themeDark()
|
|
||||||
.colorScheme
|
|
||||||
.secondary)
|
|
||||||
: null,
|
: null,
|
||||||
labelStyle: (usedIndex == index &&
|
labelStyle: (usedIndex == index &&
|
||||||
!(prefs?.getBool(
|
!(prefs?.getBool(
|
||||||
|
@ -245,12 +241,8 @@ void setModel(BuildContext context, Function setState) {
|
||||||
: (MediaQuery.of(context)
|
: (MediaQuery.of(context)
|
||||||
.platformBrightness ==
|
.platformBrightness ==
|
||||||
Brightness.light)
|
Brightness.light)
|
||||||
?themeLight()
|
? themeLight().colorScheme.primary
|
||||||
.colorScheme
|
: themeDark().colorScheme.primary,
|
||||||
.primary
|
|
||||||
: themeDark()
|
|
||||||
.colorScheme
|
|
||||||
.primary,
|
|
||||||
onSelected: (bool selected) {
|
onSelected: (bool selected) {
|
||||||
selectionHaptic();
|
selectionHaptic();
|
||||||
if (addIndex == index) {
|
if (addIndex == index) {
|
||||||
|
@ -539,7 +531,11 @@ Future<String> prompt(BuildContext context,
|
||||||
uuid) {
|
uuid) {
|
||||||
try {
|
try {
|
||||||
var title = await getTitleAi(
|
var title = await getTitleAi(
|
||||||
await getHistory());
|
jsonDecode(jsonDecode(
|
||||||
|
(prefs!.getStringList(
|
||||||
|
"chats") ??
|
||||||
|
[])[
|
||||||
|
i])["messages"]));
|
||||||
controller.text = title;
|
controller.text = title;
|
||||||
setLocalState(() {
|
setLocalState(() {
|
||||||
loading = false;
|
loading = false;
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
"settingsVoiceTtsNotSupported",
|
"settingsVoiceTtsNotSupported",
|
||||||
"settingsVoiceTtsNotSupportedDescription",
|
"settingsVoiceTtsNotSupportedDescription",
|
||||||
"settingsVoiceNotEnabled",
|
"settingsVoiceNotEnabled",
|
||||||
|
"settingsExportChatsSuccess",
|
||||||
"settingsLicenses"
|
"settingsLicenses"
|
||||||
],
|
],
|
||||||
|
|
||||||
|
@ -38,6 +39,7 @@
|
||||||
"settingsVoiceTtsNotSupported",
|
"settingsVoiceTtsNotSupported",
|
||||||
"settingsVoiceTtsNotSupportedDescription",
|
"settingsVoiceTtsNotSupportedDescription",
|
||||||
"settingsVoiceNotEnabled",
|
"settingsVoiceNotEnabled",
|
||||||
|
"settingsExportChatsSuccess",
|
||||||
"settingsLicenses"
|
"settingsLicenses"
|
||||||
],
|
],
|
||||||
|
|
||||||
|
@ -59,6 +61,7 @@
|
||||||
"settingsVoiceTtsNotSupported",
|
"settingsVoiceTtsNotSupported",
|
||||||
"settingsVoiceTtsNotSupportedDescription",
|
"settingsVoiceTtsNotSupportedDescription",
|
||||||
"settingsVoiceNotEnabled",
|
"settingsVoiceNotEnabled",
|
||||||
|
"settingsExportChatsSuccess",
|
||||||
"settingsLicenses"
|
"settingsLicenses"
|
||||||
],
|
],
|
||||||
|
|
||||||
|
@ -80,6 +83,7 @@
|
||||||
"settingsVoiceTtsNotSupported",
|
"settingsVoiceTtsNotSupported",
|
||||||
"settingsVoiceTtsNotSupportedDescription",
|
"settingsVoiceTtsNotSupportedDescription",
|
||||||
"settingsVoiceNotEnabled",
|
"settingsVoiceNotEnabled",
|
||||||
|
"settingsExportChatsSuccess",
|
||||||
"settingsLicenses"
|
"settingsLicenses"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue