mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-19 08:36:17 +08:00
opt: copy log
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -71,7 +71,7 @@ class _LogsPageState extends State<LogsPage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void copyLogs() async {
|
void copyLogs() async {
|
||||||
await Utils.copyText(fileContent, needToast: false);
|
await Utils.copyText('```\n$fileContent\n```', needToast: false);
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
const SnackBar(content: Text('复制成功')),
|
const SnackBar(content: Text('复制成功')),
|
||||||
@@ -152,7 +152,8 @@ class _LogsPageState extends State<LogsPage> {
|
|||||||
),
|
),
|
||||||
TextButton.icon(
|
TextButton.icon(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await Utils.copyText(log['body'], needToast: false);
|
await Utils.copyText('```\n${log['body']}\n```',
|
||||||
|
needToast: false);
|
||||||
if (context.mounted) {
|
if (context.mounted) {
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(
|
SnackBar(
|
||||||
|
|||||||
Reference in New Issue
Block a user