diff --git a/lib/l10n/app_de.arb b/lib/l10n/app_de.arb index 9dc0e1b..8964749 100644 --- a/lib/l10n/app_de.arb +++ b/lib/l10n/app_de.arb @@ -15,6 +15,11 @@ "notAValidImage": "Kein gültiges Bild", "imageOnlyConversation": "Nur Bild Unterhaltung", "messageInputPlaceholder": "Nachricht", + "tooltipAttachment": "Anhang hinzufügen", + "tooltipSend": "Senden", + "tooltipSave": "Speichern", + "tooltipLetAIThink": "Lass KI denken", + "tooltipAddHostHeaders": "Host-Header festlegen", "noModelSelected": "Kein Modell ausgewählt", "noHostSelected": "Kein Host ausgewählt, öffne zum Auswählen die Einstellungen", "noSelectedModel": "", diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index 561393c..1ec6bd4 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -75,6 +75,31 @@ "description": "Placeholder text for message input", "context": "Visible in the chat view" }, + "tooltipAttachment": "Add attachment", + "@tooltipAttachment": { + "description": "Tooltip for attachment button", + "context": "Visible in the chat view" + }, + "tooltipSend": "Send", + "@tooltipSend": { + "description": "Tooltip for send button", + "context": "Visible in the chat view" + }, + "tooltipSave": "Save", + "@tooltipSave": { + "description": "Tooltip for save button", + "context": "Visible in the chat view" + }, + "tooltipLetAIThink": "Let AI think", + "@tooltipLetAIThink": { + "description": "Tooltip for let AI think button", + "context": "Visible in the chat view" + }, + "tooltipAddHostHeaders": "Add host headers", + "@tooltipAddHostHeaders": { + "description": "Tooltip for add host headers button", + "context": "Visible in settings view" + }, "noModelSelected": "No model selected", "@noModelSelected": { "description": "Text displayed when no model is selected", diff --git a/lib/l10n/app_zh.arb b/lib/l10n/app_zh.arb index 542e2d8..1f57611 100644 --- a/lib/l10n/app_zh.arb +++ b/lib/l10n/app_zh.arb @@ -15,6 +15,11 @@ "notAValidImage": "不是有效的图像", "imageOnlyConversation": "仅图片对话", "messageInputPlaceholder": "消息", + "tooltipAttachment": "Add attachment", + "tooltipSend": "Send", + "tooltipSave": "Save", + "tooltipLetAIThink": "Let AI think", + "tooltipAddHostHeaders": "Add host headers", "noModelSelected": "未选择模型", "noHostSelected": "没有填写主机地址,请打开设置以进行设置", "noSelectedModel": "<模型选择>", diff --git a/lib/main.dart b/lib/main.dart index 6655918..3f57d17 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1022,8 +1022,7 @@ class _MainAppState extends State { child: AnimatedOpacity( opacity: logoVisible ? 1.0 : 0.0, duration: const Duration(milliseconds: 500), - child: const ImageIcon( - AssetImage("assets/logo512.png"), + child: const ImageIcon(AssetImage("assets/logo512.png"), size: 44)))), onSendPressed: (p0) { send(p0.text, context, setState); @@ -1299,7 +1298,11 @@ class _MainAppState extends State { }, l10n: ChatL10nEn( inputPlaceholder: AppLocalizations.of(context)! - .messageInputPlaceholder), + .messageInputPlaceholder, + attachmentButtonAccessibilityLabel: + AppLocalizations.of(context)!.tooltipAttachment, + sendButtonAccessibilityLabel: + AppLocalizations.of(context)!.tooltipSend), inputOptions: InputOptions( keyboardType: TextInputType.multiline, onTextChanged: (p0) { @@ -1355,18 +1358,8 @@ class _MainAppState extends State { inputBorderRadius: const BorderRadius.all(Radius.circular(64)), inputPadding: const EdgeInsets.all(16), - inputMargin: EdgeInsets.only( - left: 8, - right: 8, - bottom: (MediaQuery.of(context) - .viewInsets - .bottom == - 0.0 && - !desktopFeature()) - ? 0 - : 8), - messageMaxWidth: (MediaQuery.of(context).size.width >= - 1000) + inputMargin: EdgeInsets.only(left: 8, right: 8, bottom: (MediaQuery.of(context).viewInsets.bottom == 0.0 && !desktopFeature()) ? 0 : 8), + messageMaxWidth: (MediaQuery.of(context).size.width >= 1000) ? (MediaQuery.of(context).size.width >= 1600) ? (MediaQuery.of(context).size.width >= 2200) ? 1900 diff --git a/lib/screen_settings.dart b/lib/screen_settings.dart index a4b8f23..1b53fad 100644 --- a/lib/screen_settings.dart +++ b/lib/screen_settings.dart @@ -280,6 +280,8 @@ class _ScreenSettingsState extends State { .settingsHost, hintText: "http://localhost:11434", prefixIcon: IconButton( + tooltip: AppLocalizations.of(context)! + .tooltipAddHostHeaders, onPressed: () async { selectionHaptic(); String tmp = await prompt(context, @@ -318,6 +320,9 @@ class _ScreenSettingsState extends State { child: const CircularProgressIndicator()) : IconButton( + tooltip: + AppLocalizations.of(context)! + .tooltipSave, onPressed: () { selectionHaptic(); checkHost(); diff --git a/lib/settings/behavior.dart b/lib/settings/behavior.dart index 7293d88..774b578 100644 --- a/lib/settings/behavior.dart +++ b/lib/settings/behavior.dart @@ -32,13 +32,11 @@ class _ScreenSettingsBehaviorState extends State { color: Theme.of(context).colorScheme.surface, child: Scaffold( appBar: AppBar( - title: Row(children: [ - Text(AppLocalizations.of(context)!.settingsTitleBehavior), - Expanded(child: SizedBox(height: 200, child: MoveWindow())) - ]), - actions: - desktopControlsActions(context) - ), + title: Row(children: [ + Text(AppLocalizations.of(context)!.settingsTitleBehavior), + Expanded(child: SizedBox(height: 200, child: MoveWindow())) + ]), + actions: desktopControlsActions(context)), body: Padding( padding: const EdgeInsets.only(left: 16, right: 16), child: Column(children: [ @@ -54,6 +52,8 @@ class _ScreenSettingsBehaviorState extends State { .settingsSystemMessage, hintText: "You are a helpful assistant", suffixIcon: IconButton( + tooltip: + AppLocalizations.of(context)!.tooltipSave, onPressed: () { selectionHaptic(); prefs?.setString( diff --git a/lib/worker/setter.dart b/lib/worker/setter.dart index 7a91b9b..4c34427 100644 --- a/lib/worker/setter.dart +++ b/lib/worker/setter.dart @@ -404,6 +404,8 @@ Future prompt(BuildContext context, hintText: placeholder, errorText: error, suffixIcon: IconButton( + tooltip: AppLocalizations.of(context)! + .tooltipSave, onPressed: () async { if (validator != null) { setLocalState(() { @@ -428,6 +430,8 @@ Future prompt(BuildContext context, .dialogEnterNewTitle && uuid != null) ? IconButton( + tooltip: AppLocalizations.of(context)! + .tooltipLetAIThink, onPressed: () async { setLocalState(() { loading = true;