File tree Expand file tree Collapse file tree 3 files changed +29
-6
lines changed
frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/openai Expand file tree Collapse file tree 3 files changed +29
-6
lines changed Original file line number Diff line number Diff line change 1+ import 'package:url_launcher/url_launcher.dart' ;
2+
3+ Future <void > openLearnMorePage () async {
4+ final uri = Uri .parse (
5+ 'https://appflowy.gitbook.io/docs/essential-documentation/appflowy-x-openai' );
6+ if (await canLaunchUrl (uri)) {
7+ await launchUrl (uri);
8+ }
9+ }
Original file line number Diff line number Diff line change 11import 'dart:convert' ;
22
33import 'package:appflowy/plugins/document/presentation/plugins/openai/service/openai_client.dart' ;
4+ import 'package:appflowy/plugins/document/presentation/plugins/openai/util/learn_more_action.dart' ;
45import 'package:appflowy/plugins/document/presentation/plugins/openai/widgets/loading.dart' ;
56import 'package:appflowy/user/application/user_service.dart' ;
67import 'package:appflowy_editor/appflowy_editor.dart' ;
@@ -118,9 +119,15 @@ class _AutoCompletionInputState extends State<_AutoCompletionInput> {
118119 fontSize: 14 ,
119120 ),
120121 const Spacer (),
121- FlowyText .regular (
122- LocaleKeys .document_plugins_autoGeneratorLearnMore.tr (),
123- ),
122+ FlowyButton (
123+ useIntrinsicWidth: true ,
124+ text: FlowyText .regular (
125+ LocaleKeys .document_plugins_autoGeneratorLearnMore.tr (),
126+ ),
127+ onTap: () async {
128+ await openLearnMorePage ();
129+ },
130+ )
124131 ],
125132 );
126133 }
Original file line number Diff line number Diff line change 11import 'package:appflowy/plugins/document/presentation/plugins/openai/service/error.dart' ;
22import 'package:appflowy/plugins/document/presentation/plugins/openai/service/openai_client.dart' ;
33import 'package:appflowy/plugins/document/presentation/plugins/openai/service/text_edit.dart' ;
4+ import 'package:appflowy/plugins/document/presentation/plugins/openai/util/learn_more_action.dart' ;
45import 'package:appflowy/plugins/document/presentation/plugins/openai/widgets/smart_edit_action.dart' ;
56import 'package:appflowy/user/application/user_service.dart' ;
67import 'package:appflowy_editor/appflowy_editor.dart' ;
@@ -119,9 +120,15 @@ class _SmartEditInputState extends State<_SmartEditInput> {
119120 fontSize: 14 ,
120121 ),
121122 const Spacer (),
122- FlowyText .regular (
123- LocaleKeys .document_plugins_autoGeneratorLearnMore.tr (),
124- ),
123+ FlowyButton (
124+ useIntrinsicWidth: true ,
125+ text: FlowyText .regular (
126+ LocaleKeys .document_plugins_autoGeneratorLearnMore.tr (),
127+ ),
128+ onTap: () async {
129+ await openLearnMorePage ();
130+ },
131+ )
125132 ],
126133 );
127134 }
You can’t perform that action at this time.
0 commit comments