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