mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-18 02:42:34 +01:00
feat: Add some tooltipps
This commit is contained in:
parent
fccb4ef89c
commit
b9eb8d1236
@ -8,6 +8,7 @@ import 'package:flutter/foundation.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_sound_lite/flutter_sound.dart';
|
import 'package:flutter_sound_lite/flutter_sound.dart';
|
||||||
import 'package:universal_html/prefer_universal/html.dart' as html;
|
import 'package:universal_html/prefer_universal/html.dart' as html;
|
||||||
|
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||||
import '../utils/ui_fake.dart' if (dart.library.html) 'dart:ui' as ui;
|
import '../utils/ui_fake.dart' if (dart.library.html) 'dart:ui' as ui;
|
||||||
import 'matrix.dart';
|
import 'matrix.dart';
|
||||||
import '../utils/event_extension.dart';
|
import '../utils/event_extension.dart';
|
||||||
@ -162,6 +163,9 @@ class _AudioPlayerState extends State<AudioPlayer> {
|
|||||||
: Icons.play_arrow_outlined,
|
: Icons.play_arrow_outlined,
|
||||||
color: widget.color,
|
color: widget.color,
|
||||||
),
|
),
|
||||||
|
tooltip: flutterSound.isPlaying
|
||||||
|
? L10n.of(context).audioPlayerPause
|
||||||
|
: L10n.of(context).audioPlayerPlay,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
if (status == AudioPlayerStatus.DOWNLOADED) {
|
if (status == AudioPlayerStatus.DOWNLOADED) {
|
||||||
_playAction();
|
_playAction();
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||||
|
|
||||||
import '../app_config.dart';
|
import '../app_config.dart';
|
||||||
|
|
||||||
@ -99,6 +100,7 @@ class DefaultAppBarSearchFieldState extends State<DefaultAppBarSearchField> {
|
|||||||
(widget.suffix == null &&
|
(widget.suffix == null &&
|
||||||
(_searchController.text?.isNotEmpty ?? false)))
|
(_searchController.text?.isNotEmpty ?? false)))
|
||||||
? IconButton(
|
? IconButton(
|
||||||
|
tooltip: L10n.of(context).clearText,
|
||||||
icon: Icon(Icons.backspace_outlined),
|
icon: Icon(Icons.backspace_outlined),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
_searchController.clear();
|
_searchController.clear();
|
||||||
|
@ -95,6 +95,9 @@ class _EncryptionButtonState extends State<EncryptionButton> {
|
|||||||
color = null;
|
color = null;
|
||||||
}
|
}
|
||||||
return IconButton(
|
return IconButton(
|
||||||
|
tooltip: widget.room.encrypted
|
||||||
|
? L10n.of(context).encrypted
|
||||||
|
: L10n.of(context).encryptionNotEnabled,
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
widget.room.encrypted
|
widget.room.encrypted
|
||||||
? Icons.lock_outlined
|
? Icons.lock_outlined
|
||||||
|
@ -189,6 +189,13 @@ class UserBottomSheet extends StatelessWidget {
|
|||||||
}[verificationStatus] ??
|
}[verificationStatus] ??
|
||||||
Colors.orange,
|
Colors.orange,
|
||||||
),
|
),
|
||||||
|
tooltip: {
|
||||||
|
UserVerifiedStatus.unknownDevice:
|
||||||
|
L10n.of(context).userNotVerified,
|
||||||
|
UserVerifiedStatus.verified:
|
||||||
|
L10n.of(context).userVerified,
|
||||||
|
}[verificationStatus] ??
|
||||||
|
L10n.of(context).userUnknownVerification,
|
||||||
onPressed: () =>
|
onPressed: () =>
|
||||||
verificationStatus == UserVerifiedStatus.unknown
|
verificationStatus == UserVerifiedStatus.unknown
|
||||||
? _verifyAction(context)
|
? _verifyAction(context)
|
||||||
|
@ -2087,6 +2087,36 @@
|
|||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
},
|
},
|
||||||
|
"audioPlayerPause": "Pause",
|
||||||
|
"@audioPlayerPause": {
|
||||||
|
"type": "text",
|
||||||
|
"placeholders": {}
|
||||||
|
},
|
||||||
|
"audioPlayerPlay": "Play",
|
||||||
|
"@audioPlayerPlay": {
|
||||||
|
"type": "text",
|
||||||
|
"placeholders": {}
|
||||||
|
},
|
||||||
|
"userVerified": "User is verified",
|
||||||
|
"@userVerified": {
|
||||||
|
"type": "text",
|
||||||
|
"placeholders": {}
|
||||||
|
},
|
||||||
|
"userNotVerified": "User is not verified",
|
||||||
|
"@userNotVerified": {
|
||||||
|
"type": "text",
|
||||||
|
"placeholders": {}
|
||||||
|
},
|
||||||
|
"userUnknownVerification": "User has an unknown verification status",
|
||||||
|
"@userUnknownVerification": {
|
||||||
|
"type": "text",
|
||||||
|
"placeholders": {}
|
||||||
|
},
|
||||||
|
"clearText": "Clear text",
|
||||||
|
"@clearText": {
|
||||||
|
"type": "text",
|
||||||
|
"placeholders": {}
|
||||||
|
},
|
||||||
"writeAMessage": "Write a message…",
|
"writeAMessage": "Write a message…",
|
||||||
"@writeAMessage": {
|
"@writeAMessage": {
|
||||||
"type": "text",
|
"type": "text",
|
||||||
|
@ -230,6 +230,7 @@ class _ChatListState extends State<ChatList> {
|
|||||||
leading: selectMode == SelectMode.normal
|
leading: selectMode == SelectMode.normal
|
||||||
? null
|
? null
|
||||||
: IconButton(
|
: IconButton(
|
||||||
|
tooltip: L10n.of(context).cancel,
|
||||||
icon: Icon(Icons.close_outlined),
|
icon: Icon(Icons.close_outlined),
|
||||||
onPressed: () => selectMode == SelectMode.share
|
onPressed: () => selectMode == SelectMode.share
|
||||||
? setState(
|
? setState(
|
||||||
|
Loading…
Reference in New Issue
Block a user