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_sound_lite/flutter_sound.dart';
|
||||
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 'matrix.dart';
|
||||
import '../utils/event_extension.dart';
|
||||
@ -162,6 +163,9 @@ class _AudioPlayerState extends State<AudioPlayer> {
|
||||
: Icons.play_arrow_outlined,
|
||||
color: widget.color,
|
||||
),
|
||||
tooltip: flutterSound.isPlaying
|
||||
? L10n.of(context).audioPlayerPause
|
||||
: L10n.of(context).audioPlayerPlay,
|
||||
onPressed: () {
|
||||
if (status == AudioPlayerStatus.DOWNLOADED) {
|
||||
_playAction();
|
||||
|
@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
|
||||
import '../app_config.dart';
|
||||
|
||||
@ -99,6 +100,7 @@ class DefaultAppBarSearchFieldState extends State<DefaultAppBarSearchField> {
|
||||
(widget.suffix == null &&
|
||||
(_searchController.text?.isNotEmpty ?? false)))
|
||||
? IconButton(
|
||||
tooltip: L10n.of(context).clearText,
|
||||
icon: Icon(Icons.backspace_outlined),
|
||||
onPressed: () {
|
||||
_searchController.clear();
|
||||
|
@ -95,6 +95,9 @@ class _EncryptionButtonState extends State<EncryptionButton> {
|
||||
color = null;
|
||||
}
|
||||
return IconButton(
|
||||
tooltip: widget.room.encrypted
|
||||
? L10n.of(context).encrypted
|
||||
: L10n.of(context).encryptionNotEnabled,
|
||||
icon: Icon(
|
||||
widget.room.encrypted
|
||||
? Icons.lock_outlined
|
||||
|
@ -189,6 +189,13 @@ class UserBottomSheet extends StatelessWidget {
|
||||
}[verificationStatus] ??
|
||||
Colors.orange,
|
||||
),
|
||||
tooltip: {
|
||||
UserVerifiedStatus.unknownDevice:
|
||||
L10n.of(context).userNotVerified,
|
||||
UserVerifiedStatus.verified:
|
||||
L10n.of(context).userVerified,
|
||||
}[verificationStatus] ??
|
||||
L10n.of(context).userUnknownVerification,
|
||||
onPressed: () =>
|
||||
verificationStatus == UserVerifiedStatus.unknown
|
||||
? _verifyAction(context)
|
||||
|
@ -2087,6 +2087,36 @@
|
||||
"type": "text",
|
||||
"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": {
|
||||
"type": "text",
|
||||
|
@ -230,6 +230,7 @@ class _ChatListState extends State<ChatList> {
|
||||
leading: selectMode == SelectMode.normal
|
||||
? null
|
||||
: IconButton(
|
||||
tooltip: L10n.of(context).cancel,
|
||||
icon: Icon(Icons.close_outlined),
|
||||
onPressed: () => selectMode == SelectMode.share
|
||||
? setState(
|
||||
|
Loading…
Reference in New Issue
Block a user