feat: add a new entry to the question bubble (#2334)

This commit is contained in:
Annie 2023-04-24 09:53:00 +08:00 committed by GitHub
parent 2af2621b49
commit 71bff8f864
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View File

@ -74,6 +74,7 @@
"shortcuts": "Shortcuts",
"whatsNew": "What's new?",
"help": "Help & Support",
"markdown": "Markdown",
"debug": {
"name": "Debug Info",
"success": "Copied debug info to clipboard!",

View File

@ -73,6 +73,11 @@ class BubbleActionList extends StatelessWidget {
"https://appflowy.gitbook.io/docs/essential-documentation/shortcuts",
);
break;
case BubbleAction.markdown:
_launchURL(
"https://appflowy.gitbook.io/docs/essential-documentation/markdown",
);
break;
}
}
@ -169,7 +174,7 @@ class FlowyVersionDescription extends CustomActionCell {
}
}
enum BubbleAction { whatsNews, help, debug, shortcuts }
enum BubbleAction { whatsNews, help, debug, shortcuts, markdown }
class BubbleActionWrapper extends ActionCell {
final BubbleAction inner;
@ -193,19 +198,23 @@ extension QuestionBubbleExtension on BubbleAction {
return LocaleKeys.questionBubble_debug_name.tr();
case BubbleAction.shortcuts:
return LocaleKeys.questionBubble_shortcuts.tr();
case BubbleAction.markdown:
return LocaleKeys.questionBubble_markdown.tr();
}
}
String get emoji {
switch (this) {
case BubbleAction.whatsNews:
return '⭐️';
return '🆕';
case BubbleAction.help:
return '👥';
case BubbleAction.debug:
return '🐛';
case BubbleAction.shortcuts:
return '📋';
case BubbleAction.markdown:
return '';
}
}
}