minor UI fixes from mobile testing
This commit is contained in:
parent
1bddef6874
commit
5f3ee270a4
8 changed files with 77 additions and 58 deletions
|
|
@ -3957,5 +3957,6 @@
|
|||
"activateTrial": "Activate Trial",
|
||||
"inNoSpaces": "You are not a member of any classes or exchanges",
|
||||
"successfullySubscribed": "You have successfully subscribed!",
|
||||
"clickToManageSubscription": "Click here to manage your subscription."
|
||||
"clickToManageSubscription": "Click here to manage your subscription.",
|
||||
"emptyInviteWarning": "Add this chat to a class or exchange to invite other users."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,3 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:future_loading_dialog/future_loading_dialog.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:matrix/matrix.dart';
|
||||
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/pages/chat_details/chat_details.dart';
|
||||
import 'package:fluffychat/pages/chat_details/participant_list_item.dart';
|
||||
|
|
@ -26,6 +19,11 @@ import 'package:fluffychat/widgets/avatar.dart';
|
|||
import 'package:fluffychat/widgets/chat_settings_popup_menu.dart';
|
||||
import 'package:fluffychat/widgets/layouts/max_width_body.dart';
|
||||
import 'package:fluffychat/widgets/matrix.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:future_loading_dialog/future_loading_dialog.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:matrix/matrix.dart';
|
||||
|
||||
class ChatDetailsView extends StatelessWidget {
|
||||
final ChatDetailsController controller;
|
||||
|
|
@ -459,7 +457,8 @@ class ChatDetailsView extends StatelessWidget {
|
|||
color: Theme.of(context).dividerColor,
|
||||
),
|
||||
// #Pangea
|
||||
if (room.canInvite)
|
||||
if (room.canInvite &&
|
||||
(!room.isSpace || room.isRoomAdmin))
|
||||
ListTile(
|
||||
title: Text(
|
||||
room.isSpace
|
||||
|
|
|
|||
|
|
@ -1,19 +1,17 @@
|
|||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:adaptive_dialog/adaptive_dialog.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:future_loading_dialog/future_loading_dialog.dart';
|
||||
import 'package:matrix/matrix.dart';
|
||||
|
||||
import 'package:fluffychat/pages/invitation_selection/invitation_selection_view.dart';
|
||||
import 'package:fluffychat/pangea/constants/class_default_values.dart';
|
||||
import 'package:fluffychat/pangea/extensions/pangea_room_extension.dart';
|
||||
import 'package:fluffychat/pangea/utils/bot_name.dart';
|
||||
import 'package:fluffychat/pangea/utils/error_handler.dart';
|
||||
import 'package:fluffychat/utils/matrix_sdk_extensions/matrix_locals.dart';
|
||||
import 'package:fluffychat/widgets/matrix.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:future_loading_dialog/future_loading_dialog.dart';
|
||||
import 'package:matrix/matrix.dart';
|
||||
|
||||
import '../../utils/localized_exception_extension.dart';
|
||||
|
||||
//#Pangea
|
||||
|
|
@ -165,7 +163,6 @@ class InvitationSelectionController extends State<InvitationSelection> {
|
|||
]),
|
||||
),
|
||||
]),
|
||||
onError: (e) => ErrorHandler.logError(e: e, s: StackTrace.current),
|
||||
// Pangea#
|
||||
);
|
||||
if (success.error == null) {
|
||||
|
|
|
|||
|
|
@ -1,12 +1,10 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:matrix/matrix.dart';
|
||||
|
||||
import 'package:fluffychat/pages/invitation_selection/invitation_selection.dart';
|
||||
import 'package:fluffychat/widgets/avatar.dart';
|
||||
import 'package:fluffychat/widgets/layouts/max_width_body.dart';
|
||||
import 'package:fluffychat/widgets/matrix.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:matrix/matrix.dart';
|
||||
|
||||
class InvitationSelectionView extends StatelessWidget {
|
||||
final InvitationSelectionController controller;
|
||||
|
|
@ -74,6 +72,18 @@ class InvitationSelectionView extends StatelessWidget {
|
|||
builder: (context, snapshot) {
|
||||
final participants =
|
||||
room.getParticipants().map((user) => user.id).toSet();
|
||||
if (controller.mode != InvitationSelectionMode.admin &&
|
||||
room.spaceParents.isEmpty) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Center(
|
||||
child: Text(
|
||||
L10n.of(context)!.emptyInviteWarning,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
return controller.foundProfiles.isNotEmpty
|
||||
? ListView.builder(
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
|
|
|
|||
|
|
@ -154,26 +154,22 @@ class RoomRulesState extends State<RoomRulesEditor> {
|
|||
),
|
||||
subtitle: Text(setting.toolDescription(context)),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 120.0),
|
||||
child: Slider(
|
||||
value: rules.getToolSettings(setting).toDouble(),
|
||||
onChanged: (value) {
|
||||
updatePermission(() {
|
||||
rules.setLanguageToolSetting(
|
||||
setting,
|
||||
value.toInt(),
|
||||
);
|
||||
});
|
||||
},
|
||||
divisions: 2,
|
||||
max: 2,
|
||||
min: 0,
|
||||
label: rules.languageToolPermissionsText(
|
||||
context,
|
||||
setting,
|
||||
),
|
||||
Slider(
|
||||
value: rules.getToolSettings(setting).toDouble(),
|
||||
onChanged: (value) {
|
||||
updatePermission(() {
|
||||
rules.setLanguageToolSetting(
|
||||
setting,
|
||||
value.toInt(),
|
||||
);
|
||||
});
|
||||
},
|
||||
divisions: 2,
|
||||
max: 2,
|
||||
min: 0,
|
||||
label: rules.languageToolPermissionsText(
|
||||
context,
|
||||
setting,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -104,7 +104,10 @@ class FindPartnerView extends StatelessWidget {
|
|||
controller: controller,
|
||||
)
|
||||
: controller.loading
|
||||
? const CircularProgressIndicator.adaptive()
|
||||
? const Center(
|
||||
child: CircularProgressIndicator
|
||||
.adaptive(),
|
||||
)
|
||||
: const SizedBox.shrink(),
|
||||
),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ class AddToSpaceState extends State<AddToSpaceToggles> {
|
|||
if (widget.activeSpaceId != null) {
|
||||
final activeSpace =
|
||||
Matrix.of(context).client.getRoomById(widget.activeSpaceId!);
|
||||
if (activeSpace != null) {
|
||||
if (activeSpace != null && activeSpace.canIAddSpaceChild(null)) {
|
||||
parents.add(SuggestionStatus(false, activeSpace));
|
||||
} else {
|
||||
ErrorHandler.logError(
|
||||
|
|
|
|||
|
|
@ -1,13 +1,11 @@
|
|||
import 'package:fluffychat/widgets/avatar.dart';
|
||||
import 'package:fluffychat/widgets/matrix.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:future_loading_dialog/future_loading_dialog.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:matrix/matrix.dart';
|
||||
|
||||
import 'package:fluffychat/widgets/avatar.dart';
|
||||
import 'package:fluffychat/widgets/matrix.dart';
|
||||
|
||||
class ProfileBottomSheet extends StatelessWidget {
|
||||
final String userId;
|
||||
final BuildContext outerContext;
|
||||
|
|
@ -46,17 +44,32 @@ class ProfileBottomSheet extends StatelessWidget {
|
|||
leading: CloseButton(
|
||||
onPressed: Navigator.of(context, rootNavigator: false).pop,
|
||||
),
|
||||
title: ListTile(
|
||||
contentPadding: const EdgeInsets.only(right: 16.0),
|
||||
title: Text(
|
||||
profile?.displayName ?? userId.localpart ?? userId,
|
||||
style: const TextStyle(fontSize: 18),
|
||||
),
|
||||
subtitle: Text(
|
||||
userId,
|
||||
style: const TextStyle(fontSize: 12),
|
||||
),
|
||||
// #Pangea
|
||||
// title: ListTile(
|
||||
// contentPadding: const EdgeInsets.only(right: 16.0),
|
||||
// title: Text(
|
||||
// profile?.displayName ?? userId.localpart ?? userId,
|
||||
// style: const TextStyle(fontSize: 18),
|
||||
// ),
|
||||
// subtitle: Text(
|
||||
// userId,
|
||||
// style: const TextStyle(fontSize: 12),
|
||||
// ),
|
||||
// ),
|
||||
title: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Text(
|
||||
profile?.displayName ?? userId.localpart ?? userId,
|
||||
style: const TextStyle(fontSize: 18),
|
||||
),
|
||||
Text(
|
||||
userId,
|
||||
style: const TextStyle(fontSize: 12),
|
||||
),
|
||||
],
|
||||
),
|
||||
// Pangea#
|
||||
actions: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue